summaryrefslogtreecommitdiffstats
path: root/source/lib/access.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-16 16:01:13 -0700
committerJeremy Allison <jra@samba.org>2007-10-16 16:01:13 -0700
commit2ef50e325c2183385286b994216624dc3a309ff3 (patch)
treedd0b4538516981171d07dd55978f1fbe833b261c /source/lib/access.c
parent0ffdf4fdeea88c21880c8bf69d8db56fb49effa7 (diff)
downloadsamba-2ef50e325c2183385286b994216624dc3a309ff3.tar.gz
samba-2ef50e325c2183385286b994216624dc3a309ff3.tar.xz
samba-2ef50e325c2183385286b994216624dc3a309ff3.zip
Improve IPv4 detection.
Jeremy.
Diffstat (limited to 'source/lib/access.c')
-rw-r--r--source/lib/access.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/lib/access.c b/source/lib/access.c
index 506f93abfc9..0d477116ed4 100644
--- a/source/lib/access.c
+++ b/source/lib/access.c
@@ -144,7 +144,7 @@ static bool string_match(const char *tok,const char *s)
return true;
}
} else if ((cut = strchr_m(tok, '/')) != 0) { /* netnumber/netmask */
- if (isdigit(s[0]) ||
+ if ((isdigit(s[0]) && strchr_m(tok, '.') != NULL) ||
(tok[0] == '[' && cut > tok && cut[-1] == ']') ||
((isxdigit(s[0]) || s[0] == ':') &&
strchr_m(tok, ':') != NULL)) {