mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s4:kdc: Simplify samba_kdc_update_pac_blob() to take ldb_context as parameter
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
3dede18c5a
commit
7149eeaceb
@ -508,7 +508,6 @@ krb5_error_code mit_samba_reget_pac(struct mit_samba_context *ctx,
|
||||
DATA_BLOB *deleg_blob = NULL;
|
||||
struct samba_kdc_entry *client_skdc_entry = NULL;
|
||||
struct samba_kdc_entry *krbtgt_skdc_entry = NULL;
|
||||
struct samba_kdc_entry *server_skdc_entry = NULL;
|
||||
bool is_in_db = false;
|
||||
bool is_untrusted = false;
|
||||
size_t num_types = 0;
|
||||
@ -539,9 +538,6 @@ krb5_error_code mit_samba_reget_pac(struct mit_samba_context *ctx,
|
||||
if (server == NULL) {
|
||||
return EINVAL;
|
||||
}
|
||||
server_skdc_entry =
|
||||
talloc_get_type_abort(server->e_data,
|
||||
struct samba_kdc_entry);
|
||||
|
||||
if (krbtgt == NULL) {
|
||||
return EINVAL;
|
||||
@ -601,8 +597,7 @@ krb5_error_code mit_samba_reget_pac(struct mit_samba_context *ctx,
|
||||
|
||||
nt_status = samba_kdc_update_pac_blob(tmp_ctx,
|
||||
context,
|
||||
krbtgt_skdc_entry,
|
||||
server_skdc_entry,
|
||||
krbtgt_skdc_entry->kdc_db_ctx->samdb,
|
||||
*pac,
|
||||
pac_blob,
|
||||
pac_srv_sig,
|
||||
|
@ -747,8 +747,7 @@ NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
|
||||
NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
krb5_context context,
|
||||
struct samba_kdc_entry *krbtgt,
|
||||
struct samba_kdc_entry *server,
|
||||
struct ldb_context *samdb,
|
||||
const krb5_pac pac, DATA_BLOB *pac_blob,
|
||||
struct PAC_SIGNATURE_DATA *pac_srv_sig,
|
||||
struct PAC_SIGNATURE_DATA *pac_kdc_sig)
|
||||
@ -768,7 +767,7 @@ NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
* as the token might be generated by a trusted domain.
|
||||
*/
|
||||
nt_status = authsam_update_user_info_dc(mem_ctx,
|
||||
krbtgt->kdc_db_ctx->samdb,
|
||||
samdb,
|
||||
user_info_dc);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
return nt_status;
|
||||
|
@ -51,8 +51,7 @@ NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
|
||||
NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
krb5_context context,
|
||||
struct samba_kdc_entry *krbtgt,
|
||||
struct samba_kdc_entry *server,
|
||||
struct ldb_context *samdb,
|
||||
const krb5_pac pac, DATA_BLOB *pac_blob,
|
||||
struct PAC_SIGNATURE_DATA *pac_srv_sig,
|
||||
struct PAC_SIGNATURE_DATA *pac_kdc_sig);
|
||||
|
@ -186,7 +186,7 @@ static krb5_error_code samba_wdc_reget_pac(void *priv, krb5_context context,
|
||||
}
|
||||
|
||||
nt_status = samba_kdc_update_pac_blob(mem_ctx, context,
|
||||
krbtgt_skdc_entry, p,
|
||||
krbtgt_skdc_entry->kdc_db_ctx->samdb,
|
||||
*pac, pac_blob,
|
||||
pac_srv_sig, pac_kdc_sig);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user