mirror of
https://github.com/yarrick/iodine.git
synced 2024-12-22 21:33:33 +02:00
root check
This commit is contained in:
parent
1e9df58f2f
commit
a83a975299
2 changed files with 10 additions and 0 deletions
5
iodine.c
5
iodine.c
|
@ -134,6 +134,11 @@ main(int argc, char **argv)
|
|||
struct passwd *pw;
|
||||
|
||||
username = NULL;
|
||||
|
||||
if (geteuid() != 0) {
|
||||
printf("Run as root and you'll be happy.\n");
|
||||
usage();
|
||||
}
|
||||
|
||||
while ((choice = getopt(argc, argv, "u:")) != -1) {
|
||||
switch(choice) {
|
||||
|
|
|
@ -131,6 +131,11 @@ main(int argc, char **argv)
|
|||
struct passwd *pw;
|
||||
|
||||
username = NULL;
|
||||
|
||||
if (geteuid() != 0) {
|
||||
printf("Run as root and you'll be happy.\n");
|
||||
usage();
|
||||
}
|
||||
|
||||
while ((choice = getopt(argc, argv, "u:")) != -1) {
|
||||
switch(choice) {
|
||||
|
|
Loading…
Reference in a new issue