From 33f60147abb70ce36017c58366b0a1710453bb00 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 22 Mar 2007 16:56:20 +1100 Subject: [PATCH] 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. --- utils/mount/mount.c | 6 ++---- 1 file 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 */ -- 2.39.5