From: Volker Lendecke Date: Tue, 24 Oct 2023 16:46:55 +0000 (+0200) Subject: libcli: SMBntcreateX can return STOPPED_ON_SYMLINK X-Git-Tag: talloc-2.4.2~948 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=45ec0f61fdcab7c0c4764f5e1c26faa06b02594e;p=thirdparty%2Fsamba.git libcli: SMBntcreateX can return STOPPED_ON_SYMLINK 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index bcb24a47943..38e0bb93ca5 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -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);