Restrict -i option to root.
authorNeil Brown <neilb@suse.de>
Fri, 10 Aug 2007 23:52:29 +0000 (09:52 +1000)
committerNeil Brown <neilb@suse.de>
Fri, 10 Aug 2007 23:52:29 +0000 (09:52 +1000)
As it is still under development, don't expose it - just in case.

Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/mount.c

index 627019a..ec57d84 100644 (file)
@@ -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':