]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #733: No explicit error message when ncsa_auth (squid user) can't access passwd...
authorhno <>
Wed, 20 Aug 2003 18:59:24 +0000 (18:59 +0000)
committerhno <>
Wed, 20 Aug 2003 18:59:24 +0000 (18:59 +0000)
helpers/basic_auth/NCSA/ncsa_auth.c

index 3bc43afb76aad9c58100a6551bc3e4f523171b2b..25b71890c77b305f682d42f78fcd01f34fc7d956 100644 (file)
@@ -81,6 +81,10 @@ read_passwd_file(const char *passwdfile)
        exit(1);
     }
     f = fopen(passwdfile, "r");
+    if (NULL == f) {
+       fprintf(stderr, "%s: %s\n", passwdfile, xstrerror());
+       exit(1);
+    }
     while (fgets(buf, 8192, f) != NULL) {
        if ((buf[0] == '#') || (buf[0] == ' ') || (buf[0] == '\t') ||
            (buf[0] == '\n'))