This commit is contained in:
parent
7069324a20
commit
639b2bd8e5
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user