diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-07-04 07:15:53 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-07-04 07:15:53 +0000 |
commit | 87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 (patch) | |
tree | 3c302f710cbaa03e3c0d46549e8982771b12b8a5 /source3/rpc_server/srv_netlog_nt.c | |
parent | 9e9e73303ec10a64bd744b9b33f4e6cd7d394f03 (diff) | |
download | samba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.tar.gz samba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.tar.bz2 samba-87fbb7092b8f8b2f0db0f361c3d625e19de57cd9.zip |
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)
Diffstat (limited to 'source3/rpc_server/srv_netlog_nt.c')
-rw-r--r-- | source3/rpc_server/srv_netlog_nt.c | 9 |
1 files changed, 4 insertions, 5 deletions
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)); |