From: Jeremy Allison Date: Wed, 19 Jun 2019 18:23:41 +0000 (-0700) Subject: s3: smbd: If smbd_do_qfilepathinfo() causes an oplock or lease break, we must check... X-Git-Tag: ldb-2.0.5~229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd203e98f84109899704ac86ebcfe9a0fe394d32;p=thirdparty%2Fsamba.git s3: smbd: If smbd_do_qfilepathinfo() causes an oplock or lease break, we must check for deferred open here. Note this isn't an issue in SMB2, as no SMB2 info level requests called by smbd_do_qfilepathinfo()/smbd_do_setfilepathinfo() from SMB2 can cause a oplock or lease break. The SMB1 trans2.c: calling of smbd_do_setfilepathinfo() correctly copes with this, this was just missed in the SMB1 call of smbd_do_qfilepathinfo(). Needed for the following POSIX ACL query interacting with Windows oplock file test to follow. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 1b8ebac1ae6..77297c158b7 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6312,6 +6312,10 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd &fixed_portion, ppdata, &data_size); if (!NT_STATUS_IS_OK(status)) { + if (open_was_deferred(req->xconn, req->mid)) { + /* We have re-scheduled this call. */ + return; + } reply_nterror(req, status); return; }