[PATCH 2/5] shutdown: let non-root users see usage

Mike Frysinger vapier at gentoo.org
Sun Oct 18 08:49:35 UTC 2009


URL: http://bugs.gentoo.org/91724
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 src/shutdown.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/shutdown.c b/src/shutdown.c
index 4f721d6..79b33a3 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -460,6 +460,7 @@ int main(int argc, char **argv)
 
 	if (getuid() != 0) {
   		fprintf(stderr, "shutdown: you must be root to do that!\n");
+		usage();
   		exit(1);
 	}
 	strcpy(down_level, "1");
-- 
1.6.5.rc2




More information about the initscripts-ng-devel mailing list