From 45ec0f61fdcab7c0c4764f5e1c26faa06b02594e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 24 Oct 2023 18:46:55 +0200 Subject: [PATCH] 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 --- source3/libsmb/async_smb.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.11.4.GIT