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

add "ignoring foo found in ." for auth successful case

This commit is contained in:
Todd C. Miller
1998-11-10 00:15:04 +00:00
parent b82d683a3b
commit 53969f978f

9
sudo.c
View File

@@ -312,9 +312,12 @@ int main(argc, argv)
case VALIDATE_OK_NOPASS:
/* finally tell the user if the command did not exist */
if (cmnd_status != FOUND) {
if (cmnd_status == NOT_FOUND_DOT) {
(void) fprintf(stderr, "%s: ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run.\n", Argv[0], cmnd, cmnd, cmnd);
exit(1);
} else if (cmnd_status == NOT_FOUND) {
(void) fprintf(stderr, "%s: %s: command not found\n", Argv[0],
cmnd);
cmnd);
exit(1);
}
@@ -377,7 +380,7 @@ int main(argc, argv)
#ifndef DONT_LEAK_PATH_INFO
if (cmnd_status == NOT_FOUND_DOT)
(void) fprintf(stderr, "%s: ignoring %s found in '.'\nUse `sudo ./%s' if this is the %s you wish to run.\n", Argv[0], cmnd, cmnd, cmnd);
(void) fprintf(stderr, "%s: ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run.\n", Argv[0], cmnd, cmnd, cmnd);
else if (cmnd_status == NOT_FOUND)
(void) fprintf(stderr, "%s: %s: command not found\n", Argv[0],
cmnd);