]> git.sur5r.net Git - openldap/commitdiff
ITS#4750 only read LDAP_CONF_FILE if geteuid() != getuid()
authorHoward Chu <hyc@openldap.org>
Fri, 21 Nov 2008 02:15:47 +0000 (02:15 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 21 Nov 2008 02:15:47 +0000 (02:15 +0000)
libraries/libldap/init.c

index 4109b7eb7490b544e23983d5033e94fa9390f5cd..d61ec89fbf9b29fa2dea5d75e9f2734aa90c0b6c 100644 (file)
 #include <stdio.h>
 #include <ac/stdlib.h>
 
+#ifdef HAVE_GETEUID
+#include <ac/unistd.h>
+#endif
+
 #include <ac/socket.h>
 #include <ac/string.h>
 #include <ac/ctype.h>
@@ -629,6 +633,12 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
 #endif
 
        openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
+
+#ifdef HAVE_GETEUID
+       if ( geteuid() != getuid() )
+               return;
+#endif
+
        openldap_ldap_init_w_userconf(LDAP_USERRC_FILE);
 
        {