]> granicus.if.org Git - sudo/commitdiff
add "ignoring foo found in ." for auth successful case
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 10 Nov 1998 00:15:04 +0000 (00:15 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 10 Nov 1998 00:15:04 +0000 (00:15 +0000)
sudo.c

diff --git a/sudo.c b/sudo.c
index ec249279e5a228368590e562a54c261831bcdfef..22ecfb1adb163dddc1b33bdd1ff8660eb69b4456 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -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);