summaryrefslogtreecommitdiffstats
path: root/source/rpc_client
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-07-10 17:02:02 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-07-10 17:02:02 +0000
commitcf1d1cd9d6362f6e32ed9c2f6d2f6f25c47705ad (patch)
tree99a9f989f835d9af864b35eec4a9fa527223e698 /source/rpc_client
parent22ea0770d87b2faece2e5dfc098ccf27f4da155f (diff)
downloadsamba-cf1d1cd9d6362f6e32ed9c2f6d2f6f25c47705ad.tar.gz
samba-cf1d1cd9d6362f6e32ed9c2f6d2f6f25c47705ad.tar.xz
samba-cf1d1cd9d6362f6e32ed9c2f6d2f6f25c47705ad.zip
This fixes security=domain, which has been broke since the big charset
changeover. For my own sainity I have created a new function to fill out both the header and buffer for a string in an RPC struct. This DOES NOT take a length argument, only the actual string to be placed. The RPC code is currently littered with code that does init_uni_hdr() followed immidiatly by init_unistr2(), and often the length argument is wrong. (It was for the code I changed, even before the charset stuff). Another bug where we made strings AT LEAST MAX_UNICODE_LEN long hid this bug. This works for loopback connections to Samba, and can't be any more broke than it was before :-). (We had double and revese conversions, fun...). In particular this makes us multibyte complient. In any case, if there are no objections I will slowly convert other bits of code to the same system.
Diffstat (limited to 'source/rpc_client')
-rw-r--r--source/rpc_client/cli_login.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/rpc_client/cli_login.c b/source/rpc_client/cli_login.c
index f46aa7b08f2..3ac47626283 100644
--- a/source/rpc_client/cli_login.c
+++ b/source/rpc_client/cli_login.c
@@ -160,20 +160,13 @@ BOOL cli_nt_login_network(struct cli_state *cli, char *domain, char *username,
char *lm_chal_resp, char *nt_chal_resp,
NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3)
{
- fstring dos_wksta_name, dos_username, dos_domain;
DEBUG(5,("cli_nt_login_network: %d\n", __LINE__));
/* indicate a "network" login */
ctr->switch_value = NET_LOGON_TYPE;
- clistr_pull(cli, dos_wksta_name, cli->clnt_name_slash, sizeof(dos_wksta_name), 0, STR_TERMINATE);
-
- clistr_pull(cli, dos_username, username, sizeof(dos_username), 0, STR_TERMINATE);
-
- clistr_pull(cli, dos_domain, username, sizeof(dos_domain), 0, STR_TERMINATE);
-
/* Create the structure needed for SAM logon. */
- init_id_info2(&ctr->auth.id2, dos_domain, 0, smb_userid_low, 0,
- dos_username, dos_wksta_name,
+ init_id_info2(&ctr->auth.id2, domain, 0, smb_userid_low, 0,
+ username, cli->clnt_name_slash,
(uchar *)lm_chal, (uchar *)lm_chal_resp,
(uchar *)nt_chal_resp);