char tempbuf[1024];
/* init things */
- memzero (buf, sizeof (buf));
- memzero (name, sizeof (name));
- memzero (limits, sizeof (limits));
- memzero (deflimits, sizeof (deflimits));
- memzero (tempbuf, sizeof (tempbuf));
+ MEMZERO(buf);
+ MEMZERO(name);
+ MEMZERO(limits);
+ MEMZERO(deflimits);
+ MEMZERO(tempbuf);
/* start the checks */
fil = fopen (LIMITS_FILE, "r");
if (('#' == buf[0]) || ('\n' == buf[0])) {
continue;
}
- memzero (tempbuf, sizeof (tempbuf));
+ MEMZERO(tempbuf);
/* a valid line should have a username, then spaces,
* then limits
* we allow the format:
* removed.
*/
- memzero (buf, sizeof buf);
+ MEMZERO(buf);
if (fgets (buf, sizeof buf, stdin) != buf) {
exit (EXIT_FAILURE);
}
erase_pass (cp);
cp = agetpass (_("Re-enter new password: "));
if (NULL == cp) {
- memzero (pass, sizeof pass);
+ MEMZERO(pass);
exit (1);
}
}
erase_pass (cp);
- memzero (pass, sizeof pass);
+ MEMZERO(pass);
if (retries + 1 < RETRIES) {
puts (_("They don't match; try again"));
Prog, salt, strerror (errno));
exit (1);
}
- memzero (pass, sizeof pass);
+ MEMZERO(pass);
#ifdef SHADOWGRP
if (is_shadowgrp) {
gr->gr_passwd = SHADOW_PASSWD_STRING;
for (i = getdef_num ("PASS_CHANGE_TRIES", 5); i > 0; i--) {
cp = agetpass (_("New password: "));
if (NULL == cp) {
- memzero (orig, sizeof orig);
- memzero (pass, sizeof pass);
+ MEMZERO(orig);
+ MEMZERO(pass);
return -1;
}
if (warned && (strcmp (pass, cp) != 0)) {
}
cp = agetpass (_("Re-enter new password: "));
if (NULL == cp) {
- memzero (orig, sizeof orig);
- memzero (pass, sizeof pass);
+ MEMZERO(orig);
+ MEMZERO(pass);
return -1;
}
if (strcmp (cp, pass) != 0) {
break;
}
}
- memzero (orig, sizeof orig);
+ MEMZERO(orig);
if (i == 0) {
- memzero (pass, sizeof pass);
+ MEMZERO(pass);
return -1;
}
*/
salt = crypt_make_salt (NULL, NULL);
cp = pw_encrypt (pass, salt);
- memzero (pass, sizeof pass);
+ MEMZERO(pass);
if (NULL == cp) {
fprintf (stderr,
sleep (2);
(void) puts (_("Login incorrect"));
}
- memzero (pass, sizeof pass);
+ MEMZERO(pass);
(void) alarm (0);
(void) signal (SIGALRM, SIG_DFL);
environ = newenvp; /* make new environment active */