On Wed, 10 Dec 2008 18:00:25 -0800, "Sheldon Givens" <sheldon@sigsegv.ca> wrote:
This seems useful, thanks for submitting the patch :)
You can probably do away with `auth' and reset password to NULL when
strcmp() fails (note that we also use whitespace in for statements to
separate everything more clearly):
if (old_pw && !master_mode) {
for (itr = 0; itr < max_retries; itr++) {
password = getpass("Password:");
if (strcmp(crypt(password, old_pw->pw_passwd),
old_pw->pw_passwd) != 0)
break;
password = NULL;
}
if (password == NULL)
baduser();
} else {
password = "";
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"