diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-26 18:14:41 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-26 18:14:41 +0100 |
commit | cce04c606e7a91fcaf75c8efd7ca0cd4aa15ece9 (patch) | |
tree | 62f598c7a01e072cc52d166364bc3d2a94e85242 /source3/libsmb/cliconnect.c | |
parent | d30b6af9532c0ea4e9610b30d13e7a4d9b763834 (diff) | |
parent | d8f15e4efc00b9d509ff5761e9ca8ff5c6f443f7 (diff) | |
download | samba-cce04c606e7a91fcaf75c8efd7ca0cd4aa15ece9.tar.gz samba-cce04c606e7a91fcaf75c8efd7ca0cd4aa15ece9.tar.bz2 samba-cce04c606e7a91fcaf75c8efd7ca0cd4aa15ece9.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r-- | source3/libsmb/cliconnect.c | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 9e4266de5a..bc690f2e02 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -199,9 +199,12 @@ static NTSTATUS cli_session_setup_guest(struct cli_state *cli) cli->vuid = SVAL(cli->inbuf,smb_uid); p = smb_buf(cli->inbuf); - p += clistr_pull(cli, cli->server_os, p, sizeof(fstring), -1, STR_TERMINATE); - p += clistr_pull(cli, cli->server_type, p, sizeof(fstring), -1, STR_TERMINATE); - p += clistr_pull(cli, cli->server_domain, p, sizeof(fstring), -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_os, p, sizeof(fstring), + -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_type, p, sizeof(fstring), + -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_domain, p, sizeof(fstring), + -1, STR_TERMINATE); if (strstr(cli->server_type, "Samba")) { cli->is_samba = True; @@ -276,9 +279,12 @@ static NTSTATUS cli_session_setup_plaintext(struct cli_state *cli, cli->vuid = SVAL(cli->inbuf,smb_uid); p = smb_buf(cli->inbuf); - p += clistr_pull(cli, cli->server_os, p, sizeof(fstring), -1, STR_TERMINATE); - p += clistr_pull(cli, cli->server_type, p, sizeof(fstring), -1, STR_TERMINATE); - p += clistr_pull(cli, cli->server_domain, p, sizeof(fstring), -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_os, p, sizeof(fstring), + -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_type, p, sizeof(fstring), + -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_domain, p, sizeof(fstring), + -1, STR_TERMINATE); fstrcpy(cli->user_name, user); if (strstr(cli->server_type, "Samba")) { @@ -426,9 +432,12 @@ static NTSTATUS cli_session_setup_nt1(struct cli_state *cli, const char *user, cli->vuid = SVAL(cli->inbuf,smb_uid); p = smb_buf(cli->inbuf); - p += clistr_pull(cli, cli->server_os, p, sizeof(fstring), -1, STR_TERMINATE); - p += clistr_pull(cli, cli->server_type, p, sizeof(fstring), -1, STR_TERMINATE); - p += clistr_pull(cli, cli->server_domain, p, sizeof(fstring), -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_os, p, sizeof(fstring), + -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_type, p, sizeof(fstring), + -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_domain, p, sizeof(fstring), + -1, STR_TERMINATE); if (strstr(cli->server_type, "Samba")) { cli->is_samba = True; @@ -512,11 +521,13 @@ static DATA_BLOB cli_session_setup_blob_receive(struct cli_state *cli) blob2 = data_blob(p, SVAL(cli->inbuf, smb_vwv3)); p += blob2.length; - p += clistr_pull(cli, cli->server_os, p, sizeof(fstring), -1, STR_TERMINATE); + p += clistr_pull(cli->inbuf, cli->server_os, p, sizeof(fstring), + -1, STR_TERMINATE); /* w2k with kerberos doesn't properly null terminate this field */ len = smb_bufrem(cli->inbuf, p); - p += clistr_pull(cli, cli->server_type, p, sizeof(fstring), len, 0); + p += clistr_pull(cli->inbuf, cli->server_type, p, sizeof(fstring), + len, 0); return blob2; } @@ -1178,7 +1189,8 @@ bool cli_send_tconX(struct cli_state *cli, if (cli_is_error(cli)) return False; - clistr_pull(cli, cli->dev, smb_buf(cli->inbuf), sizeof(fstring), -1, STR_TERMINATE|STR_ASCII); + clistr_pull(cli->inbuf, cli->dev, smb_buf(cli->inbuf), sizeof(fstring), + -1, STR_TERMINATE|STR_ASCII); if (cli->protocol >= PROTOCOL_NT1 && smb_buflen(cli->inbuf) == 3) { @@ -1350,7 +1362,7 @@ NTSTATUS cli_negprot_recv(struct async_req *req) /* work out if they sent us a workgroup */ if (!(cli->capabilities & CAP_EXTENDED_SECURITY) && smb_buflen(cli->inbuf) > 8) { - clistr_pull(cli, cli->server_domain, + clistr_pull(cli->inbuf, cli->server_domain, bytes+8, sizeof(cli->server_domain), num_bytes-8, STR_UNICODE|STR_NOALIGN); |