libsmb: Handle IO_TIMEOUT in cli_smb2_notify properly
authorVolker Lendecke <vl@samba.org>
Mon, 30 Oct 2017 13:36:46 +0000 (14:36 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 4 Apr 2018 23:10:10 +0000 (01:10 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/cli_smb2_fnum.c

index 2d87b58d730ff1355f0d8edc82e8da16a5fd780b..c397b29b3818d08450a7a0a5229f2cda740ac4da 100644 (file)
@@ -4192,6 +4192,15 @@ NTSTATUS cli_smb2_notify(struct cli_state *cli, uint16_t fnum,
                                completion_filter, recursive,
                                frame, &base, &len);
 
+       if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
+               len = 0;
+               status = NT_STATUS_OK;
+       }
+
+       if (!NT_STATUS_IS_OK(status)) {
+               goto fail;
+       }
+
        ofs = 0;
 
        while (len - ofs >= 12) {