diff options
author | Gerald Carter <jerry@samba.org> | 2003-04-18 14:56:29 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-04-18 14:56:29 +0000 |
commit | 78f039f04347bf1fe4fa7b8f5ca56b444fc2d539 (patch) | |
tree | c773fa4bd05a1b3d7ede5180fbbce0a805e5e510 /source3/lib | |
parent | cdb197135f504683112826d26f360d79a13ae346 (diff) | |
download | samba-78f039f04347bf1fe4fa7b8f5ca56b444fc2d539.tar.gz samba-78f039f04347bf1fe4fa7b8f5ca56b444fc2d539.tar.bz2 samba-78f039f04347bf1fe4fa7b8f5ca56b444fc2d539.zip |
fix byte ordering when using CIDR notation in hosts allow/deny; spotted by Eloy Paris
(This used to be commit c2580e15d6e7ad7c8dde81753e35670fa52636ff)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/access.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c index 09676dbd58..9d07893c2f 100644 --- a/source3/lib/access.c +++ b/source3/lib/access.c @@ -40,6 +40,10 @@ static BOOL masked_match(const char *tok, const char *slash, const char *s) DEBUG(0,("access: bad net/mask access control: %s\n", tok)); return (False); } + + /* convert to network byte order */ + mask = htonl(mask); + return ((addr & mask) == net); } |