Bug 846 - hosts allow doesn't have any effect (samba 3.0.1pre3)
hosts allow doesn't have any effect (samba 3.0.1pre3)
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: File Services
3.0.0
All Linux
: P3 critical
: none
Assigned To: Gerald (Jerry) Carter
:
Depends on:
Blocks: 807
  Show dependency treegraph
 
Reported: 2003-11-30 13:03 UTC by Arkadiusz Miskiewicz
Modified: 2005-11-14 09:24 UTC (History)
0 users

See Also:


Attachments
configuration file used (8.67 KB, text/plain)
2003-12-01 01:01 UTC, Arkadiusz Miskiewicz
no flags Details
log 1 (12.39 KB, text/plain)
2003-12-01 01:01 UTC, Arkadiusz Miskiewicz
no flags Details
log 2 (1.79 KB, text/plain)
2003-12-01 01:02 UTC, Arkadiusz Miskiewicz
no flags Details
log 3 (56.66 KB, text/plain)
2003-12-01 01:02 UTC, Arkadiusz Miskiewicz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arkadiusz Miskiewicz 2003-11-30 13:03:37 UTC
I'm using samba 3.0.1pre3 with security = share and for example:

[test]
    comment = Private
    path = /mnt/test
    public = yes
    writable = yes
    hosts allow = 192.168.2.2

but hosts allow doesn't have any effect - any user from any IP can connect to 
this share. After downgrading samba to 3.0.0 problem disappeared.
Comment 1 Gerald (Jerry) Carter 2003-11-30 20:32:49 UTC
I need a level 10 debug log.  Thanks.
Comment 2 Gerald (Jerry) Carter 2003-11-30 20:52:07 UTC
and I need your smb.conf.  Thanks.
Comment 3 Arkadiusz Miskiewicz 2003-12-01 01:01:40 UTC
Created attachment 284 [details]
configuration file used
Comment 4 Arkadiusz Miskiewicz 2003-12-01 01:01:58 UTC
Created attachment 285 [details]
log 1
Comment 5 Arkadiusz Miskiewicz 2003-12-01 01:02:13 UTC
Created attachment 286 [details]
log 2
Comment 6 Arkadiusz Miskiewicz 2003-12-01 01:02:36 UTC
Created attachment 287 [details]
log 3
Comment 7 Arkadiusz Miskiewicz 2003-12-01 01:03:46 UTC
What I did was mounting share ,,Everything'' and I did that from 192.168.2.2 
while conflig only allows 1.1.1.1 to connect.
Comment 8 Gerald (Jerry) Carter 2003-12-01 11:26:03 UTC
Thanks.  Fixed in the latest SAMBA_3_0 cvs tree.

diff -u -r1.31.2.9 access.c
--- lib/access.c        7 Nov 2003 09:03:02 -0000       1.31.2.9
+++ lib/access.c        1 Dec 2003 19:24:54 -0000
@@ -114,7 +114,7 @@
        } else if (strequal(tok, "LOCAL")) {    /* local: no dots */
                if (strchr_m(s, '.') == 0 && !strequal(s, "unknown"))
                        return (True);
-       } else if (!strequal(tok, s)) {   /* match host name or address */
+       } else if (strequal(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)
Comment 9 Gerald (Jerry) Carter 2005-08-24 10:15:38 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
Comment 10 Gerald (Jerry) Carter 2005-11-14 09:24:22 UTC
database cleanup