summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/ldap_server/ldap_backend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index 086069fe19..23210fa176 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -219,6 +219,12 @@ NTSTATUS ldapsrv_backend_Init(struct ldapsrv_connection *conn)
}
}
talloc_unlink(conn, ops);
+
+ /* ldb can have a different lifetime to conn, so we
+ need to ensure that sasl_mechs lives as long as the
+ ldb does */
+ talloc_steal(conn->ldb, sasl_mechs);
+
ldb_set_opaque(conn->ldb, "supportedSASLMechanisms", sasl_mechs);
}