diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-07-04 07:36:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-07-04 07:36:09 +0000 |
commit | 527e824293ee934ca5da0ef5424efe5ab7757248 (patch) | |
tree | dd86fab3b0ba9cdbd86661dfae562fa123a8f53c /source3/lib/access.c | |
parent | 87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 (diff) | |
download | samba-527e824293ee934ca5da0ef5424efe5ab7757248.tar.gz samba-527e824293ee934ca5da0ef5424efe5ab7757248.tar.xz samba-527e824293ee934ca5da0ef5424efe5ab7757248.zip |
strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
Diffstat (limited to 'source3/lib/access.c')
-rw-r--r-- | source3/lib/access.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c index c32b0b7c6c0..99f3cc49b51 100644 --- a/source3/lib/access.c +++ b/source3/lib/access.c @@ -97,19 +97,19 @@ static int string_match(char *tok,char *s, char *invalid_char) } else if (strcasecmp(tok, "FAIL") == 0) { /* fail: match any */ return (FAIL); } else if (strcasecmp(tok, "LOCAL") == 0) { /* local: no dots */ - if (strchr(s, '.') == 0 && strcasecmp(s, "unknown") != 0) + if (strchr_m(s, '.') == 0 && strcasecmp(s, "unknown") != 0) return (True); } else if (!strcasecmp(tok, s)) { /* match host name or address */ return (True); } else if (tok[(tok_len = strlen(tok)) - 1] == '.') { /* network */ if (strncmp(tok, s, tok_len) == 0) return (True); - } else if ((cut = strchr(tok, '/')) != 0) { /* netnumber/netmask */ + } else if ((cut = strchr_m(tok, '/')) != 0) { /* netnumber/netmask */ if (isdigit((int)s[0]) && masked_match(tok, cut, s)) return (True); - } else if (strchr(tok, '*') != 0) { + } else if (strchr_m(tok, '*') != 0) { *invalid_char = '*'; - } else if (strchr(tok, '?') != 0) { + } else if (strchr_m(tok, '?') != 0) { *invalid_char = '?'; } return (False); @@ -252,7 +252,7 @@ static BOOL only_ipaddrs_in_list(char** list) * was a network/netmask pair. Only network/netmask pairs * have a '/' in them */ - if ((p=strchr(*list, '/')) == NULL) + if ((p=strchr_m(*list, '/')) == NULL) { only_ip = False; DEBUG(3,("only_ipaddrs_in_list: list has non-ip address (%s)\n", *list)); |