[PATCH v2 4/7] wldap32: implement setting the LDAP_OPT_REFERRALS option

Damjan Jovanovic damjan.jov at gmail.com
Sat Feb 13 04:44:45 CST 2021


Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
---
 dlls/wldap32/option.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
-------------- next part --------------
diff --git a/dlls/wldap32/option.c b/dlls/wldap32/option.c
index cf948bf037c..013c121255e 100644
--- a/dlls/wldap32/option.c
+++ b/dlls/wldap32/option.c
@@ -497,11 +497,23 @@ ULONG CDECL ldap_set_optionW( WLDAP32_LDAP *ld, int option, void *value )
         controlarrayfreeU( ctrlsU );
         return ret;
     }
+    case WLDAP32_LDAP_OPT_REFERRALS:
+    {
+        ULONG win32_referral;
+        void *openldap_referral;
+        win32_referral = *(ULONG*)value;
+        openldap_referral = LDAP_OPT_ON;
+        if (win32_referral == (ULONG)LDAP_OPT_OFF)
+            openldap_referral = LDAP_OPT_OFF;
+        else
+            FIXME("upgrading referral value 0x%x to LDAP_OPT_ON (OpenLDAP lacks sufficient granularity)\n", win32_referral);
+        return map_error( ldap_set_option( ld->ld, option, openldap_referral ));
+        break;
+    }
     case WLDAP32_LDAP_OPT_DEREF:
     case WLDAP32_LDAP_OPT_DESC:
     case WLDAP32_LDAP_OPT_ERROR_NUMBER:
     case WLDAP32_LDAP_OPT_PROTOCOL_VERSION:
-    case WLDAP32_LDAP_OPT_REFERRALS:
     case WLDAP32_LDAP_OPT_SIZELIMIT:
     case WLDAP32_LDAP_OPT_TIMELIMIT:
         return map_error( ldap_set_option( ld->ld, option, value ));


More information about the wine-devel mailing list