Bug 145152 - autofs (automount) may use NIS maps even if nsswitch.conf is configured for files only
Summary: autofs (automount) may use NIS maps even if nsswitch.conf is configured for f...
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: autofs   
(Show other bugs)
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Moyer
QA Contact: Brock Organ
Whiteboard: RHEL3U7NAK
Depends On:
Blocks: RHEL3U8CanFix
TreeView+ depends on / blocked
Reported: 2005-01-14 20:40 UTC by Paul Waterman
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2006-0459
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-20 14:42:19 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0459 normal SHIPPED_LIVE autofs bug fix update 2006-07-19 18:47:00 UTC

Description Paul Waterman 2005-01-14 20:40:39 UTC
Description of problem:
autofs (automount) may use NIS maps even if nsswitch.conf is
configured for files only.

If the /etc/nsswitch.conf file is configured for "automount: files",
this should preclude NIS maps. However, if the local auto.master
references a map that doesn't exist locally, the /etc/init.d/autofs
startup script assumes this is an NIS map (see lines 210-232). If an
NIS map of that name is available, it uses it regardless of the
nsswitch.conf settings.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Edit /etc/nsswitch.conf to "automount: files"
2. Edit /etc/auto.master - add "/x auto_x -ro,intr,nobrowse"
3. Create an auto_x automount map on the NIS server.
4. Restart autofs

Actual Results:  The /x automount will function using the NIS map
available from the NIS server.

Expected Results:  The /x automount should not function, as the NIS
map should be ignored.

Comment 1 Jeff Moyer 2005-01-14 21:01:21 UTC
This is a known problem.  Unfortunately, some users depend on this broken
functionality.  I will look into adding another flag in /etc/sysconfig/autofs.

Comment 2 Jeff Moyer 2005-02-11 18:57:03 UTC
> However, if the local auto.master
> references a map that doesn't exist locally, the /etc/init.d/autofs
> startup script assumes this is an NIS map (see lines 210-232).

Sorry, I misread this the first time through.  Is this a contrived reproducer or
do you actually have instances where you run into this problem?  Why would you
configure auto.master to look for maps that don't exist?

Comment 3 Paul Waterman 2005-02-17 00:01:35 UTC
This particular issue is more likely to be encountered accidentally rather than
due to a deliberate configuration.

We encountered this problem when I was updating a system to have a local map
which overrode the NIS map. I couldn't figure out why the system was still using
the NIS map instead of the local map -- even when I removed NIS from the
/etc/nsswitch.conf file. 

Eventually I realized that I'd left out the /etc/ in the auto.master file and
that autofs was thus assumed it was an NIS map, even though NIS was not included
in /etc/nsswitch.conf.

Comment 4 Barry K. Nathan 2005-02-24 06:30:39 UTC
Re: comment #1

I suspect that some users may be depending on this broken functionality because
that's how system-config-authentication sets things up (i.e. it doesn't add
"nis" to the automount line in nsswitch.conf). If there was a way to change the
setting from system-config-authentication, or a related program, then it
wouldn't be as much of an issue.

But that's a different bug (and it may have even been filed already by someone
else for all I know off the top of my head).

Comment 5 Barry K. Nathan 2005-02-24 06:57:59 UTC
Uh, actually, I may be wrong about comment #4. I could be remembering
incorrectly, or it could be a bug that has since been fixed. I'll try to
double-check this in the next 2 days or so.

Comment 6 Barry K. Nathan 2005-02-24 07:21:55 UTC
Ok, yeah, comment #4 has nothing to do with reality; I should have
double-checked my memory against a real box *before* posting that comment, not
after. Sorry about the interruption...

Comment 7 Jeff Moyer 2005-04-11 20:49:12 UTC
I'm not sure why this is still in NEEDINFO.  Chaning it back to assigned.  I'll
work on fixing this.


Comment 8 Paul Waterman 2005-04-26 19:59:40 UTC
I've just been playing with U5 beta, and it looks like U5 beta has basically the
opposite problem as this (see Bug 156035) -- was that perhaps caused by an
attempt to fix this bug?

Comment 9 Jeff Moyer 2005-04-26 22:08:25 UTC
There have been no efforts as of yet to fix this.  However, a change in
behaviour can be considered a regression, and should be addressed.  Thanks for
taking the time to give a detailed report.

The init script never properly handled this case.  For U5, I will ensure that
the behaviour matches that of U4.  Post U5, we will work on addressing this
issue properly.


Comment 12 Jay Turner 2005-07-21 00:47:41 UTC
QE ack.

Comment 17 Bob Johnson 2006-04-11 15:50:01 UTC
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 3.8 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 3.8 release.

Comment 18 Jeff Moyer 2006-05-02 13:45:03 UTC
A fix for this issue has just been committed to the RHEL 3 U8 pool.  It will be
available in autofs versions 4.1.3-178 and later.

Comment 21 Red Hat Bugzilla 2006-07-20 14:42:19 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.


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