From: Todd C. Miller Date: Thu, 23 Jun 2005 02:57:18 +0000 (+0000) Subject: Don't set safe_cmnd for the "sudo ALL" case. X-Git-Tag: SUDO_1_7_0~644 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9800e99ffcc14b9cee257feae2e99c2630034e70;p=sudo Don't set safe_cmnd for the "sudo ALL" case. --- diff --git a/ldap.c b/ldap.c index 7bb1be6c9..de176dbae 100644 --- 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); }