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 | debb471267960e56005a741817ebd227ecfc512a (patch) | |
tree | f8c3793c025aadf809d8a8b3126c05fcd442ec70 /source/smbd/chgpasswd.c | |
parent | cfd81e62c81dcb114e2c9f917a01168273bf75b0 (diff) | |
download | samba-debb471267960e56005a741817ebd227ecfc512a.tar.gz samba-debb471267960e56005a741817ebd227ecfc512a.tar.xz samba-debb471267960e56005a741817ebd227ecfc512a.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.
Diffstat (limited to 'source/smbd/chgpasswd.c')
-rw-r--r-- | source/smbd/chgpasswd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c index c6f6eca0bae..12e38f2a651 100644 --- a/source/smbd/chgpasswd.c +++ b/source/smbd/chgpasswd.c @@ -793,14 +793,12 @@ BOOL check_oem_password(char *user, /* * nt passwords are in unicode */ - int uni_pw_len = new_pw_len; - char *pw; - new_pw_len /= 2; - pw = dos_unistrn2((uint16 *)(&lmdata[512 - uni_pw_len]),new_pw_len); - memcpy(new_passwd, pw, new_pw_len + 1); + pull_ucs2(NULL, new_passwd, + (const smb_ucs2_t *)&lmdata[512 - new_pw_len], + new_passwd_size, new_pw_len, 0); } else { memcpy(new_passwd, &lmdata[512 - new_pw_len], new_pw_len); - new_passwd[new_pw_len] = '\0'; + new_passwd[new_pw_len] = 0; } /* |