summaryrefslogtreecommitdiffstats
path: root/source3/libads/sasl.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-07-18 07:45:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:48 -0500
commit07c034f7c443689749c2b4b138acb991da575c3a (patch)
treeaae8514c1fc60df21a43352c80e1d20804c38607 /source3/libads/sasl.c
parente0c4034393a05acba9b6ba7dd015cfc3e6d46c0f (diff)
downloadsamba-07c034f7c443689749c2b4b138acb991da575c3a.tar.gz
samba-07c034f7c443689749c2b4b138acb991da575c3a.tar.xz
samba-07c034f7c443689749c2b4b138acb991da575c3a.zip
r23945: add infrastructure to select plain, sign or seal LDAP connection
metze (This used to be commit 2075c05b3d8baa7d6d8510cd962471a5781740a6)
Diffstat (limited to 'source3/libads/sasl.c')
-rw-r--r--source3/libads/sasl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index a73545f8e59..94600d72344 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -517,6 +517,14 @@ ADS_STATUS ads_sasl_bind(ADS_STRUCT *ads)
values = ldap_get_values(ads->ldap.ld, res, "supportedSASLMechanisms");
+ if (ads->auth.flags & ADS_AUTH_SASL_SEAL) {
+ ads->ldap.wrap_type = ADS_SASLWRAP_TYPE_SEAL;
+ } else if (ads->auth.flags & ADS_AUTH_SASL_SIGN) {
+ ads->ldap.wrap_type = ADS_SASLWRAP_TYPE_SIGN;
+ } else {
+ ads->ldap.wrap_type = ADS_SASLWRAP_TYPE_PLAIN;
+ }
+
/* try our supported mechanisms in order */
for (i=0;sasl_mechanisms[i].name;i++) {
/* see if the server supports it */