Obliterate the new password as well as the old, even if though it's hashed.

This commit is contained in:
des 2002-04-27 21:58:23 +00:00
parent a1a94cce5c
commit 1186b74661

View File

@ -178,7 +178,10 @@ yppasswd_local(ypclnt_t *ypclnt, const struct passwd *pwd, const char *passwd)
if (nc != NULL)
freenetconfigent(nc);
free(yppwd.newpw.pw_name);
free(yppwd.newpw.pw_passwd);
if (yppwd.newpw.pw_passwd != NULL) {
memset(yppwd.newpw.pw_passwd, 0, strlen(yppwd.newpw.pw_passwd));
free(yppwd.newpw.pw_passwd);
}
free(yppwd.newpw.pw_class);
free(yppwd.newpw.pw_gecos);
free(yppwd.newpw.pw_dir);
@ -255,7 +258,10 @@ yppasswd_remote(ypclnt_t *ypclnt, const struct passwd *pwd, const char *passwd)
clnt_destroy(clnt);
}
free(yppwd.newpw.pw_name);
free(yppwd.newpw.pw_passwd);
if (yppwd.newpw.pw_passwd != NULL) {
memset(yppwd.newpw.pw_passwd, 0, strlen(yppwd.newpw.pw_passwd));
free(yppwd.newpw.pw_passwd);
}
free(yppwd.newpw.pw_gecos);
free(yppwd.newpw.pw_dir);
free(yppwd.newpw.pw_shell);