From: Todd C. Miller Date: Tue, 16 Feb 1993 18:22:52 +0000 (+0000) Subject: now spews error if exec fails and exits with -1 X-Git-Tag: SUDO_1_3_0~120 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=852d9371524b05c70d8f938553cb854acc10fb84;p=sudo now spews error if exec fails and exits with -1 --- diff --git a/sudo.c b/sudo.c index 1e575da27..a49eca3e4 100644 --- a/sudo.c +++ b/sudo.c @@ -48,6 +48,7 @@ #ifdef hpux #include #endif +#include #include #include #include @@ -120,6 +121,7 @@ switch ( rtn ) { exit(1); } execv(cmnd, &Argv[1]); + perror(cmnd); break; case VALIDATE_NO_USER: @@ -137,7 +139,7 @@ switch ( rtn ) { } - + return(-1); /* If we get here it's an error (execv failed) */ }