Red Hat Bugzilla – Bug 305261
autofs configuration file with comments not at the beginning of line are interpreted, not ignored
Last modified: 2010-10-22 14:55:49 EDT
Description of problem:
/etc/auto.master contains the line:
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
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
cd: /apps/pb/: No such file or directory
automount /apps/pb, pwd should change to /apps/pb
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
I've reproduced the problem and I'll work on a fix. Thanks for the bug report.
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.
Created attachment 221451 [details]
Strip comments from the end of a line in a map entry.
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.
A fix for this issue was built into autofs version 4.1.3-131.1.
Verified by RHTS job #23575
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.