]> granicus.if.org Git - sudo/commitdiff
Don't set safe_cmnd for the "sudo ALL" case.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 23 Jun 2005 02:57:18 +0000 (02:57 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 23 Jun 2005 02:57:18 +0000 (02:57 +0000)
ldap.c

diff --git a/ldap.c b/ldap.c
index 7bb1be6c9b19ce91fe003a6d291f3573098d4116..de176dbae78c1e1fbff0184e5c7245b2980ecf68 100644 (file)
--- a/ldap.c
+++ b/ldap.c
@@ -250,8 +250,6 @@ sudo_ldap_check_command(ld, entry)
        /* Match against ALL ? */
        if (!strcasecmp(*p, "ALL")) {
            ret = TRUE;
-           efree(safe_cmnd);
-           safe_cmnd = estrdup(user_cmnd);
            DPRINTF(("ldap sudoCommand '%s' ... MATCH!", *p), 2);
            continue;
        }
@@ -804,8 +802,8 @@ sudo_ldap_display_cmnd(ldv, pw)
     }
 
     if (found)
-       printf("%s%s%s\n", safe_cmnd, user_args ? " " : "",
-           user_args ? user_args : "");
+       printf("%s%s%s\n", safe_cmnd ? safe_cmnd : user_cmnd,
+           user_args ? " " : "", user_args ? user_args : "");
    return(!found);
 }