From 87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 4 Jul 2001 07:15:53 +0000 Subject: The big character set handling changeover! This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a) --- source3/rpc_server/srv_netlog_nt.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/rpc_server/srv_netlog_nt.c') diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index bbda4060f2..14f3e1d211 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -202,8 +202,7 @@ uint32 _net_req_chal(pipes_struct *p, NET_Q_REQ_CHAL *q_u, NET_R_REQ_CHAL *r_u) if (!get_valid_user_struct(p->vuid)) return NT_STATUS_NO_SUCH_USER; - fstrcpy(mach_acct, dos_unistrn2(q_u->uni_logon_clnt.buffer, - q_u->uni_logon_clnt.uni_str_len)); + rpcstr_pull(mach_acct,q_u->uni_logon_clnt.buffer,sizeof(fstring),q_u->uni_logon_clnt.uni_str_len*2,0); strlower(mach_acct); fstrcat(mach_acct, "$"); @@ -357,8 +356,8 @@ uint32 _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *r_ DEBUG(5,("_net_srv_pwset: %d\n", __LINE__)); - pstrcpy(mach_acct, dos_unistrn2(q_u->clnt_id.login.uni_acct_name.buffer, - q_u->clnt_id.login.uni_acct_name.uni_str_len)); + rpcstr_pull(mach_acct,q_u->clnt_id.login.uni_acct_name.buffer, + sizeof(mach_acct),q_u->clnt_id.login.uni_acct_name.uni_str_len*2,0); DEBUG(3,("Server Password Set Wksta:[%s]\n", mach_acct)); @@ -592,7 +591,7 @@ uint32 _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_ /* check username exists */ - pstrcpy(nt_username, dos_unistrn2(uni_samlogon_user->buffer, uni_samlogon_user->uni_str_len)); + rpcstr_pull(nt_username,uni_samlogon_user->buffer,sizeof(nt_username),uni_samlogon_user->uni_str_len*2,0); DEBUG(3,("User:[%s]\n", nt_username)); -- cgit