]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
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 627019afa2b1974bd75c501261ade8d578e86522..ec57d847dd02079745bd28b054123b93a316e3dc 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':