mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-27 17:35:35 +00:00
mnt: Carefully set CL_UNPRIVILEGED in clone_mnt
old->mnt_expiry should be ignored unless CL_EXPIRE is set. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
parent
8486a7882b
commit
381cacb12c
1 changed files with 2 additions and 1 deletions
|
@ -963,7 +963,8 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root,
|
|||
}
|
||||
|
||||
/* Don't allow unprivileged users to reveal what is under a mount */
|
||||
if ((flag & CL_UNPRIVILEGED) && list_empty(&old->mnt_expire))
|
||||
if ((flag & CL_UNPRIVILEGED) &&
|
||||
(!(flag & CL_EXPIRE) || list_empty(&old->mnt_expire)))
|
||||
mnt->mnt.mnt_flags |= MNT_LOCKED;
|
||||
|
||||
atomic_inc(&sb->s_active);
|
||||
|
|
Loading…
Add table
Reference in a new issue