diff options
author | Steve French <sfrench@samba.org> | 2003-12-04 21:26:14 +0000 |
---|---|---|
committer | Steve French <sfrench@samba.org> | 2003-12-04 21:26:14 +0000 |
commit | 54e2fcb8f4a9d603b3210baa014b3f5f15070a22 (patch) | |
tree | 3613fa7266ddc08c7df86a7191f0939e206ab3c8 | |
parent | ff06f3ca8e597d093b8a76b5cfabfa6009f4b591 (diff) | |
download | samba-54e2fcb8f4a9d603b3210baa014b3f5f15070a22.tar.gz samba-54e2fcb8f4a9d603b3210baa014b3f5f15070a22.tar.xz samba-54e2fcb8f4a9d603b3210baa014b3f5f15070a22.zip |
Fix incorrect smb flags2 for connections to pre-NT servers (causes smbclient to
fail to OS2 for example)
-rw-r--r-- | source/libsmb/cliconnect.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index f6dfd400068..6e95944f92c 100644 --- a/source/libsmb/cliconnect.c +++ b/source/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; |