Remove explicit_bzero() calls
This commit is contained in:
parent
bd4b6f4e47
commit
2f10d16b9f
4
login.c
4
login.c
@ -85,16 +85,12 @@ main(int argc, char *argv[])
|
|||||||
eprintf("denied\n");
|
eprintf("denied\n");
|
||||||
}
|
}
|
||||||
cryptpass = crypt(pass, spw->sp_pwdp);
|
cryptpass = crypt(pass, spw->sp_pwdp);
|
||||||
explicit_bzero(pass, strlen(pass));
|
|
||||||
if (!cryptpass)
|
if (!cryptpass)
|
||||||
eprintf("crypt:");
|
eprintf("crypt:");
|
||||||
if (strcmp(cryptpass, spw->sp_pwdp) != 0)
|
if (strcmp(cryptpass, spw->sp_pwdp) != 0)
|
||||||
eprintf("login failed\n");
|
eprintf("login failed\n");
|
||||||
explicit_bzero(cryptpass, strlen(cryptpass));
|
|
||||||
explicit_bzero(spw, sizeof *spw);
|
|
||||||
} else {
|
} else {
|
||||||
cryptpass = crypt(pass, pw->pw_passwd);
|
cryptpass = crypt(pass, pw->pw_passwd);
|
||||||
explicit_bzero(pass, strlen(pass));
|
|
||||||
if (!cryptpass)
|
if (!cryptpass)
|
||||||
eprintf("crypt:");
|
eprintf("crypt:");
|
||||||
if (strcmp(cryptpass, pw->pw_passwd) != 0)
|
if (strcmp(cryptpass, pw->pw_passwd) != 0)
|
||||||
|
6
su.c
6
su.c
@ -101,7 +101,6 @@ main(int argc, char *argv[])
|
|||||||
if (strcmp(cryptpass, spw->sp_pwdp) != 0)
|
if (strcmp(cryptpass, spw->sp_pwdp) != 0)
|
||||||
eprintf(randreply());
|
eprintf(randreply());
|
||||||
}
|
}
|
||||||
explicit_bzero(spw, sizeof *spw);
|
|
||||||
} else {
|
} else {
|
||||||
if (uid) {
|
if (uid) {
|
||||||
cryptpass = crypt(pass, pw->pw_passwd);
|
cryptpass = crypt(pass, pw->pw_passwd);
|
||||||
@ -112,11 +111,6 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uid) {
|
|
||||||
explicit_bzero(pass, strlen(pass));
|
|
||||||
explicit_bzero(cryptpass, strlen(cryptpass));
|
|
||||||
}
|
|
||||||
|
|
||||||
dosu:
|
dosu:
|
||||||
if (initgroups(usr, pw->pw_gid) < 0)
|
if (initgroups(usr, pw->pw_gid) < 0)
|
||||||
eprintf("initgroups:");
|
eprintf("initgroups:");
|
||||||
|
Loading…
Reference in New Issue
Block a user