1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-30 17:49:30 +03:00

CVE-2022-32744 s4:kdc: Rename keytab_name -> kpasswd_keytab_name

This makes explicitly clear the purpose of this keytab.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15074

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Joseph Sutton
2022-05-26 16:36:30 +12:00
committed by Jule Anger
parent 0cb4100d16
commit d03021791b
4 changed files with 6 additions and 6 deletions

View File

@ -463,8 +463,8 @@ static void kdc_post_fork(struct task_server *task, struct process_details *pd)
return;
}
kdc->keytab_name = talloc_asprintf(kdc, "HDBGET:samba4:&%p", kdc->base_ctx);
if (kdc->keytab_name == NULL) {
kdc->kpasswd_keytab_name = talloc_asprintf(kdc, "HDBGET:samba4:&%p", kdc->base_ctx);
if (kdc->kpasswd_keytab_name == NULL) {
task_server_terminate(task,
"kdc: Failed to set keytab name",
true);

View File

@ -40,7 +40,7 @@ struct kdc_server {
struct ldb_context *samdb;
bool am_rodc;
uint32_t proxy_timeout;
const char *keytab_name;
const char *kpasswd_keytab_name;
void *private_data;
};

View File

@ -291,8 +291,8 @@ NTSTATUS mitkdc_task_init(struct task_server *task)
return NT_STATUS_INTERNAL_ERROR;
}
kdc->keytab_name = talloc_asprintf(kdc, "KDB:");
if (kdc->keytab_name == NULL) {
kdc->kpasswd_keytab_name = talloc_asprintf(kdc, "KDB:");
if (kdc->kpasswd_keytab_name == NULL) {
task_server_terminate(task,
"KDC: Out of memory",
true);

View File

@ -170,7 +170,7 @@ kdc_code kpasswd_process(struct kdc_server *kdc,
rv = cli_credentials_set_keytab_name(server_credentials,
kdc->task->lp_ctx,
kdc->keytab_name,
kdc->kpasswd_keytab_name,
CRED_SPECIFIED);
if (rv != 0) {
DBG_ERR("Failed to set credentials keytab name\n");