]> granicus.if.org Git - sudo/commitdiff
cmnd_args is now exported from sudo.[ch]
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 22 Jul 1996 18:30:31 +0000 (18:30 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 22 Jul 1996 18:30:31 +0000 (18:30 +0000)
logging.c

index a60bc54ac8faf3e69b475d7eb7c80bbd1695382f..672016b3b3cda46e5ab267261fd49208806efd01 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -135,7 +135,7 @@ static void syslog_wrapper(pri, fmt, arg1, arg2)
 void log_error(code)
     int code;
 {
-    char *p, *cmnd_args = NULL;
+    char *p;
     int count;
     time_t now;
 #if (LOGGING & SLOG_FILE)
@@ -147,14 +147,6 @@ void log_error(code)
     char *tmp, save;
 #endif /* LOGGING & SLOG_SYSLOG */
 
-    /* Get the command line args from the environment */
-    if (NewArgc > 1 && (cmnd_args = getenv("SUDO_COMMAND"))) {
-       if ((cmnd_args = strchr(cmnd_args, ' ')))
-           cmnd_args++;
-       else
-           cmnd_args = NULL;
-    }
-
     /*
      * Allocate enough memory for logline so we won't overflow it
      */
@@ -552,8 +544,6 @@ static RETSIGTYPE reapchild(sig)
 void inform_user(code)
     int code;
 {
-    char *cmnd_args = NULL;
-
     switch (code) {
        case VALIDATE_NO_USER:
            (void) fprintf(stderr,
@@ -562,13 +552,6 @@ void inform_user(code)
            break;
 
        case VALIDATE_NOT_OK:
-           if (NewArgc > 1 && (cmnd_args = getenv("SUDO_COMMAND"))) {
-               if ((cmnd_args = strchr(cmnd_args, ' ')))
-                   cmnd_args++;
-               else
-                   cmnd_args = NULL;
-           }
-
            (void) fprintf(stderr,
                "Sorry, user %s is not allowed to execute \"%s",
                user_name, cmnd);