Bug 139633 - Broken Multi-Map Behavior
Summary: Broken Multi-Map Behavior
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: autofs
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Chris Feist
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2004-11-17 00:53 UTC by ensafi
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2005-08-18 18:01:14 UTC

Attachments (Terms of Use)
Executable Map for Browsing Samba Shares (1009 bytes, text/plain)
2004-11-17 00:57 UTC, ensafi
no flags Details

Description ensafi 2004-11-17 00:53:34 UTC
Description of problem:

Using executable maps to imitate the Sun "-hosts" map functionality 
suffers from two problems: (1) the exported filesystem paths cannot 
contain spaces, and (2) multi-maps do not work when the filesystem is 
not NFS, or at least in my experience, if the filesystem being 
mounted is SMBFS.

I can understand why #1 does not work, but it would be nice if it 
could be made to work.  However, I consider #2 to be a major flaw.

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


*** Information for Problem #1 - Spaces in Exported Paths ***

Steps to Reproduce:
1. Make sure that the /net mountpoint is defined in /etc/auto.master 
and that it is running with the standard executable map /etc/auto.net
2. Run: mkdir -p '/tmp/testing/this is a test'
3. Run: exportfs '*:/tmp/testing/this is a test'
4. Run: ls /net/localhost/tmp

Actual results:
All you see under /net/localhost/tmp/testing is 'this'.

Expected results:
You should have seen 'this is a test', which is what Sun's 
automounter does.

*** Information for Problem #2 - Multi-Maps Broken With SMBFS ***

Steps to Reproduce:
1. Run: mkdir -p '/tmp/testing/smbnet'
2. Copy the attached executable map, auto.smbnet, into /tmp/testing 
and make sure that it has execute permission
3. Make sure that SMB/CIFS shares exist on your network, and if 
necessary, edit /tmp/testing/auto.smbnet to provide appropriate 
credentials to the remote Samba or Windows server
4. Test your setup with some host on your network by 
running "/tmp/testing/auto.smbnet some_host" and verify that its 
shares are output in the form of a multi-map
5. Make sure that the /tmp/testing/smbnet mountpoint is defined 
in /etc/auto.master and that it is running with the attached 
executable map /tmp/testing/auto.smbnet
6. Run: ls /tmp/testing/smbnet/some_host
7. Run: ls /tmp/testing/smbnet/some_host/specific_share
Actual results:
You see all of the shares available on some_host, but when you try to 
access a specific share, you receive an error message of the 
form "ls: /tmp/testing/smbnet/some_host/specific_share: No such file 
or directory."  Looking at /var/log/messages reveals what seems to be 
a potential syntax incompatibilty or parsing problem between 
automount and mount.smbfs.  There may also be other problems having 
to do with non-NFS multi-maps.

Expected results:
You should have seen the contents of specific_share.

Comment 1 ensafi 2004-11-17 00:57:48 UTC
Created attachment 106860 [details]
Executable Map for Browsing Samba Shares

Comment 2 Jeff Moyer 2005-04-11 20:39:21 UTC
We should address issue 1 above (support exported file systems with spaces). 
I'm not quite so sure about supporting smb shares in auto.net.  Recent versions
of autofs contain an auto.smb, which will be included in RHEL 3 Update 5.

You can try the beta version, available here:

Please let us know if this addresses your concerns.

Comment 4 ensafi 2005-04-11 22:06:49 UTC
The real problem to be addressed in the second issue is not necessarily support 
for SMB shares, but supporting non-NFS multi-map outputs.  In other words, 
multi-maps should not be restricted to HOST:/PATH (NFS) format, but rather any 
form recognized by AUTOFS such as :/DEVICE (e.g., a local CD-ROM) 
or ://HOST/SHARE (SMB) should be considered valid and parsed correctly.  At 
present, these types of entries are processed correctly in single-map entries 
contained in file maps, NIS maps, and program maps, but multi-map entries 
(currently only supported in program maps) do not support these alternate forms.

Comment 5 Chris Feist 2005-04-13 15:37:05 UTC
I believe the latest autofs (link above) fixes your 2nd issue with smb maps.

Comment 9 Chris Feist 2005-07-22 18:54:29 UTC
Can you test out autofs from this location:  
http://people.redhat.com/jmoyer/autofs/rhel3/4.1.3-120/ and verify that it fixes
your first problem?

I'm duping this bug to split out the first issue of spaces in the exported
directory names.

Comment 10 Chris Feist 2005-07-26 21:52:48 UTC
The previous entry is incorrect, can you test the rpm to verify that it fixes
your second problem.

A fix for your second problem is in autofs-4.1.3-120 and beyond.

Note You need to log in before you can comment on or make changes to this bug.