summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/context_mount.c
diff options
context:
space:
mode:
authorKarel Zak2011-02-23 00:21:54 +0100
committerKarel Zak2011-02-23 00:21:54 +0100
commitddfc6f28a73afc823bb7ab5466a840d9fd5c5ad2 (patch)
tree7f7209a219b09075b884ede2cfa390b932c4f3f8 /shlibs/mount/src/context_mount.c
parentlibmount: don't export functions for vfs/fs/userspace mount options (diff)
downloadkernel-qcow2-util-linux-ddfc6f28a73afc823bb7ab5466a840d9fd5c5ad2.tar.gz
kernel-qcow2-util-linux-ddfc6f28a73afc823bb7ab5466a840d9fd5c5ad2.tar.xz
kernel-qcow2-util-linux-ddfc6f28a73afc823bb7ab5466a840d9fd5c5ad2.zip
libmount: better "user" evaluation
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/context_mount.c')
-rw-r--r--shlibs/mount/src/context_mount.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/shlibs/mount/src/context_mount.c b/shlibs/mount/src/context_mount.c
index 647e26149..5b9c0b195 100644
--- a/shlibs/mount/src/context_mount.c
+++ b/shlibs/mount/src/context_mount.c
@@ -185,11 +185,10 @@ static int evaluate_permissions(struct libmnt_context *cxt)
return -EPERM;
}
- if (u_flags & (MNT_MS_OWNER | MNT_MS_GROUP))
- cxt->mountflags |= MS_OWNERSECURE;
-
- if (u_flags & (MNT_MS_USER | MNT_MS_USERS))
- cxt->mountflags |= MS_SECURE;
+ /*
+ * Note that MS_OWNERSECURE and MS_SECURE mount options
+ * are applied by mnt_optstr_get_flags() from mnt_context_merge_mflags()
+ */
srcpath = mnt_fs_get_srcpath(cxt->fs);
if (!srcpath)