diff -Nru gssproxy-0.8.2/debian/changelog gssproxy-0.8.2/debian/changelog --- gssproxy-0.8.2/debian/changelog 2020-03-30 18:32:52.000000000 +0000 +++ gssproxy-0.8.2/debian/changelog 2021-06-30 18:44:13.000000000 +0000 @@ -1,3 +1,11 @@ +gssproxy (0.8.2-2ubuntu0.21.04.1) hirsute; urgency=medium + + * d/p/0001-Fix-handling-of-selinux-context-when-NULL.patch: + Fix handling of SELinux context when NULL. Do not segfault + when gssproxy is called by rpc.gssd. (LP: #1788459) + + -- Sergio Durigan Junior Wed, 30 Jun 2021 14:44:13 -0400 + gssproxy (0.8.2-2) unstable; urgency=medium * dirs: Install rcachedir, as referenced by the systemd file. (LP: #1867788) diff -Nru gssproxy-0.8.2/debian/control gssproxy-0.8.2/debian/control --- gssproxy-0.8.2/debian/control 2020-03-30 16:44:03.000000000 +0000 +++ gssproxy-0.8.2/debian/control 2021-06-30 18:44:13.000000000 +0000 @@ -1,7 +1,8 @@ Source: gssproxy Section: net Priority: optional -Maintainer: Robbie Harwood (frozencemetery) +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Robbie Harwood (frozencemetery) Uploaders: Dafydd Harries , Timo Aaltonen Standards-Version: 4.5.0 Homepage: https://pagure.io/gssproxy/ diff -Nru gssproxy-0.8.2/debian/patches/0001-Fix-handling-of-selinux-context-when-NULL.patch gssproxy-0.8.2/debian/patches/0001-Fix-handling-of-selinux-context-when-NULL.patch --- gssproxy-0.8.2/debian/patches/0001-Fix-handling-of-selinux-context-when-NULL.patch 1970-01-01 00:00:00.000000000 +0000 +++ gssproxy-0.8.2/debian/patches/0001-Fix-handling-of-selinux-context-when-NULL.patch 2021-06-30 18:42:59.000000000 +0000 @@ -0,0 +1,42 @@ +From: Simo Sorce +Date: Tue, 7 Apr 2020 08:56:53 -0400 +Subject: Fix handling of selinux context when NULL + +Fixes: #256 +Signed-off-by: Simo Sorce +Merges: #257 +Reviewed-by: Robbie Harwood + +Origin: upstream, https://github.com/gssapi/gssproxy/commit/3b77666d463105fc485c0f269feaf0ed1061a769 +Bug: https://pagure.io/gssproxy/issue/256 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gssproxy/+bug/1788459 +Reviewed-By: Sergio Durigan Junior +--- + src/gp_socket.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/gp_socket.c b/src/gp_socket.c +index 7a19ee5..9070928 100644 +--- a/src/gp_socket.c ++++ b/src/gp_socket.c +@@ -122,7 +122,9 @@ void gp_conn_free(struct gp_conn *conn) + close(conn->us.sd); + } + free(conn->program); +- SELINUX_context_free(conn->selinux_ctx); ++ if (conn->selinux_ctx) { ++ SELINUX_context_free(conn->selinux_ctx); ++ } + free(conn); + } + +@@ -635,7 +637,8 @@ void accept_sock_conn(verto_ctx *vctx, verto_ev *ev) + conn->creds.ucred.uid, + conn->creds.ucred.gid); + } +- if (conn->creds.type & CRED_TYPE_SELINUX) { ++ if ((conn->creds.type & CRED_TYPE_SELINUX) && ++ (conn->selinux_ctx != NULL)) { + GPDEBUG(" (context = %s)", + SELINUX_context_str(conn->selinux_ctx)); + } diff -Nru gssproxy-0.8.2/debian/patches/series gssproxy-0.8.2/debian/patches/series --- gssproxy-0.8.2/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ gssproxy-0.8.2/debian/patches/series 2021-06-30 18:42:59.000000000 +0000 @@ -0,0 +1 @@ +0001-Fix-handling-of-selinux-context-when-NULL.patch