Bug 214267 - Autofs bind mounts fail through "program" maps
Autofs bind mounts fail through "program" maps
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: autofs (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Moyer
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2006-11-06 15:32 EST by Joel Eidsath
Modified: 2007-11-16 20:14 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0734
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-15 11:01:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
handle ':' escapes in multimount entries (378 bytes, patch)
2006-11-06 16:30 EST, Jeff Moyer
no flags Details | Diff

  None (edit)
Description Joel Eidsath 2006-11-06 15:32:18 EST
Description of problem:
  Autofs passes an incorrect directive to mount when making a bind mount through
a program map.

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

How reproducible:
  Every time.

Steps to Reproduce:
1.  Create an auto.master file with the line: "/u program:/etc/auto.test"
2.  Create a 755 file "auto.test" with these contents:
    #All directories under /u are bind mounts to /tmp
    echo "/ -fstype=none,rw,bind :/tmp"
3.  Run "ls /u/testdir"
Actual results:
  No such directory testdir.

Expected results:
  /u/testdir should be the same as /tmp

Additional info:
  After some troubleshooting, I found that mount is getting passed this: "-t
none -o bind,rw :/tmp /u/testdir"

  The colon is wrong, and the mount fails. The same test with FC 5's autofs does
not result in mount being passed the colon, and everything works correctly. I
solved this problem on our mailserver by creating a wrapper around mount that
parses the input. Another of our systems programmers found that if the line from
auto.test is changed to: echo "-fstype=none,rw,bind :/tmp", mount is passed the
correct value, though this appears to be a non-standard format. (Note that you
cannot remove the colon from auto.test, because it is there to escape the
leading slash in the argument, which is otherwise expanded.)
Comment 1 Jeff Moyer 2006-11-06 16:30:32 EST
Created attachment 140511 [details]
handle ':' escapes in multimount entries

This patch addresses the issue in my test environment.	A work-around that
doesn't involve making your own script would be to simply omit the '/' at the
beginning of you echo'd text.  That way it won't be treated as a multimount
entry and will be parsed properly.
Comment 2 Jeff Moyer 2006-11-06 16:31:18 EST
Please let me know if the patch works for you.  Thanks.
Comment 3 Jeff Moyer 2007-01-12 18:00:29 EST
ping?  were you able to test this fix?
Comment 5 Jeff Moyer 2007-01-17 11:35:59 EST
This is fixed in package version autofs-4.1.3-205.
Comment 6 RHEL Product and Program Management 2007-05-09 04:58:00 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 12 errata-xmlrpc 2007-11-15 11:01:58 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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