mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 23:35:36 +00:00
add "ignoring foo found in ." for auth successful case
This commit is contained in:
7
sudo.c
7
sudo.c
@@ -312,7 +312,10 @@ int main(argc, argv)
|
|||||||
|
|
||||||
case VALIDATE_OK_NOPASS:
|
case VALIDATE_OK_NOPASS:
|
||||||
/* finally tell the user if the command did not exist */
|
/* 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],
|
(void) fprintf(stderr, "%s: %s: command not found\n", Argv[0],
|
||||||
cmnd);
|
cmnd);
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -377,7 +380,7 @@ int main(argc, argv)
|
|||||||
|
|
||||||
#ifndef DONT_LEAK_PATH_INFO
|
#ifndef DONT_LEAK_PATH_INFO
|
||||||
if (cmnd_status == NOT_FOUND_DOT)
|
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)
|
else if (cmnd_status == NOT_FOUND)
|
||||||
(void) fprintf(stderr, "%s: %s: command not found\n", Argv[0],
|
(void) fprintf(stderr, "%s: %s: command not found\n", Argv[0],
|
||||||
cmnd);
|
cmnd);
|
||||||
|
Reference in New Issue
Block a user