From 64172d82fcf1762a8bc938282919f9e3bd39675d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 14 Feb 2001 05:34:50 +0000 Subject: 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) --- source3/passdb/secrets.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source3/passdb/secrets.c') 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; -- cgit