s3: smbd: If smbd_do_qfilepathinfo() causes an oplock or lease break, we must check...
authorJeremy Allison <jra@samba.org>
Wed, 19 Jun 2019 18:23:41 +0000 (11:23 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 24 Jun 2019 18:49:10 +0000 (18:49 +0000)
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 <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/trans2.c

index 1b8ebac1ae64e7e17ed624103248d3ce317c7f43..77297c158b7d33c152f0c9a8b3a84fdd1d522aa6 100644 (file)
@@ -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;
        }