Bug 57008

Summary: init script should not look in $cwd for maps; add strict checking
Product: [Fedora] Fedora Reporter: Eugene Kanter <ekanter>
Component: autofsAssignee: Chris Feist <cfeist>
Status: CLOSED CURRENTRELEASE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jmoyer, leon, marius.andreiana
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 1:4.1.4-5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-08-19 20:06:23 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:

Description Eugene Kanter 2001-12-03 03:48:40 UTC
Version-Release number of selected component (if applicable):

autofs-3.1.7-21

How Reproducible:

always

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 Jeff Moyer 2004-03-19 22:14:36 UTC
Please post exact configuration files and log messages.

thanks.


Comment 2 Eugene Kanter 2004-05-28 03:18:20 UTC
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
you.

Comment 3 Jeff Moyer 2004-11-01 15:29:03 UTC
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
			maptype=program
		    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 17:40:19 UTC
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 21:34:38 UTC
This bug has been fixed and is in autofs-4.1.3-41.

Comment 6 Marius Andreiana 2005-08-19 20:06:23 UTC
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.