]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Introduce helper var in smbd_smb2_create_fetch_create_ctx()
authorVolker Lendecke <vl@samba.org>
Wed, 31 Aug 2022 13:37:03 +0000 (15:37 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 2 Sep 2022 13:31:38 +0000 (13:31 +0000)
xconn will be used in another place soon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_create.c

index b2beb6e373e99ba13408b229ef38ba21a76cf21c..8166f6a0e4d15872a1c1566d0f041610b2a5d466 100644 (file)
@@ -573,6 +573,8 @@ static NTSTATUS smbd_smb2_create_fetch_create_ctx(
 {
        struct smbd_smb2_create_state *state = tevent_req_data(
                req, struct smbd_smb2_create_state);
+       struct smbd_smb2_request *smb2req = state->smb2req;
+       struct smbXsrv_connection *xconn = smb2req->xconn;
 
        /*
         * For now, remove the posix create context from the wire. We
@@ -590,7 +592,7 @@ static NTSTATUS smbd_smb2_create_fetch_create_ctx(
                                            SMB2_CREATE_TAG_DH2Q);
        state->dh2c = smb2_create_blob_find(in_context_blobs,
                                            SMB2_CREATE_TAG_DH2C);
-       if (state->smb2req->xconn->smb2.server.capabilities & SMB2_CAP_LEASING) {
+       if (xconn->smb2.server.capabilities & SMB2_CAP_LEASING) {
                state->rqls = smb2_create_blob_find(in_context_blobs,
                                                    SMB2_CREATE_TAG_RQLS);
        }
@@ -680,7 +682,7 @@ static NTSTATUS smbd_smb2_create_fetch_create_ctx(
                                            SMB2_CREATE_TAG_TWRP);
        state->qfid = smb2_create_blob_find(in_context_blobs,
                                            SMB2_CREATE_TAG_QFID);
-       if (state->smb2req->xconn->protocol >= PROTOCOL_SMB3_02) {
+       if (xconn->protocol >= PROTOCOL_SMB3_02) {
                /*
                 * This was introduced with SMB3_02
                 */