Print usage information when shutdown is used by non-root user. Patch from Mike Frysinger and Gentoo.
This commit is contained in:
parent
78f4178c4d
commit
6bf849d01d
@ -12,6 +12,8 @@ sysvinit (2.88dsf) UNRELEASED; urgency=low
|
||||
* Change tty handling in init to make sure the UTF-8 flag is not cleared
|
||||
on boot. Patch from Samuel Thibault.
|
||||
* Add Makefile in toplevel directory.
|
||||
* Print usage information when shutdown is used by non-root user.
|
||||
Patch from Mike Frysinger and Gentoo.
|
||||
|
||||
-- Petter Reinholdtsen <pere@hungry.com> Sun, 12 Jul 2009 19:58:10 +0200
|
||||
|
||||
|
@ -469,6 +469,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");
|
||||
|
Loading…
Reference in New Issue
Block a user