summaryrefslogtreecommitdiffstats
path: root/utils/mount/mount.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-08-11 09:52:29 +1000
committerNeil Brown <neilb@suse.de>2007-08-11 09:52:29 +1000
commitd876c93b7646f878ef774553611d8ad9ad8f15aa (patch)
tree58c230d9d311729ae22184d2a8638ed74d222684 /utils/mount/mount.c
parentb172e62f7d9dd213b0b2e23e2c550cb639618f16 (diff)
downloadnfs-utils-d876c93b7646f878ef774553611d8ad9ad8f15aa.tar.gz
nfs-utils-d876c93b7646f878ef774553611d8ad9ad8f15aa.tar.xz
nfs-utils-d876c93b7646f878ef774553611d8ad9ad8f15aa.zip
Restrict -i option to root.
As it is still under development, don't expose it - just in case. Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'utils/mount/mount.c')
-rw-r--r--utils/mount/mount.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index 627019a..ec57d84 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -470,6 +470,11 @@ int main(int argc, char *argv[])
" kernel\n"), progname);
exit(EX_USAGE);
}
+ if (uid != 0) {
+ nfs_error(_("%s: -i option is restricted to 'root'\n"),
+ progname);
+ exit(EX_USAGE);
+ }
++string;
break;
case 'h':