ipa-kdb: support KDB DAL version 7.0

krb5-1.16 includes DAL version 7, which changes the signature of
audit_as_req to include local and remote address parameters.

This patch just enables building against the new DAL version and bumps
the minimum in freeipa.spec.in, but doesn't use the new information
for anything.

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Robbie Harwood 2017-10-09 11:39:09 -04:00 committed by Tomas Krizek
parent 71a8026496
commit 9f8700fcee
No known key found for this signature in database
GPG Key ID: 22A2A94B5E49415A
4 changed files with 18 additions and 3 deletions

View File

@ -709,7 +709,9 @@ kdb_vftabl kdb_function_table = {
}; };
#endif #endif
#if (KRB5_KDB_DAL_MAJOR_VERSION == 6) && defined(HAVE_KDB_FREEPRINCIPAL_EDATA) #if ((KRB5_KDB_DAL_MAJOR_VERSION == 6) || \
(KRB5_KDB_DAL_MAJOR_VERSION == 7)) && \
defined(HAVE_KDB_FREEPRINCIPAL_EDATA)
kdb_vftabl kdb_function_table = { kdb_vftabl kdb_function_table = {
.maj_ver = KRB5_KDB_DAL_MAJOR_VERSION, .maj_ver = KRB5_KDB_DAL_MAJOR_VERSION,
.min_ver = 1, .min_ver = 1,
@ -742,7 +744,8 @@ kdb_vftabl kdb_function_table = {
}; };
#endif #endif
#if (KRB5_KDB_DAL_MAJOR_VERSION != 5) && (KRB5_KDB_DAL_MAJOR_VERSION != 6) #if (KRB5_KDB_DAL_MAJOR_VERSION != 5) && \
(KRB5_KDB_DAL_MAJOR_VERSION != 6) && \
(KRB5_KDB_DAL_MAJOR_VERSION != 7)
#error unsupported DAL major version #error unsupported DAL major version
#endif #endif

View File

@ -326,6 +326,10 @@ krb5_error_code ipadb_check_allowed_to_delegate(krb5_context kcontext,
void ipadb_audit_as_req(krb5_context kcontext, void ipadb_audit_as_req(krb5_context kcontext,
krb5_kdc_req *request, krb5_kdc_req *request,
#if (KRB5_KDB_DAL_MAJOR_VERSION == 7)
const krb5_address *local_addr,
const krb5_address *remote_addr,
#endif
krb5_db_entry *client, krb5_db_entry *client,
krb5_db_entry *server, krb5_db_entry *server,
krb5_timestamp authtime, krb5_timestamp authtime,

View File

@ -26,6 +26,10 @@
void ipadb_audit_as_req(krb5_context kcontext, void ipadb_audit_as_req(krb5_context kcontext,
krb5_kdc_req *request, krb5_kdc_req *request,
#if (KRB5_KDB_DAL_MAJOR_VERSION == 7)
const krb5_address *local_addr,
const krb5_address *remote_addr,
#endif
krb5_db_entry *client, krb5_db_entry *client,
krb5_db_entry *server, krb5_db_entry *server,
krb5_timestamp authtime, krb5_timestamp authtime,

View File

@ -86,9 +86,13 @@ BuildRequires: openldap-devel
# For KDB DAL version, make explicit dependency so that increase of version # For KDB DAL version, make explicit dependency so that increase of version
# will cause the build to fail due to unsatisfied dependencies. # will cause the build to fail due to unsatisfied dependencies.
# DAL version change may cause code crash or memory leaks, it is better to fail early. # DAL version change may cause code crash or memory leaks, it is better to fail early.
%if 0%{?fedora} > 27
BuildRequires: krb5-kdb-version = 7.0
%else
%if 0%{?fedora} > 25 %if 0%{?fedora} > 25
BuildRequires: krb5-kdb-version = 6.1 BuildRequires: krb5-kdb-version = 6.1
%endif %endif
%endif
BuildRequires: krb5-devel >= %{krb5_version} BuildRequires: krb5-devel >= %{krb5_version}
# 1.27.4: xmlrpc_curl_xportparms.gssapi_delegation # 1.27.4: xmlrpc_curl_xportparms.gssapi_delegation
BuildRequires: xmlrpc-c-devel >= 1.27.4 BuildRequires: xmlrpc-c-devel >= 1.27.4