Commit 381cacb1 authored by Eric W. Biederman's avatar Eric W. Biederman

mnt: Carefully set CL_UNPRIVILEGED in clone_mnt

old->mnt_expiry should be ignored unless CL_EXPIRE is set.
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 8486a788
...@@ -963,7 +963,8 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, ...@@ -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 */ /* 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; mnt->mnt.mnt_flags |= MNT_LOCKED;
atomic_inc(&sb->s_active); atomic_inc(&sb->s_active);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment