Closes: <https://github.com/shadow-maint/shadow/issues/797>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
-#include "prototypes.h"
+
+#include "agetpass.h"
#include "defines.h"
#include "memzero.h"
+#include "prototypes.h"
#include "pwauth.h"
#include "getdef.h"
+
#ifdef SKEY
#include <skey.h>
#endif
+
+
#ifdef __linux__ /* standard password prompt by default */
static const char *PROMPT = gettext_noop ("Password: ");
#else
#endif
snprintf (prompt, sizeof prompt, cp, user);
- clear = getpass (prompt);
+ clear = agetpass(prompt);
input = (clear == NULL) ? "" : clear;
}
* -- AR 8/22/1999
*/
if ((0 != retval) && ('\0' == input[0]) && use_skey) {
- clear = getpass (prompt);
+ erase_pass(clear);
+ clear = agetpass(prompt);
input = (clear == NULL) ? "" : clear;
}
}
}
#endif
+ erase_pass(clear);
- if (NULL != clear) {
- strzero (clear);
- }
return retval;
}
#else /* !USE_PAM */