summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-01-29 13:04:01 +0100
committerMichael Adam <obnox@samba.org>2009-01-29 13:23:06 +0100
commit27408de5337afe2e17378a09e9865c62c7b4862b (patch)
treed9a1628c4e36baf961e77afee79828f19ae7b4d1 /source3/libads
parent88278cf23f1886e949c9500276be5dae9dfd76da (diff)
downloadsamba-27408de5337afe2e17378a09e9865c62c7b4862b.tar.gz
samba-27408de5337afe2e17378a09e9865c62c7b4862b.tar.bz2
samba-27408de5337afe2e17378a09e9865c62c7b4862b.zip
s3: fix bug #6073: prevent ads_connect() from using SSL unless explicitly requested
This fixes "net ads join". It copes with the changed default "ldap ssl = start tls". A new boolean option "ldap ssl : ads" is added to allow for explicitly requesting ssl with ads. Michael
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index f6da54f35b..bb2b58e237 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -672,9 +672,11 @@ got_connection:
ldap_set_option(ads->ldap.ld, LDAP_OPT_PROTOCOL_VERSION, &version);
- status = ADS_ERROR(smb_ldap_start_tls(ads->ldap.ld, version));
- if (!ADS_ERR_OK(status)) {
- goto out;
+ if (lp_parm_bool(-1, "ldap ssl", "ads", false)) {
+ status = ADS_ERROR(smb_ldap_start_tls(ads->ldap.ld, version));
+ if (!ADS_ERR_OK(status)) {
+ goto out;
+ }
}
/* fill in the current time and offsets */