mirror of
https://github.com/yarrick/iodine.git
synced 2025-08-25 04:27:34 +00:00
root check
This commit is contained in:
5
iodine.c
5
iodine.c
@@ -135,6 +135,11 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
username = NULL;
|
username = NULL;
|
||||||
|
|
||||||
|
if (geteuid() != 0) {
|
||||||
|
printf("Run as root and you'll be happy.\n");
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
while ((choice = getopt(argc, argv, "u:")) != -1) {
|
while ((choice = getopt(argc, argv, "u:")) != -1) {
|
||||||
switch(choice) {
|
switch(choice) {
|
||||||
case 'u':
|
case 'u':
|
||||||
|
@@ -132,6 +132,11 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
username = NULL;
|
username = NULL;
|
||||||
|
|
||||||
|
if (geteuid() != 0) {
|
||||||
|
printf("Run as root and you'll be happy.\n");
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
while ((choice = getopt(argc, argv, "u:")) != -1) {
|
while ((choice = getopt(argc, argv, "u:")) != -1) {
|
||||||
switch(choice) {
|
switch(choice) {
|
||||||
case 'u':
|
case 'u':
|
||||||
|
Reference in New Issue
Block a user