Red Hat Bugzilla – Bug 214267
Autofs bind mounts fail through "program" maps
Last modified: 2007-11-16 20:14:54 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):
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"
No such directory testdir.
/u/testdir should be the same as /tmp
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.)
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.
Please let me know if the patch works for you. Thanks.
ping? were you able to test this fix?
This is fixed in package version autofs-4.1.3-205.
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
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.