This commit is contained in:
nekral-guest 2008-05-25 22:14:19 +00:00
parent 7069324a20
commit 639b2bd8e5

View File

@ -82,7 +82,7 @@ bool hushed (const struct passwd *pw)
if (NULL == fp) { if (NULL == fp) {
return false; return false;
} }
for (found = false; !found && (fgets (buf, sizeof buf, fp) != NULL);) { for (found = false; !found && (fgets (buf, sizeof buf, fp) == buf);) {
buf[strlen (buf) - 1] = '\0'; buf[strlen (buf) - 1] = '\0';
found = (strcmp (buf, pw->pw_shell) == 0) || found = (strcmp (buf, pw->pw_shell) == 0) ||
(strcmp (buf, pw->pw_name) == 0); (strcmp (buf, pw->pw_name) == 0);