This is an automated email from the git hooks/post-receive script.
rharwood pushed a commit to branch master in repository gssproxy.
The following commit(s) were added to refs/heads/master by this push: new 3b77666 Fix handling of selinux context when NULL 3b77666 is described below
commit 3b77666d463105fc485c0f269feaf0ed1061a769 Author: Simo Sorce simo@redhat.com AuthorDate: Tue Apr 7 08:56:53 2020 -0400
Fix handling of selinux context when NULL
Fixes: #256 Signed-off-by: Simo Sorce simo@redhat.com Merges: #257 Reviewed-by: Robbie Harwood rharwood@redhat.com --- 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)); }
gss-proxy@lists.fedorahosted.org