diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 11ec2f738..0559eebc5 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -775,8 +775,10 @@ quit: tcfinal(con); printf("\r\n"); out: +#ifdef HAVE_EXPLICIT_BZERO if (ret == NULL) explicit_bzero(pass, sizeof(pass)); +#endif return ret; } @@ -1055,7 +1057,9 @@ int main(int argc, char **argv) if ((answer = getpasswd(con)) == NULL) break; if (deny) { +#ifdef HAVE_EXPLICIT_BZERO explicit_bzero(answer, SULOGIN_PASSWORD_BUFSIZ); +#endif exit(EXIT_FAILURE); } @@ -1070,9 +1074,9 @@ int main(int argc, char **argv) else if (strcmp(cryptbuf, pwd->pw_passwd) == 0) doshell++; } - +#ifdef HAVE_EXPLICIT_BZERO explicit_bzero(answer, SULOGIN_PASSWORD_BUFSIZ); - +#endif if (doshell) { /* sushell() unmask signals */ sushell(pwd);