summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r--sys-utils/mount.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index e29e34cfd..fed96eb7b 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -800,7 +800,7 @@ int main(int argc, char **argv)
/* only few options are allowed for non-root users */
if (mnt_context_is_restricted(cxt) &&
- !strchr("hlLUVvpris", c) &&
+ !strchr("hlLUVvprist", c) &&
c != MOUNT_OPT_TARGET &&
c != MOUNT_OPT_SOURCE)
exit_non_root(option_to_longopt(c, longopts));
@@ -950,6 +950,11 @@ int main(int argc, char **argv)
goto done;
}
+ /* Non-root users are allowed to use -t to print_all(),
+ but not to mount */
+ if (mnt_context_is_restricted(cxt) && types)
+ exit_non_root("types");
+
if (oper && (types || all || mnt_context_get_source(cxt)))
usage(stderr);