r11875: Allow to use START_TLS (by manually setting "ldap ssl = start_tls") for
authorGünther Deschner <gd@samba.org>
Wed, 23 Nov 2005 11:21:16 +0000 (11:21 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:05:33 +0000 (11:05 -0500)
LDAP connections to ADS (Windows 2003).

Guenther
(This used to be commit 95543fab0f6aa1c483b40247c16cde79cbc9c012)

source3/libads/ldap.c

index 6d1ca24537823804d026e6aff74fbfbc689de9a9..e4cfc456a2156800965d85cb577bb4bb65957842 100644 (file)
@@ -292,6 +292,11 @@ got_connection:
 
        ldap_set_option(ads->ld, LDAP_OPT_PROTOCOL_VERSION, &version);
 
+       status = ADS_ERROR(smb_ldap_start_tls(ads->ld, version));
+       if (!ADS_ERR_OK(status)) {
+               return status;
+       }
+
        if (!ads->auth.user_name) {
                /* have to use the userPrincipalName value here and 
                   not servicePrincipalName; found by Guenther Deschner @ Sernet */