From 0c8c659e9e3c7e0378562b8ddc4583ca6431a2c7 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 24 Dec 2025 00:55:05 +0000 Subject: cgiwrapper-nollmcrawler: check white/blacklists for reading, not writing --- src/misc/cgiwrapper-nollmcrawler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc/cgiwrapper-nollmcrawler.c') diff --git a/src/misc/cgiwrapper-nollmcrawler.c b/src/misc/cgiwrapper-nollmcrawler.c index dc566a5..e752cf2 100644 --- a/src/misc/cgiwrapper-nollmcrawler.c +++ b/src/misc/cgiwrapper-nollmcrawler.c @@ -81,10 +81,10 @@ int main (int argc, char const *const *argv) memcpy(fn + m, is6 ? "128" : "32", is6 ? 3 : 2) ; m += 2 + is6 ; fn[m] = 0 ; memcpy(fn + m, "/allow", 7) ; - if (access(fn, W_OK) == 0) goto allow ; + if (access(fn, R_OK) == 0) goto allow ; if (errno != ENOENT) strerr_diefu2sys(111, "access ", fn) ; memcpy(fn + m + 1, "deny", 5) ; - if (access(fn, W_OK) == 0) goto deny ; + if (access(fn, R_OK) == 0) goto deny ; if (errno != ENOENT) strerr_diefu2sys(111, "access ", fn) ; fn[m] = 0 ; -- cgit v1.3.1