From: Eric Covener Date: Thu, 12 Jul 2007 02:42:44 +0000 (+0000) Subject: This data is passed in an unsafe way to the LDAP SDK if the compiler X-Git-Tag: 2.3.0~1725 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab845c167149377b63d1dd5b5c0068c5959a601c;p=apache This data is passed in an unsafe way to the LDAP SDK if the compiler chooses to use shorts for the enum values. http://www.redbooks.ibm.com/redbooks/SG245992/nn4/SG245992_88.html Submitted by: David Jones git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@555470 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/util_ldap.h b/include/util_ldap.h index d03e67fd66..94a41a6df7 100644 --- a/include/util_ldap.h +++ b/include/util_ldap.h @@ -96,7 +96,7 @@ typedef struct util_ldap_connection_t { const char *host; /* Name of the LDAP server (or space separated list) */ int port; /* Port of the LDAP server */ - deref_options deref; /* how to handle alias dereferening */ + int deref; /* how to handle alias dereferening */ const char *binddn; /* DN to bind to server (can be NULL) */ const char *bindpw; /* Password to bind to server (can be NULL) */ @@ -206,11 +206,11 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t,uldap_connection_cleanup,(void *param)); * use this connection while it is busy. Once you are finished with a connection, * apr_ldap_connection_close() must be called to release this connection. * @fn util_ldap_connection_t *util_ldap_connection_find(request_rec *r, const char *host, int port, - * const char *binddn, const char *bindpw, deref_options deref, + * const char *binddn, const char *bindpw, int deref, * int netscapessl, int starttls) */ APR_DECLARE_OPTIONAL_FN(util_ldap_connection_t *,uldap_connection_find,(request_rec *r, const char *host, int port, - const char *binddn, const char *bindpw, deref_options deref, + const char *binddn, const char *bindpw, int deref, int secure)); /** diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c index 38d83daff4..927a5ab133 100644 --- a/modules/aaa/mod_authnz_ldap.c +++ b/modules/aaa/mod_authnz_ldap.c @@ -57,7 +57,7 @@ typedef struct { char **attributes; /* Array of all the attributes to return */ int scope; /* Scope of the search */ char *filter; /* Filter to further limit the search */ - deref_options deref; /* how to handle alias dereferening */ + int deref; /* how to handle alias dereferening */ char *binddn; /* DN to bind to server (can be NULL) */ char *bindpw; /* Password to bind to server (can be NULL) */ diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 59449d0119..37bd4f3375 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -448,7 +448,7 @@ static util_ldap_connection_t * uldap_connection_find(request_rec *r, const char *host, int port, const char *binddn, const char *bindpw, - deref_options deref, int secure) + int deref, int secure) { struct util_ldap_connection_t *l, *p; /* To traverse the linked list */ int secureflag = secure;