]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: fill in xconn->client early in smbd_add_connection()
authorStefan Metzmacher <metze@samba.org>
Thu, 25 Jun 2020 20:45:07 +0000 (22:45 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Jul 2020 15:54:41 +0000 (15:54 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11898

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/smbd/process.c

index 008b19861502ba73bd5aee4064f3ad6bb2a171d4..651f72f33fcdecff732399de446091a79a0ccb9f 100644 (file)
@@ -3750,6 +3750,7 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
                return NT_STATUS_NO_MEMORY;
        }
        talloc_steal(frame, xconn);
+       xconn->client = client;
        xconn->connect_time = now;
        if (client->next_channel_id != 0) {
                xconn->channel_id = client->next_channel_id++;
@@ -3867,7 +3868,6 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
                 * to the client
                 */
                DLIST_ADD_END(client->connections, xconn);
-               xconn->client = client;
                talloc_steal(client, xconn);
 
                *_xconn = xconn;
@@ -3917,7 +3917,6 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd,
 
        /* for now we only have one connection */
        DLIST_ADD_END(client->connections, xconn);
-       xconn->client = client;
        talloc_steal(client, xconn);
 
        *_xconn = xconn;