diff options
author | Neil Brown <neilb@suse.de> | 2007-03-22 16:56:20 +1100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-03-22 16:56:20 +1100 |
commit | 33f60147abb70ce36017c58366b0a1710453bb00 (patch) | |
tree | 70d764229b34b01e6ddfcdc13a169a71b83562ee | |
parent | 6b82a93f2dc7f303103540babb74a75e41b84008 (diff) | |
download | nfs-utils-33f60147abb70ce36017c58366b0a1710453bb00.tar.gz nfs-utils-33f60147abb70ce36017c58366b0a1710453bb00.tar.xz nfs-utils-33f60147abb70ce36017c58366b0a1710453bb00.zip |
mount.nfs: Fix issue with -o user,exec
It would seem to make sense for mount.nfs to impose the
"-o user" => "-o noexec,nodev,nosuid"
rule. However if you give "user,exec" to /sbin/mount,
it will pass down
nodev,nosuid,user
with the 'exec' flag :-(
So we have to leave that handling of that particular rule to
/sbin/mount.
-rw-r--r-- | utils/mount/mount.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/utils/mount/mount.c b/utils/mount/mount.c index b367b64..4698d85 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -99,11 +99,9 @@ static const struct opt_map opt_map[] = { { "rbind", 0, 0, MS_BIND|MS_REC }, /* Idem, plus mounted subtrees */ { "auto", 0, 0, MS_DUMMY }, /* Can be mounted using -a */ { "noauto", 0, 0, MS_DUMMY }, /* Can only be mounted explicitly */ - { "users", 1, 0, MS_USERS|MS_NOEXEC|MS_NOSUID|MS_NODEV }, - /* Allow ordinary user to mount */ + { "users", 1, 0, MS_USERS }, /* Allow ordinary user to mount */ { "nousers", 0, 1, MS_DUMMY }, /* Forbid ordinary user to mount */ - { "user", 1, 0, MS_USER|MS_NOEXEC|MS_NOSUID|MS_NODEV }, - /* Allow ordinary user to mount */ + { "user", 1, 0, MS_USER }, /* Allow ordinary user to mount */ { "nouser", 0, 1, MS_DUMMY }, /* Forbid ordinary user to mount */ { "owner", 0, 0, MS_DUMMY }, /* Let the owner of the device mount */ { "noowner", 0, 0, MS_DUMMY }, /* Device owner has no special privs */ |