Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 157705

Summary: man generates many LDAP lookups in autofs+LDAP environment
Product: [Fedora] Fedora Reporter: Stephen Walton <stephen.walton>
Component: manAssignee: Ivana Varekova <varekova>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-20 13:45:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Stephen Walton 2005-05-13 21:46:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416 Fedora/1.0.3-1.3.1 Firefox/1.0.3

Description of problem:
I'm not even sure this is a bug, but:  as configured out of the box, and when used with a system which uses LDAP for its autofs maps, man generates many spurious LDAP lookups.  The reason is a bit obscure, but here's the relevant quote from man's own man page:

       In addition, for each directory in the command search path (well call
       it  a  "command  directory")  for  which you do not have a MANPATH_MAP
       statement,  man  automatically  looks  for  a  manual  page  directory
       "nearby"  namely  as a subdirectory in the command directory itself or
       in the parent directory of the command directory.

       You can disable the automatic "nearby" searches by including  a  NOAU-
       TOPATH statement in /etc/man.config.

The problem arises if you have the current directory "." in your search path, you have /home configured in your autofs maps, and you issue a man command from your home directory.  Since man searches .., a simple "man man" issues an LDAP lookup via autofs for /home/man, /home/man1, /home/man8, and so on.

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

How reproducible:

Steps to Reproduce:
1. Set up a client whose /home is managed by autofs via LDAP.
2. Issue a man command; e.g., "man man"
3. Look at the end of /var/log/messages;  you'll see many autofs generated LDAP lookups

Actual Results:  Many spurious LDAP lookups.

Expected Results:  No spurious LDAP lookups.

Additional info:

There are a lot of philosophy issues here, including whether "." should be on your path (for my users, it is very inconvenient if it is not).  The simplest workaround is to set NOAUTOPATH in /etc/man.config, but I don't know how many other things this would break if I were to make it the default.

Comment 1 Ivana Varekova 2005-05-17 12:40:09 UTC
*** Bug 157706 has been marked as a duplicate of this bug. ***

Comment 2 Ivana Varekova 2005-05-20 13:45:41 UTC
Thank you for your notice.
Man works right, but NOAUTOPATH does not help you absolutely becouse of man
search always all subdirectories following the patch "man$section".
It is man's right behavior.
This is not a bug.