2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

now give usage warning if use -l,-v,-k with args

This commit is contained in:
Todd C. Miller
1996-05-29 02:14:32 +00:00
parent 59f71cc274
commit 636e5f1df4

7
sudo.c
View File

@@ -211,11 +211,9 @@ int main(argc, argv)
break;
case MODE_VALIDATE:
cmnd = "validate";
NewArgc = 1;
break;
case MODE_KILL:
cmnd = "kill";
NewArgc = 1;
break;
case MODE_LIST:
/*
@@ -227,7 +225,6 @@ int main(argc, argv)
*/
cmnd = "list";
printmatches = 1;
NewArgc = 1;
break;
}
@@ -602,6 +599,10 @@ static int parse_args()
NewArgv++;
}
if (NewArgc > 0 && (ret == MODE_VALIDATE || ret == MODE_KILL ||
ret == MODE_LIST))
usage(1);
return(ret);
}