]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/init.c
Merge remote-tracking branch 'origin/mdb.RE/0.9'
[openldap] / libraries / libldap / init.c
index c7db9ed6b16f11260cc22fac7c7683e4f39553c2..fb8e2ce9180abf5b4997d9eb7c2a9046b40bd48e 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2014 The OpenLDAP Foundation.
+ * Copyright 1998-2016 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 ) {
@@ -664,6 +668,12 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
                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 */