libcli: SMBntcreateX can return STOPPED_ON_SYMLINK
authorVolker Lendecke <vl@samba.org>
Tue, 24 Oct 2023 16:46:55 +0000 (18:46 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 1 Nov 2023 18:55:32 +0000 (18:55 +0000)
This does not count as NT_STATUS_IS_ERR, as it starts with 0x8 instead
of 0xC. So we return NT_STATUS_INVALID_NETWORK_RESPONSE, which is
wrong.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/async_smb.c

index bcb24a479437bdc753589c3301e41e4d27d2eeb6..38e0bb93ca5d18404237924e18d16bcab951d885 100644 (file)
@@ -201,6 +201,11 @@ NTSTATUS cli_smb_recv(struct tevent_req *req,
                        is_expected = true;
                }
 
+               if ((state->smb_command == SMBntcreateX) &&
+                   NT_STATUS_EQUAL(status, NT_STATUS_STOPPED_ON_SYMLINK)) {
+                       min_wct = 0;
+               }
+
                map_dos_errors = state->cli->map_dos_errors;
                state->cli->raw_status = status;
                talloc_free(state->ptr);