From: Alejandro Colomar Date: Fri, 1 Sep 2023 22:58:15 +0000 (+0200) Subject: lib/pwauth.c: Remove dead code X-Git-Tag: 4.15.0-rc1~182 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adbdd086a27f865284c954a467a4def30ca147ac;p=thirdparty%2Fshadow.git lib/pwauth.c: Remove dead code There are no users of 'clear_pass' and 'wipe_clear_pass'. $ grep -rn '\' lib/pwauth.c:35:/*@null@*/char *clear_pass = NULL; lib/pwauth.c:199: * not wipe it (the caller should wipe clear_pass when it is lib/pwauth.c:203: clear_pass = clear; $ grep -rn wipe_clear_pass lib/pwauth.c:34:bool wipe_clear_pass = true; lib/pwauth.c:198: * if the external variable wipe_clear_pass is zero, we will lib/pwauth.c:204: if (wipe_clear_pass && (NULL != clear) && ('\0' != *clear)) { ChangeLog:3813: * lib/pwauth.c: Use a boolean for wipe_clear_pass and use_skey. Remove them. Signed-off-by: Alejandro Colomar --- diff --git a/lib/pwauth.c b/lib/pwauth.c index d547e53e5..c6bb1f49e 100644 --- a/lib/pwauth.c +++ b/lib/pwauth.c @@ -32,8 +32,6 @@ static const char *PROMPT = gettext_noop ("Password: "); static const char *PROMPT = gettext_noop ("%s's Password: "); #endif -bool wipe_clear_pass = true; -/*@null@*/char *clear_pass = NULL; /* * pw_auth - perform getpass/crypt authentication @@ -194,15 +192,7 @@ int pw_auth (const char *cipher, } #endif - /* - * Things like RADIUS authentication may need the password - - * if the external variable wipe_clear_pass is zero, we will - * not wipe it (the caller should wipe clear_pass when it is - * no longer needed). --marekm - */ - - clear_pass = clear; - if (wipe_clear_pass && (NULL != clear)) { + if (NULL != clear) { strzero (clear); } return retval;