mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-08 01:13:16 +00:00
moved rootcheck after usage
This commit is contained in:
parent
5696b3c869
commit
41330f5f2b
10
iodined.c
10
iodined.c
|
@ -142,11 +142,6 @@ main(int argc, char **argv)
|
||||||
username = NULL;
|
username = NULL;
|
||||||
foreground = 0;
|
foreground = 0;
|
||||||
|
|
||||||
if (geteuid() != 0) {
|
|
||||||
printf("Run as root and you'll be happy.\n");
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
|
|
||||||
while ((choice = getopt(argc, argv, "vfhu:")) != -1) {
|
while ((choice = getopt(argc, argv, "vfhu:")) != -1) {
|
||||||
switch(choice) {
|
switch(choice) {
|
||||||
case 'v':
|
case 'v':
|
||||||
|
@ -170,6 +165,11 @@ main(int argc, char **argv)
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
|
if (geteuid() != 0) {
|
||||||
|
printf("Run as root and you'll be happy.\n");
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
if (argc != 1) {
|
if (argc != 1) {
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue