2004-09-09 09:42:43 +00:00
|
|
|
Don't read the user's configuration file if we're running in a setuid
|
|
|
|
or setgid application.
|
2008-09-01 08:09:50 +00:00
|
|
|
diff -up openldap-2.4.11/libraries/libldap/init.c.patch3 openldap-2.4.11/libraries/libldap/init.c
|
|
|
|
--- openldap-2.4.11/libraries/libldap/init.c.patch3 2008-09-01 09:57:09.000000000 +0200
|
|
|
|
+++ openldap-2.4.11/libraries/libldap/init.c 2008-09-01 09:57:09.000000000 +0200
|
|
|
|
@@ -609,10 +609,11 @@ void ldap_int_initialize( struct ldapopt
|
2004-09-09 09:42:43 +00:00
|
|
|
if( user != NULL ) {
|
2008-09-01 08:09:50 +00:00
|
|
|
gopts->ldo_def_sasl_authcid = LDAP_STRDUP( user );
|
2004-09-09 09:42:43 +00:00
|
|
|
}
|
|
|
|
- }
|
|
|
|
+ }
|
|
|
|
#endif
|
|
|
|
|
|
|
|
openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
|
|
|
|
+ if( ( getuid() == geteuid() ) && ( getgid() == getegid() ) ) {
|
|
|
|
openldap_ldap_init_w_userconf(LDAP_USERRC_FILE);
|
|
|
|
|
|
|
|
{
|
2008-09-01 08:09:50 +00:00
|
|
|
@@ -642,4 +643,5 @@ void ldap_int_initialize( struct ldapopt
|
2004-09-09 09:42:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
openldap_ldap_init_w_env(gopts, NULL);
|
|
|
|
+ }
|
|
|
|
}
|