Bug 305261

Summary: autofs configuration file with comments not at the beginning of line are interpreted, not ignored
Product: Red Hat Enterprise Linux 4 Reporter: Jay Rishel <jay>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: low    
Version: 4.5CC: ikent, sputhenp
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0702 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-24 19:51:27 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
Strip comments from the end of a line in a map entry. none

Description Jay Rishel 2007-09-25 15:18:33 UTC
Description of problem:
/etc/auto.master contains the line:
/apps           /etc/auto_apps
which contains:
pb              -rw     localhost:/export/appl/pkgs/&   # PowerBroker

automount can't mount /apps/pb/ because of the comment: # PowerBroker

This same configuration file worked correctly in Linux automount version 4.1.3-187

if the comment is removed, automounting works.   If the comment is the start of
the line, it works.  this only started to fail after up2date was ran, which
updated autofs (among others)


Version-Release number of selected component (if applicable):
Linux automount version 4.1.3-199.3

How reproducible:
always

Steps to Reproduce:
1. add a comment after a configuration line in automount like the example above
2. service autofs restart
3. cd /apps/pb
  
Actual results:
cd: /apps/pb/: No such file or directory


Expected results:
automount /apps/pb, pwd should change to /apps/pb

Additional info:
Would hope this regression could be corrected, as we have a number of custom
packages which have comments added after an addition to /etc/auto_apps which
worked prior to updating autofs

Comment 1 Jeff Moyer 2007-09-25 15:59:51 UTC
I've reproduced the problem and I'll work on a fix.  Thanks for the bug report.

Comment 2 Jeff Moyer 2007-10-09 16:19:00 UTC
In version 4.1.3-187, the mount_nfs module would perform its own parsing on the
mount string.  It treated every entry as a potential replicated server entry,
and sanitized strings accordingly (removing the comments).  In version
4.1.3-199, we moved to the replicated server selection code from autofs v5, and
this is the source of the regression.

The proper place to implement this checking, however, is in the sun parser
module.  I'll attach a patch shortly which corrects this problem in the parser.

Cheers,

Jeff

Comment 3 Jeff Moyer 2007-10-09 16:21:13 UTC
Created attachment 221451 [details]
Strip comments from the end of a line in a map entry.

Comment 4 RHEL Program Management 2007-10-09 16:25:39 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 6 Jeff Moyer 2008-01-02 19:33:11 UTC
A fix for this issue was built into autofs version 4.1.3-131.1.

Comment 10 Barry Donahue 2008-06-12 14:27:16 UTC
Verified by RHTS job #23575

Comment 12 errata-xmlrpc 2008-07-24 19:51:27 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 therefore 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-2008-0702.html