summaryrefslogtreecommitdiffstats
path: root/source/lib/access.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-18 03:08:50 +0000
committerJeremy Allison <jra@samba.org>2002-01-18 03:08:50 +0000
commit9bb9aa81b6176657b9afb5c40d3725c4aee73a01 (patch)
tree17b7d55b75caada09ac14132d7d58e11e85849e8 /source/lib/access.c
parent8a2d9e11f497596fe2529cbfdf6a5dbf523b47f2 (diff)
downloadsamba-9bb9aa81b6176657b9afb5c40d3725c4aee73a01.tar.gz
samba-9bb9aa81b6176657b9afb5c40d3725c4aee73a01.tar.xz
samba-9bb9aa81b6176657b9afb5c40d3725c4aee73a01.zip
If 127.0.0.1 matches both allow & deny then allow. Patch from Steve Langasek vorlon@netexpress.net
Jeremy.
Diffstat (limited to 'source/lib/access.c')
-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 73d3344e8c8..d61915f0b24 100644
--- a/source/lib/access.c
+++ b/source/lib/access.c
@@ -201,8 +201,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;