From: Todd C. Miller Date: Thu, 21 Jun 2007 22:28:40 +0000 (+0000) Subject: free message if set by authenticate() X-Git-Tag: SUDO_1_7_0~529 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd7a9af87637c0b5c3fefa59714a2888fff4f4af;p=sudo free message if set by authenticate() --- diff --git a/auth/aix_auth.c b/auth/aix_auth.c index f756d19fb..05bc369d1 100644 --- a/auth/aix_auth.c +++ b/auth/aix_auth.c @@ -50,6 +50,10 @@ __unused static const char rcsid[] = "$Sudo$"; #endif /* lint */ +/* + * For a description of the AIX authentication API, see + * http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf1/authenticate.htm + */ int aixauth_verify(pw, prompt, auth) struct passwd *pw; @@ -57,14 +61,16 @@ aixauth_verify(pw, prompt, auth) sudo_auth *auth; { char *pass; - char *message; + char *message = NULL; int reenter = 1; int rval = AUTH_FAILURE; pass = tgetpass(prompt, def_passwd_timeout * 60, tgetpass_flags); if (pass) { - if (authenticate(pw->pw_name, (char *)pass, &reenter, &message) == 0) + /* XXX - should probably print message on failure. */ + if (authenticate(pw->pw_name, pass, &reenter, &message) == 0) rval = AUTH_SUCCESS; + free(message); zero_bytes(pass, strlen(pass)); } return(rval);