]> granicus.if.org Git - apache/commitdiff
This data is passed in an unsafe way to the LDAP SDK if the compiler
authorEric Covener <covener@apache.org>
Thu, 12 Jul 2007 02:42:44 +0000 (02:42 +0000)
committerEric Covener <covener@apache.org>
Thu, 12 Jul 2007 02:42:44 +0000 (02:42 +0000)
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

include/util_ldap.h
modules/aaa/mod_authnz_ldap.c
modules/ldap/util_ldap.c

index d03e67fd66c1c7a9fd6ecef57f942faec1e98b6a..94a41a6df7447a18b6b26949e1e9e2fe5e2bc7ee 100644 (file)
@@ -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));
 
 /**
index 38d83daff4903da5beef472f9f2b238330757f8b..927a5ab133b997169903f6cebdcc1ff40a44a52d 100644 (file)
@@ -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) */
 
index 59449d0119e826b9487442e580a6497f90015e69..37bd4f33757092d494f36b36eec4c26daa9e3e83 100644 (file)
@@ -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;