diff --git a/Fix-allocation-of-cred_store-to-have-two-extra-slots.patch b/Fix-allocation-of-cred_store-to-have-two-extra-slots.patch new file mode 100644 index 0000000..39876d2 --- /dev/null +++ b/Fix-allocation-of-cred_store-to-have-two-extra-slots.patch @@ -0,0 +1,30 @@ +From 015e13e242e3959809372b1b03f36938eb592021 Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Mon, 23 Jan 2017 13:28:56 -0500 +Subject: [PATCH] Fix allocation of cred_store to have two extra slots + +Signed-off-by: Robbie Harwood +--- + proxy/src/gp_creds.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/proxy/src/gp_creds.c b/proxy/src/gp_creds.c +index 95d5585..0e5532f 100644 +--- a/proxy/src/gp_creds.c ++++ b/proxy/src/gp_creds.c +@@ -411,9 +411,9 @@ static int gp_get_cred_environment(struct gp_call_ctx *gpcall, + return 0; + } + +- /* allocate 1 more than in source, just in case we need to add +- * an internal client_keytab element */ +- cs->elements = calloc(svc->krb5.store.count + 1, ++ /* allocate 2 more than in source, just in case we need to add ++ * an internal client_keytab element and ccache */ ++ cs->elements = calloc(svc->krb5.store.count + 2, + sizeof(gss_key_value_element_desc)); + if (!cs->elements) { + ret = ENOMEM; +-- +2.11.0 + diff --git a/gssproxy.spec b/gssproxy.spec index d19e566..0f0654c 100644 --- a/gssproxy.spec +++ b/gssproxy.spec @@ -1,6 +1,6 @@ Name: gssproxy Version: 0.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GSSAPI Proxy Group: System Environment/Libraries @@ -14,6 +14,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %global gpstatedir %{_localstatedir}/lib/gssproxy ### Patches ### +Patch1: Fix-allocation-of-cred_store-to-have-two-extra-slots.patch ### Dependencies ### Requires: krb5-libs >= 1.12.0 @@ -58,7 +59,7 @@ A proxy for GSSAPI credential handling %prep %setup -q -# patch +%patch1 -p2 -b .Fix-allocation-of-cred_store-to-have-two-extra-slots %build autoreconf -f -i @@ -119,6 +120,10 @@ rm -rf %{buildroot} %systemd_postun_with_restart gssproxy.service %changelog +* Mon Jan 23 2017 Robbie Harwood - 0.6.1-2 +- Fix allocation issue of cred store +- Resolves: #1415400 + * Fri Jan 20 2017 Robbie Harwood - 0.6.1-1 - New upstream release v0.6.1 - Resolves: #1415090