summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSteve French <sfrench@samba.org>2003-12-04 21:26:14 +0000
committerSteve French <sfrench@samba.org>2003-12-04 21:26:14 +0000
commit1f761ad3959cca29583844ac2f94b34a34bc2ec2 (patch)
tree13cd24ca3221a93c757594122ca127be0f86d9f2 /source3
parent16194fbc5a296aae9d7b4cb03512f22dffe48158 (diff)
downloadsamba-1f761ad3959cca29583844ac2f94b34a34bc2ec2.tar.gz
samba-1f761ad3959cca29583844ac2f94b34a34bc2ec2.tar.bz2
samba-1f761ad3959cca29583844ac2f94b34a34bc2ec2.zip
Fix incorrect smb flags2 for connections to pre-NT servers (causes smbclient to
fail to OS2 for example) (This used to be commit 54e2fcb8f4a9d603b3210baa014b3f5f15070a22)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/cliconnect.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index f6dfd40006..6e95944f92 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;