Bug 58304

Summary: autofs with NIS auto.master: If an automount point is substring of a previous one, second is ignored.
Product: [Retired] Red Hat Linux Reporter: Morey Hubin <mhubin>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED CURRENTRELEASE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: borisv, marc_soft
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: autofs-4.1.2-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-05 14:04:34 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 Morey Hubin 2002-01-13 22:41:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901

Description of problem:
In our enterprise we have Boston and San Diego home directories using /u/.  In
Boston /u has the local homedirs and /remote/u has the remote
ones.  If /remote/u appears first in NIS then the grep in autofs Line 159 causes
/remote/u and /u to match (the second is substring of first).  The grep command
should be enhanced to ...grep '\<'$dir/ to emphasize a word boundary in the pattern.

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


How reproducible:
Always

Steps to Reproduce:
1. Create a mount point /testing/user
2. Create second mount point of /user
3. Execute /etc/init.d/autofs start and /user will not show up.
4. Make my suggested fix from Description above.
5. /etc/init.d/autofs restart and mount point works fine now.
	

Actual Results:  The problem was solved.  It is simple to detect through the
shell script print options, provided you have the right circumstance.
This will definately effect large enterprises (like mine :) ).

Expected Results:  Second mount (/u) should appear naturally per out NIS
auto.master entries.

Additional info:

This, highly specialized, bug is reproducable in RedHat 7.1 and
probably beyond...  The fix/workaround is relatively simple per
the last line of the description above.

Comment 1 Jeff Moyer 2004-03-19 22:39:28 UTC
Indeed, this is the case.  I'll queue this fix for the next FC test
release (3).

Thanks!
Jeff

Comment 2 Jeff Moyer 2004-03-19 23:17:17 UTC
*** Bug 74164 has been marked as a duplicate of this bug. ***

Comment 3 Jeff Moyer 2004-03-22 15:42:20 UTC
*** Bug 86583 has been marked as a duplicate of this bug. ***

Comment 4 Jeff Moyer 2004-04-14 21:34:14 UTC
The latest version in FC2 has this proposed fix.  Thanks.