From a2897c13640b8b0d9f858f5a4b47153b91b8874d Mon Sep 17 00:00:00 2001 From: hno <> Date: Wed, 20 Aug 2003 18:59:24 +0000 Subject: [PATCH] Bug #733: No explicit error message when ncsa_auth (squid user) can't access passwd file --- helpers/basic_auth/NCSA/ncsa_auth.c | 4 ++++ 1 file changed, 4 insertions(+) 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')) -- 2.47.2