From 1f761ad3959cca29583844ac2f94b34a34bc2ec2 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 4 Dec 2003 21:26:14 +0000 Subject: [PATCH] Fix incorrect smb flags2 for connections to pre-NT servers (causes smbclient to fail to OS2 for example) (This used to be commit 54e2fcb8f4a9d603b3210baa014b3f5f15070a22) --- source3/libsmb/cliconnect.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index f6dfd4000688..6e95944f92ca 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -53,6 +53,13 @@ static BOOL cli_session_setup_lanman2(struct cli_state *cli, const char *user, if (passlen > sizeof(pword)-1) return False; + /* LANMAN servers predate NT status codes and Unicode and ignore those + smb flags so we must disable the corresponding default capabilities + that would otherwise cause the Unicode and NT Status flags to be + set (and even returned by the server) */ + + cli->capabilities &= ~(CAP_UNICODE | CAP_STATUS32); + /* if in share level security then don't send a password now */ if (!(cli->sec_mode & NEGOTIATE_SECURITY_USER_LEVEL)) passlen = 0; -- 2.34.1