Bug 176627 - Multimounts containing multiple automounts of implicit map type fail
Summary: Multimounts containing multiple automounts of implicit map type fail
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: autofs
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Moyer
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-27 21:47 UTC by Ian McLeod
Modified: 2008-08-02 23:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-17 19:58:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fix the parser to not choke on the absence of a colon in a multimount entry (347 bytes, patch)
2006-01-06 21:45 UTC, Jeff Moyer
no flags Details | Diff
Attempt to fix incorect parsing when colon is not present (1.08 KB, patch)
2006-01-10 14:40 UTC, Ian Kent
no flags Details | Diff

Description Ian McLeod 2005-12-27 21:47:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041215 Firefox/1.0 Red Hat/1.0-12.EL4

Description of problem:
Multimounts fail due to a parsing error if they contain multiple nested "sub-automounts" that don't use the "<type>:<mapname>" to explicitly indicate map type.  For example, the following submount will fail:

submountdir / server:/mountpoint \
  /nestedmount1 -fstype=autofs auto.nested1 \
  /nestedmount2 -fstype=autofs auto.nested2


This will produce the following error when you attempt to enter "submountdir"

"nsswitch: unable to find map, auto.nested1               /nestedmount2 -fstype=autofs auto.nested2 in domain, mydomain.com"

As best I can tell, this occurs because the multimount parsing code assumes that the source for a multimount must contain a colon.  As a result, it calls the internal "chunklen" function with the "expect colon" value set to true.  This causes the parser to ignore all tabs and spaces, processing the remainder of the line as if it were the map source (producing the error message above).

This assumption works if the source is an actual NFS share, or if it is a sub-automount with an explicitly indicated type.  It fails if the sub-automount has no explicit type.

(Note that the code to use nsswitch to find an implicit map _does_ work just fine.)

I've attached a patch that fixes this particular case.  However, I suspect it will still fail on more complex multimounts that combine sub-automounts with NFS shares.

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

How reproducible:
Always

Steps to Reproduce:
1. Create file maps to duplicate the map structure described above
2. Attempt to enter the submountdir directory
3.
  

Actual Results:  Error message in syslog as described above

Expected Results:  server:/mountpoint should be mounted on "submountdir" 

Two sub-automounts should be started

Additional info:

Comment 2 Jeff Moyer 2006-01-06 21:45:05 UTC
Created attachment 122894 [details]
fix the parser to not choke on the absence of a colon in a multimount entry

After discussing this with Ian, we've agreed that the caller in question should
never set expect_colon to 1.  This patch affects that change, and is currently
being tested.

Comment 3 Ian Kent 2006-01-10 14:40:22 UTC
Created attachment 122998 [details]
Attempt to fix incorect parsing when colon is not present 

Hi Ian,

Could you test this patch please.

Ian

Comment 4 Jeff Moyer 2006-04-19 16:26:19 UTC
Ian M., have you had a chance to try out Ian K.'s patch?

Comment 5 Jeff Moyer 2006-05-23 17:23:33 UTC
Ian M, any news?

Comment 6 Jeff Moyer 2006-08-08 19:21:43 UTC
Ian M., are you alive?

Comment 10 Jeff Moyer 2007-01-17 19:58:25 UTC
I'm closing this as WONTFIX, since the reporter is no longer responsive, and
because it does not seem to fit the RHEL 3.9 release criteria.


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