From: hno <> Date: Wed, 20 Aug 2003 18:59:24 +0000 (+0000) Subject: Bug #733: No explicit error message when ncsa_auth (squid user) can't access passwd... X-Git-Tag: SQUID_3_0_PRE4~1240 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2897c13640b8b0d9f858f5a4b47153b91b8874d;p=thirdparty%2Fsquid.git Bug #733: No explicit error message when ncsa_auth (squid user) can't access passwd file --- diff --git a/helpers/basic_auth/NCSA/ncsa_auth.c b/helpers/basic_auth/NCSA/ncsa_auth.c index 3bc43afb76..25b71890c7 100644 --- a/helpers/basic_auth/NCSA/ncsa_auth.c +++ b/helpers/basic_auth/NCSA/ncsa_auth.c @@ -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'))