]> granicus.if.org Git - sudo/commitdiff
now spews error if exec fails and exits with -1
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 16 Feb 1993 18:22:52 +0000 (18:22 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 16 Feb 1993 18:22:52 +0000 (18:22 +0000)
sudo.c

diff --git a/sudo.c b/sudo.c
index 1e575da2723f26669f9988e12e9eaed081ca828b..a49eca3e4a092fefaacc4083aff22598e0ab4f41 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -48,6 +48,7 @@
 #ifdef hpux
 #include <unistd.h>
 #endif
+#include <errno.h>
 #include <string.h>
 #include <strings.h>
 #include <pwd.h>
@@ -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) */
 }