mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
make sure we use consistent keys in secrets.tdb by uppercasing domain
names
This commit is contained in:
parent
0f75b6bd5b
commit
4cb7b6954b
@ -95,6 +95,7 @@ BOOL secrets_store_domain_sid(char *domain, DOM_SID *sid)
|
|||||||
fstring key;
|
fstring key;
|
||||||
|
|
||||||
slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
|
slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
|
||||||
|
strupper(key);
|
||||||
return secrets_store(key, sid, sizeof(DOM_SID));
|
return secrets_store(key, sid, sizeof(DOM_SID));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,6 +106,7 @@ BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid)
|
|||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
|
slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
|
||||||
|
strupper(key);
|
||||||
dyn_sid = (DOM_SID *)secrets_fetch(key, &size);
|
dyn_sid = (DOM_SID *)secrets_fetch(key, &size);
|
||||||
|
|
||||||
if (dyn_sid == NULL)
|
if (dyn_sid == NULL)
|
||||||
@ -131,6 +133,7 @@ char *trust_keystr(char *domain)
|
|||||||
|
|
||||||
slprintf(keystr,sizeof(keystr)-1,"%s/%s",
|
slprintf(keystr,sizeof(keystr)-1,"%s/%s",
|
||||||
SECRETS_MACHINE_ACCT_PASS, domain);
|
SECRETS_MACHINE_ACCT_PASS, domain);
|
||||||
|
strupper(keystr);
|
||||||
|
|
||||||
return keystr;
|
return keystr;
|
||||||
}
|
}
|
||||||
@ -147,6 +150,7 @@ char *trustdom_keystr(char *domain)
|
|||||||
static char* keystr;
|
static char* keystr;
|
||||||
|
|
||||||
asprintf(&keystr, "%s/%s", SECRETS_DOMTRUST_ACCT_PASS, domain);
|
asprintf(&keystr, "%s/%s", SECRETS_DOMTRUST_ACCT_PASS, domain);
|
||||||
|
strupper(keystr);
|
||||||
|
|
||||||
return keystr;
|
return keystr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user