]> granicus.if.org Git - shadow/commitdiff
(no commit message)
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 25 May 2008 22:14:19 +0000 (22:14 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 25 May 2008 22:14:19 +0000 (22:14 +0000)
libmisc/hushed.c

index 327487ae335acba9248a4aefb9c666d600b8ec1c..cb59a2ae90c33b386c84ee2ed8457a62ecefd85f 100644 (file)
@@ -82,7 +82,7 @@ bool hushed (const struct passwd *pw)
        if (NULL == fp) {
                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';
                found = (strcmp (buf, pw->pw_shell) == 0) ||
                        (strcmp (buf, pw->pw_name) == 0);