allow 0.0.0.0/0 syntax in hosts allow/deny
authorAndrew Tridgell <tridge@samba.org>
Sat, 19 Aug 2000 13:04:29 +0000 (13:04 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 19 Aug 2000 13:04:29 +0000 (13:04 +0000)
patch from Charles Levert <charles@comm.polymtl.ca>

access.c

index f176343..050e8cc 100644 (file)
--- a/access.c
+++ b/access.c
@@ -68,6 +68,7 @@ static int match_address(char *addr, char *tok)
                        mask = ntohl(mask);
                } else {
                        int bits = atoi(p+1);
                        mask = ntohl(mask);
                } else {
                        int bits = atoi(p+1);
+                       if (bits == 0) return 1;
                        if (bits <= 0 || bits > 32) {
                                rprintf(FERROR,"malformed mask in %s\n", tok);
                                return 0;
                        if (bits <= 0 || bits > 32) {
                                rprintf(FERROR,"malformed mask in %s\n", tok);
                                return 0;