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/libsmb/pwd_cache.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/libsmb/pwd_cache.c')
-rw-r--r-- | source3/libsmb/pwd_cache.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source3/libsmb/pwd_cache.c b/source3/libsmb/pwd_cache.c index 420b49ed2e..37a07a0001 100644 --- a/source3/libsmb/pwd_cache.c +++ b/source3/libsmb/pwd_cache.c @@ -145,8 +145,7 @@ void pwd_set_nullpwd(struct pwd_info *pwd) void pwd_set_cleartext(struct pwd_info *pwd, char *clr) { pwd_init(pwd); - fstrcpy(pwd->password, clr); - unix_to_dos(pwd->password,True); + push_ascii_fstring(pwd->password, clr); pwd->cleartext = True; pwd->null_pwd = False; pwd->crypted = False; @@ -157,13 +156,9 @@ void pwd_set_cleartext(struct pwd_info *pwd, char *clr) ****************************************************************************/ void pwd_get_cleartext(struct pwd_info *pwd, char *clr) { - if (pwd->cleartext) - { + if (pwd->cleartext) { fstrcpy(clr, pwd->password); - dos_to_unix(clr, True); - } - else - { + } else { clr[0] = 0; } } @@ -222,8 +217,7 @@ void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr) pwd_init(pwd); - pstrcpy(dos_passwd, clr); - unix_to_dos(dos_passwd, True); + push_ascii_pstring(dos_passwd, clr); nt_lm_owf_gen(dos_passwd, pwd->smb_nt_pwd, pwd->smb_lm_pwd); pwd->null_pwd = False; |