diff options
author | Tim Potter <tpot@samba.org> | 2001-02-14 05:34:50 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-02-14 05:34:50 +0000 |
commit | 64172d82fcf1762a8bc938282919f9e3bd39675d (patch) | |
tree | d1aceb0a9bb586242c5a0eba36b5aacfe5b50ce2 /source3/passdb/secrets.c | |
parent | da20d4e5df3c908cc00bf31570892fa5f19853e7 (diff) | |
download | samba-64172d82fcf1762a8bc938282919f9e3bd39675d.tar.gz samba-64172d82fcf1762a8bc938282919f9e3bd39675d.tar.bz2 samba-64172d82fcf1762a8bc938282919f9e3bd39675d.zip |
Merge of i18n fixes from appliance branch. Samba can now talk to a network
with a PDC that has international netbios name and domain name. There's
still quite a bit of i18n stuff to fix though...
(This used to be commit 79045bd72ace9144e7dd73785b1d10a71b0d15aa)
Diffstat (limited to 'source3/passdb/secrets.c')
-rw-r--r-- | source3/passdb/secrets.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 9591474861..bfa1ed98ca 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -123,8 +123,14 @@ form a key for fetching a domain trust password char *trust_keystr(char *domain) { static fstring keystr; - slprintf(keystr,sizeof(keystr),"%s/%s", SECRETS_MACHINE_ACCT_PASS, domain); - dos_to_unix(keystr, True); /* Convert key to unix-codepage */ + fstring dos_domain; + + fstrcpy(dos_domain, domain); + unix_to_dos(dos_domain, True); + + slprintf(keystr,sizeof(keystr),"%s/%s", + SECRETS_MACHINE_ACCT_PASS, dos_domain); + return keystr; } @@ -138,7 +144,8 @@ BOOL secrets_fetch_trust_account_password(char *domain, uint8 ret_pwd[16], struct machine_acct_pass *pass; size_t size; - if (!(pass = secrets_fetch(trust_keystr(domain), &size)) || size != sizeof(*pass)) + if (!(pass = secrets_fetch(trust_keystr(domain), &size)) || + size != sizeof(*pass)) return False; if (pass_last_set_time) *pass_last_set_time = pass->mod_time; |