From: Volker Lendecke Date: Wed, 31 Aug 2022 13:37:03 +0000 (+0200) Subject: smbd: Introduce helper var in smbd_smb2_create_fetch_create_ctx() X-Git-Tag: talloc-2.4.0~1218 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95657d40f08a7fc7468690b86e8b49333e9eabc3;p=thirdparty%2Fsamba.git smbd: Introduce helper var in smbd_smb2_create_fetch_create_ctx() xconn will be used in another place soon Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index b2beb6e373e..8166f6a0e4d 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -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 */