1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:kdc: Pass ‘samdb’ into samba_kdc_get_user_info_from_db()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-10-03 14:53:17 +13:00 committed by Andrew Bartlett
parent 8b518817e3
commit 024d8cf500
5 changed files with 11 additions and 1 deletions

View File

@ -1485,6 +1485,7 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
* they may fail to authenticate. * they may fail to authenticate.
*/ */
ret = samba_kdc_get_user_info_from_db(tmp_ctx, ret = samba_kdc_get_user_info_from_db(tmp_ctx,
kdc_db_ctx->samdb,
p, p,
msg, msg,
&user_info_dc); &user_info_dc);

View File

@ -485,6 +485,7 @@ krb5_error_code mit_samba_get_pac(struct mit_samba_context *smb_ctx,
} }
code = samba_kdc_get_user_info_from_db(tmp_ctx, code = samba_kdc_get_user_info_from_db(tmp_ctx,
server_entry->kdc_db_ctx->samdb,
skdc_entry, skdc_entry,
skdc_entry->msg, skdc_entry->msg,
&user_info_dc); &user_info_dc);
@ -915,6 +916,7 @@ krb5_error_code mit_samba_kpasswd_change_password(struct mit_samba_context *ctx,
} }
code = samba_kdc_get_user_info_from_db(tmp_ctx, code = samba_kdc_get_user_info_from_db(tmp_ctx,
ctx->db_ctx->samdb,
p, p,
p->msg, p->msg,
&user_info_dc); &user_info_dc);

View File

@ -1119,6 +1119,7 @@ NTSTATUS samba_kdc_get_claims_blob(TALLOC_CTX *mem_ctx,
} }
krb5_error_code samba_kdc_get_user_info_from_db(TALLOC_CTX *mem_ctx, krb5_error_code samba_kdc_get_user_info_from_db(TALLOC_CTX *mem_ctx,
struct ldb_context *samdb,
struct samba_kdc_entry *entry, struct samba_kdc_entry *entry,
const struct ldb_message *msg, const struct ldb_message *msg,
struct auth_user_info_dc **info_out) struct auth_user_info_dc **info_out)
@ -1130,7 +1131,7 @@ krb5_error_code samba_kdc_get_user_info_from_db(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx = entry->kdc_db_ctx->lp_ctx; struct loadparm_context *lp_ctx = entry->kdc_db_ctx->lp_ctx;
nt_status = authsam_make_user_info_dc(entry, nt_status = authsam_make_user_info_dc(entry,
entry->kdc_db_ctx->samdb, samdb,
lpcfg_netbios_name(lp_ctx), lpcfg_netbios_name(lp_ctx),
lpcfg_sam_name(lp_ctx), lpcfg_sam_name(lp_ctx),
lpcfg_sam_dnsname(lp_ctx), lpcfg_sam_dnsname(lp_ctx),
@ -1238,6 +1239,7 @@ static krb5_error_code samba_kdc_obtain_user_info_dc(TALLOC_CTX *mem_ctx,
* here. * here.
*/ */
ret = samba_kdc_get_user_info_from_db(mem_ctx, ret = samba_kdc_get_user_info_from_db(mem_ctx,
samdb,
entry.entry, entry.entry,
entry.entry->msg, entry.entry->msg,
&user_info_dc); &user_info_dc);
@ -2052,6 +2054,7 @@ static krb5_error_code samba_kdc_get_device_info_blob(TALLOC_CTX *mem_ctx,
frame = talloc_stackframe(); frame = talloc_stackframe();
code = samba_kdc_get_user_info_from_db(frame, code = samba_kdc_get_user_info_from_db(frame,
samdb,
device, device,
device->msg, device->msg,
&device_info_dc); &device_info_dc);
@ -2169,6 +2172,7 @@ krb5_error_code samba_kdc_verify_pac(TALLOC_CTX *mem_ctx,
} }
code = samba_kdc_get_user_info_from_db(tmp_ctx, code = samba_kdc_get_user_info_from_db(tmp_ctx,
samdb,
client.entry, client.entry,
client.entry->msg, client.entry->msg,
&user_info_dc); &user_info_dc);
@ -2926,6 +2930,7 @@ krb5_error_code samba_kdc_check_device(TALLOC_CTX *mem_ctx,
} }
} else { } else {
code = samba_kdc_get_user_info_from_db(frame, code = samba_kdc_get_user_info_from_db(frame,
samdb,
device.entry, device.entry,
device.entry->msg, device.entry->msg,
&device_info); &device_info);

View File

@ -108,6 +108,7 @@ krb5_error_code samba_krbtgt_is_in_db(const struct samba_kdc_entry *skdc_entry,
bool *is_trusted); bool *is_trusted);
krb5_error_code samba_kdc_get_user_info_from_db(TALLOC_CTX *mem_ctx, krb5_error_code samba_kdc_get_user_info_from_db(TALLOC_CTX *mem_ctx,
struct ldb_context *samdb,
struct samba_kdc_entry *entry, struct samba_kdc_entry *entry,
const struct ldb_message *msg, const struct ldb_message *msg,
struct auth_user_info_dc **info_out); struct auth_user_info_dc **info_out);

View File

@ -124,6 +124,7 @@ static krb5_error_code samba_wdc_get_pac(void *priv,
} }
ret = samba_kdc_get_user_info_from_db(mem_ctx, ret = samba_kdc_get_user_info_from_db(mem_ctx,
server_entry->kdc_db_ctx->samdb,
skdc_entry, skdc_entry,
skdc_entry->msg, skdc_entry->msg,
&user_info_dc); &user_info_dc);