git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ffdf4f
)
Improve IPv4 detection.
author
Jeremy Allison
<jra@samba.org>
Tue, 16 Oct 2007 23:01:13 +0000
(16:01 -0700)
committer
Jeremy Allison
<jra@samba.org>
Tue, 16 Oct 2007 23:01:13 +0000
(16:01 -0700)
Jeremy.
source/lib/access.c
patch
|
blob
|
history
diff --git
a/source/lib/access.c
b/source/lib/access.c
index 506f93abfc9b55a87ad11b76d7b707efccfa46b3..0d477116ed44b046b00cbd5c26611d12f36f098d 100644
(file)
--- 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)) {