summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-11-20 08:45:22 +0000
committerAndrew Tridgell <tridge@samba.org>2001-11-20 08:45:22 +0000
commitfcbcfb667feaa5f670d589d084aa85cdb66443e0 (patch)
tree9f336d781c405106bae0cbb68d2aa623526d7ae0
parent580ee96dae7c2b5fdf226fb8581f838023daf2eb (diff)
downloadsamba-fcbcfb667feaa5f670d589d084aa85cdb66443e0.tar.gz
samba-fcbcfb667feaa5f670d589d084aa85cdb66443e0.tar.bz2
samba-fcbcfb667feaa5f670d589d084aa85cdb66443e0.zip
- make sure we use a non-zero session id so we can have multiple conns
open to w2k - fix the string handling in the device name to match NT and smbd - don't pull the domain from negprot if CAP_EXTENDED_SECURITY is set (This used to be commit 618989b386b5564ba140afdc17ce7a07040c3c4e)
-rw-r--r--source3/libsmb/cliconnect.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index a6632803b2..f5d6c5a7f4 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -341,7 +341,7 @@ static DATA_BLOB cli_session_setup_blob(struct cli_state *cli, DATA_BLOB blob)
CVAL(cli->outbuf,smb_vwv0) = 0xFF;
SSVAL(cli->outbuf,smb_vwv2,CLI_BUFFER_SIZE);
SSVAL(cli->outbuf,smb_vwv3,2);
- SSVAL(cli->outbuf,smb_vwv4,0);
+ SSVAL(cli->outbuf,smb_vwv4,1);
SIVAL(cli->outbuf,smb_vwv5,0);
SSVAL(cli->outbuf,smb_vwv7,blob.length);
SIVAL(cli->outbuf,smb_vwv10,capabilities);
@@ -710,17 +710,12 @@ BOOL cli_send_tconX(struct cli_state *cli,
return False;
}
- fstrcpy(cli->dev, "A:");
-
- if (cli->protocol >= PROTOCOL_NT1) {
- clistr_pull(cli, cli->dev, smb_buf(cli->inbuf), sizeof(fstring), -1, STR_TERMINATE);
- }
+ clistr_pull(cli, cli->dev, smb_buf(cli->inbuf), sizeof(fstring), -1, STR_TERMINATE|STR_ASCII);
if (strcasecmp(share,"IPC$")==0) {
fstrcpy(cli->dev, "IPC");
}
- /* only grab the device if we have a recent protocol level */
if (cli->protocol >= PROTOCOL_NT1 &&
smb_buflen(cli->inbuf) == 3) {
/* almost certainly win95 - enable bug fixes */
@@ -844,7 +839,8 @@ BOOL cli_negprot(struct cli_state *cli)
cli->writebraw_supported = True;
}
/* work out if they sent us a workgroup */
- if (smb_buflen(cli->inbuf) > 8) {
+ if (!(cli->capabilities & CAP_EXTENDED_SECURITY) &&
+ smb_buflen(cli->inbuf) > 8) {
clistr_pull(cli, cli->server_domain,
smb_buf(cli->inbuf)+8, sizeof(cli->server_domain),
smb_buflen(cli->inbuf)-8, STR_UNICODE|STR_NOALIGN);