summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-18 03:08:40 +0000
committerJeremy Allison <jra@samba.org>2002-01-18 03:08:40 +0000
commit478696e924a5e562965eb21841198c96500027c4 (patch)
tree2887379511b7c03e56425605a39116bab9006abd /source
parent07a21fcd2311d2d9b430b99303e3532a8c1159e4 (diff)
downloadsamba-478696e924a5e562965eb21841198c96500027c4.tar.gz
samba-478696e924a5e562965eb21841198c96500027c4.tar.xz
samba-478696e924a5e562965eb21841198c96500027c4.zip
If 127.0.0.1 matches both allow & deny then allow. Patch from Steve Langasek vorlon@netexpress.net
Jeremy.
Diffstat (limited to 'source')
-rw-r--r--source/lib/access.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/lib/access.c b/source/lib/access.c
index f59bf860577..c7ca164c392 100644
--- a/source/lib/access.c
+++ b/source/lib/access.c
@@ -190,8 +190,14 @@ BOOL allow_access(char **deny_list,char **allow_list,
/* if it is loopback then always allow unless specifically denied */
if (strcmp(caddr, "127.0.0.1") == 0) {
+ /*
+ * If 127.0.0.1 matches both allow and deny then allow.
+ * Patch from Steve Langasek vorlon@netexpress.net.
+ */
if (deny_list &&
- list_match(deny_list,(char *)client,client_match)) {
+ list_match(deny_list,(char *)client,client_match) &&
+ (!allow_list ||
+ !list_match(allow_list,(char *)client, client_match))) {
return False;
}
return True;