]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/init.c
ITS#8687 - EGD is disabled by default in OpenSSL 1.1. We need to comment out this...
[openldap] / libraries / libldap / init.c
index a44b99bed45e0e750ce436a2426f7fe71f90b2c5..3e602dff9ad9f4bf1f80348ae637159499381e08 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2013 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -596,6 +596,10 @@ void ldap_int_initialize_global_options( struct ldapoptions *gopts, int *dbglvl
 char * ldap_int_hostname = NULL;
 #endif
 
+#ifdef LDAP_R_COMPILE
+int    ldap_int_stackguard;
+#endif
+
 void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
 {
        if ( gopts->ldo_valid == LDAP_INITIALIZED ) {
@@ -658,12 +662,24 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
        if ( ldap_int_tblsize == 0 ) ldap_int_ip_init();
 #endif
 
+#ifdef HAVE_CYRUS_SASL
+       if ( ldap_int_sasl_init() != 0 ) {
+               return;
+       }
+#endif
+
        ldap_int_initialize_global_options(gopts, dbglvl);
 
        if( getenv("LDAPNOINIT") != NULL ) {
                return;
        }
 
+#ifdef LDAP_R_COMPILE
+       if( getenv("LDAPSTACKGUARD") != NULL ) {
+               ldap_int_stackguard = 1;
+       }
+#endif
+
 #ifdef HAVE_CYRUS_SASL
        {
                /* set authentication identity to current user name */