Bug 57008 - init script should not look in $cwd for maps; add strict checking
init script should not look in $cwd for maps; add strict checking
Product: Fedora
Classification: Fedora
Component: autofs (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Feist
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2001-12-02 22:48 EST by Eugene Kanter
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version: 1:4.1.4-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-19 16:06:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eugene Kanter 2001-12-02 22:48:40 EST
Version-Release number of selected component (if applicable):


How Reproducible:


Steps to Reproduce:
1. create yp map auto.master and auto.home and configure host to read yp
maps. contents of auto.master similar to "/home -rw host:/home"
2. run ypcat -k auto.home > auto.home
3. run "/etc/rc.d/init.d/autofs start" from the same location as "2"
4. run "service autofs status" notice command line someting like:

Actual Results:

/usr/sbin/automount /home file auto.home

5. notice errors in /var/log/messages about improper path to auto.home.

Expected Results:

/usr/sbin/automount /home yp auto.home

Additional Information:

Under no circumstances autofs startup scripts should provide maptype "file"
without full name to map file.
Autofs startup script gets confused by a local file auto.home and
mistakenly uses it as a map file despite to a relative (e.g. not starting
from "/") path.
Comment 1 Jeffrey Moyer 2004-03-19 17:14:36 EST
Please post exact configuration files and log messages.

Comment 2 Eugene Kanter 2004-05-27 23:18:20 EDT
It has been two years, three months and sevearal releases between my
submission and your question. I'll have to configure FC2 to use NIS
and see if there are any changes. Meanwhile you can do the same. Thank
Comment 3 Jeffrey Moyer 2004-11-01 10:29:03 EST
I believe this "bug" still exists in autofs 4.1.3.  Chris, can you take a look
at this?  I believe we should change the following in the init script:

		# Handle degenerate map specifiers
		if [ "$maptype" = "$map" ] ; then
		    if [ -x "$map" ]; then
		    elif [ -x "/etc/$map" ]; then

to not look in $cwd as suggested.  However, the first check should be kept, if
the prefix is a /.  So, if $map is /etc/foo.map, then we should still just try
$map.  Note that there is no reason a user couldn't put the map somewhere other
than in /etc.  We shouldn't restrict this.  Rather, we just want to check the
path given if it is an absolute path, otherwise look for the file name in /etc.

Comment 4 Chris Feist 2004-11-01 12:40:19 EST
I have tested it, and the bug still exists.  I'll put together a patch
that will make sure that $map is a absolute address (it must start w/
a '/').
Comment 5 Chris Feist 2004-11-03 16:34:38 EST
This bug has been fixed and is in autofs-4.1.3-41.
Comment 6 Marius Andreiana 2005-08-19 16:06:23 EDT
1:4.1.4-5 is available in FC4.

Setting status to "CURRENTRELEASE", however if you still
experience this problem after updating to our latest Fedora
Core release and are still interested in Red Hat tracking
the issue, and assisting in troubleshooting the problem,
please feel free to provide the information requested above,
and reopen the report.

Thanks in advance.

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