From ca172146105b1788afc4d3ef19d5a3f01183510f Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 9 Dec 2009 00:18:58 +0000 Subject: [PATCH] - if the result of our attempt to look up the context is NULL, either because the right function returned NULL or we failed to initialize the library, just skip it, as that's all we can do --- krb5-1.7-selinux-label.patch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/krb5-1.7-selinux-label.patch b/krb5-1.7-selinux-label.patch index cd4e9dd..106af6d 100644 --- a/krb5-1.7-selinux-label.patch +++ b/krb5-1.7-selinux-label.patch @@ -541,7 +541,7 @@ diff -up krb5-1.7/src/util/support/Makefile.in krb5-1.7/src/util/support/Makefil diff -up /dev/null krb5-1.7/src/util/support/selinux.c --- /dev/null 2009-06-04 10:34:55.169007373 -0400 +++ krb5-1.7/src/util/support/selinux.c 2009-06-04 13:47:20.000000000 -0400 -@@ -0,0 +1,340 @@ +@@ -0,0 +1,346 @@ +/* + * Copyright 2007,2008,2009 Red Hat, Inc. All Rights Reserved. + * @@ -683,6 +683,12 @@ diff -up /dev/null krb5-1.7/src/util/support/selinux.c + } +#endif + free(genpath); ++ if (configuredsc == NULL) { ++ if (previous != NULL) { ++ freecon(previous); ++ } ++ return NULL; ++ } + currentsc = NULL; + getcon(¤tsc); + if (currentsc != NULL) {