diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-10-15 12:49:27 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-10-17 13:17:26 +0200 |
commit | 1effcf610000b0f34dfb849ef80fc522d4394c7d (patch) | |
tree | 9e25a440278652868c58fc74b9ab5685074d1788 | |
parent | 4a25e68cd863318f18b2ca78cf6efa7a1921d33a (diff) | |
download | sssd-1effcf610000b0f34dfb849ef80fc522d4394c7d.tar.gz sssd-1effcf610000b0f34dfb849ef80fc522d4394c7d.tar.bz2 sssd-1effcf610000b0f34dfb849ef80fc522d4394c7d.zip |
heimdal: Add krb5_xfree to krb5_free_unparsed_name wrapper
krb5_free_unparsed_name is deprecated in heimdal.
Also use the wrapper in places where it is not yet used.
-rw-r--r-- | src/providers/krb5/krb5_child.c | 2 | ||||
-rw-r--r-- | src/tests/krb5_child-test.c | 6 | ||||
-rw-r--r-- | src/util/sss_krb5.c | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index 6d8269d7..1321f0c1 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -682,7 +682,7 @@ static errno_t add_ticket_times_and_upn_to_response(struct krb5_req *kr) ret = pam_add_response(kr->pd, SSS_KRB5_INFO_UPN, upn_len, (uint8_t *) upn); - krb5_free_unparsed_name(kr->ctx, upn); + sss_krb5_free_unparsed_name(kr->ctx, upn); if (ret != EOK) { DEBUG(1, ("pack_response_packet failed.\n")); goto done; diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c index 0c6b68b8..89abfd4c 100644 --- a/src/tests/krb5_child-test.c +++ b/src/tests/krb5_child-test.c @@ -333,8 +333,8 @@ print_creds(krb5_context kcontext, krb5_creds *cred, const char *defname) } done: - krb5_free_unparsed_name(kcontext, name); - krb5_free_unparsed_name(kcontext, sname); + sss_krb5_free_unparsed_name(kcontext, name); + sss_krb5_free_unparsed_name(kcontext, sname); } static errno_t @@ -381,7 +381,7 @@ print_ccache(const char *cc) ret = EOK; done: krb5_cc_close(kcontext, cache); - krb5_free_unparsed_name(kcontext, defname); + sss_krb5_free_unparsed_name(kcontext, defname); krb5_free_principal(kcontext, princ); krb5_free_context(kcontext); return ret; diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c index 6382c1aa..5f3177a9 100644 --- a/src/util/sss_krb5.c +++ b/src/util/sss_krb5.c @@ -535,7 +535,9 @@ void KRB5_CALLCONV sss_krb5_get_init_creds_opt_free (krb5_context context, void KRB5_CALLCONV sss_krb5_free_unparsed_name(krb5_context context, char *name) { -#ifdef HAVE_KRB5_FREE_UNPARSED_NAME +#ifdef HAVE_KRB5_XFREE + krb5_xfree(name); +#elif HAVE_KRB5_FREE_UNPARSED_NAME krb5_free_unparsed_name(context, name); #else if (name != NULL) { |