summaryrefslogtreecommitdiffstats
path: root/source/libsmb/cliconnect.c
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
commit618989b386b5564ba140afdc17ce7a07040c3c4e (patch)
tree11cafdf2b56b3cbbe785ccd23bc062a14dcf9c66 /source/libsmb/cliconnect.c
parent48a848f748fb0961c67f17401e294ebf18fdcf1b (diff)
downloadsamba-618989b386b5564ba140afdc17ce7a07040c3c4e.tar.gz
samba-618989b386b5564ba140afdc17ce7a07040c3c4e.tar.xz
samba-618989b386b5564ba140afdc17ce7a07040c3c4e.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
Diffstat (limited to 'source/libsmb/cliconnect.c')
-rw-r--r--source/libsmb/cliconnect.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index a6632803b2f..f5d6c5a7f4a 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/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);