s4-ldap_server: Do not set conn->session_info to NULL, keep valid at all times
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Mar 2017 02:10:14 +0000 (15:10 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 29 Mar 2017 00:37:26 +0000 (02:37 +0200)
We need this to be valid, right up until a new session_info is created and
it is replaced.

We need this to have a valid value at all times, and we are still anonymous
until the new bind completes

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
source4/ldap_server/ldap_bind.c

index 332bad3224ee8d08f72b7e4bbbd7a7d783cc9d2a..e0f13f2de2d85d9909c9790b445ae553bbf3636b 100644 (file)
@@ -251,8 +251,6 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
         */
 
        if (!conn->gensec) {
-               conn->session_info = NULL;
-
                status = ldapsrv_setup_gensec(conn, req->creds.SASL.mechanism,
                                              &conn->gensec);
                if (!NT_STATUS_IS_OK(status)) {