mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
Use separate variable for client fetch in kdcpolicy
`client` is not intended to be modified as a parameter of the AS check function. Fixes an "incompatible pointer type" compiler warning. Signed-off-by: Robbie Harwood <rharwood@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
committed by
Florence Blanc-Renaud
parent
3ccf73bfd6
commit
ab4e910c52
@@ -23,6 +23,7 @@ ipa_kdcpolicy_check_as(krb5_context context, krb5_kdcpolicy_moddata moddata,
|
||||
struct ipadb_e_data *ied;
|
||||
struct ipadb_e_pol_limits *pol_limits = NULL;
|
||||
int valid_auth_indicators = 0;
|
||||
krb5_db_entry *client_actual = NULL;
|
||||
|
||||
*status = NULL;
|
||||
*lifetime_out = 0;
|
||||
@@ -32,13 +33,14 @@ ipa_kdcpolicy_check_as(krb5_context context, krb5_kdcpolicy_moddata moddata,
|
||||
if (ied == NULL || ied->magic != IPA_E_DATA_MAGIC) {
|
||||
/* e-data is not availble, getting user auth from LDAP */
|
||||
krb5_klog_syslog(LOG_INFO, "IPA kdcpolicy: client e_data not availble. Try fetching...");
|
||||
kerr = ipadb_get_principal(context, request->client, KRB5_KDB_FLAG_ALIAS_OK, &client);
|
||||
kerr = ipadb_get_principal(context, request->client,
|
||||
KRB5_KDB_FLAG_ALIAS_OK, &client_actual);
|
||||
if (kerr != 0) {
|
||||
krb5_klog_syslog(LOG_ERR, "IPA kdcpolicy: ipadb_find_principal failed.");
|
||||
return kerr;
|
||||
}
|
||||
|
||||
ied = (struct ipadb_e_data *)client->e_data;
|
||||
ied = (struct ipadb_e_data *)client_actual->e_data;
|
||||
if (ied == NULL && ied->magic != IPA_E_DATA_MAGIC) {
|
||||
krb5_klog_syslog(LOG_ERR, "IPA kdcpolicy: client e_data fetching failed.");
|
||||
return EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user