Bug 494330

Summary: ldapsearch ignores ~/.ldaprc
Product: [Fedora] Fedora Reporter: Fabrice Bellet <fabrice>
Component: openldapAssignee: Jan Zeleny <jzeleny>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: fabrice, jzeleny
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-09 14:13:00 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 Fabrice Bellet 2009-04-06 12:44:28 UTC
This problem seems to be caused by this code modification, between version 2.4.10 from F-9 and version 2.4.15 from rawhide, in libraries/libldap/init.c

[2.4.10]
        openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
        if( ( getuid() == geteuid() ) && ( getgid() == getegid() ) ) {
        openldap_ldap_init_w_userconf(LDAP_USERRC_FILE);
[2.4.15]
        openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);

#ifdef HAVE_GETEUID
        if ( geteuid() != getuid() || getegid() == getgid() )
                return;
#endif

        openldap_ldap_init_w_userconf(LDAP_USERRC_FILE);


The correct test should be ( geteuid() != getuid() || getegid() != getgid() )

Comment 1 Jan Zeleny 2009-04-09 14:13:00 UTC
I consulted this issue with previous maintainer and he confirmed your solution. Correct patch is in rawhide now, in F-10 it seems to be all right.