2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 05:48:18 +00:00

added -u username support

This commit is contained in:
Todd C. Miller 1996-07-08 00:33:07 +00:00
parent a74cdaf8d6
commit 064589670f

View File

@ -253,8 +253,10 @@ main(argc, argv)
yydebug = 1;
#endif
if (argc != 4) {
(void) fprintf(stderr, "usage: %s <command> <user> <host>\n", argv[0]);
if (argc == 6 && strcmp(argv[1], "-u") == 0) {
runas_user = argv[2];
} else if (argc != 4) {
(void) fprintf(stderr, "usage: %s [-u user] <command> <user> <host>\n", argv[0]);
exit(1);
}