Bug 214267

Summary: Autofs bind mounts fail through "program" maps
Product: Red Hat Enterprise Linux 4 Reporter: Joel Eidsath <thras>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: ikent, jweber
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0734 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:01:58 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:
Attachments:
Description Flags
handle ':' escapes in multimount entries none

Description Joel Eidsath 2006-11-06 20:32:18 UTC
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):
  autofs-4.1.3-187

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:
    #!/bin/bash
    #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 21:30:32 UTC
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 21:31:18 UTC
Please let me know if the patch works for you.  Thanks.

Comment 3 Jeff Moyer 2007-01-12 23:00:29 UTC
ping?  were you able to test this fix?

Comment 5 Jeff Moyer 2007-01-17 16:35:59 UTC
This is fixed in package version autofs-4.1.3-205.

Comment 6 RHEL Program Management 2007-05-09 08:58:00 UTC
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
release.

Comment 12 errata-xmlrpc 2007-11-15 16:01:58 UTC
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.

http://rhn.redhat.com/errata/RHBA-2007-0734.html