X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=libraries%2Flibldap%2Finit.c;h=fb8e2ce9180abf5b4997d9eb7c2a9046b40bd48e;hb=6c4d6c880b14b27a5decc954af45c3ab9bdd6e2d;hp=a44b99bed45e0e750ce436a2426f7fe71f90b2c5;hpb=681dbae8f0a45fff3f25bca2cf1f68cd1f484867;p=openldap diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index a44b99bed4..fb8e2ce918 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2013 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 */