Bug 104290

Summary: testparm incorrectly checks host-based access settings
Product: Red Hat Enterprise Linux 3 Reporter: Brad Smith <brads>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: samba-bugs-list
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-19 19:34:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brad Smith 2003-09-12 03:58:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030516
Mozilla Firebird/0.6

Description of problem:
In smb.conf, share-level host based access controls (eg 'hosts allow') can grant
less, but never more, access than the global hosts based access controls.
However, if smb.conf looks like this:

--
[global]
hosts allow 192.168.0.
<snip>
[myshare]
hosts allow 192.168.1.
--

'testparm smb.conf mymachine 192.168.1.5' will list myshare as accessable, but
because myshare's hosts allow line cannot grant access to networks that the
global hosts allow does not grant access to, any actual attempt to connect will
be denied. 


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Ingredients: Samba client and server on different networks

1. Edit /etc/samba/smb.conf so the the [global] section does not allow the
client's network, but one share does (as above)

2. Run 'testparm /etc/samba/smb.conf <hostname> <hostIP>' -- the share will be
listed as accessable.

3. Run 'smbclient //smbserver/share -I <smbserverIP>' connection will be refused. 
    

Additional info:

Comment 1 RHEL Program Management 2007-10-19 19:34:40 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.