From e578d4768eb27f32e24cfb39ad69717920799aab Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Dec 18 2007 18:34:06 +0000 Subject: - allocate space for the nul-terminator in the local pathname when looking up a file context, and properly free a previous context (Jose Plans, #426085) --- diff --git a/krb5-1.6.1-selinux-label.patch b/krb5-1.6.1-selinux-label.patch index cc377c1..fd2a6c1 100644 --- a/krb5-1.6.1-selinux-label.patch +++ b/krb5-1.6.1-selinux-label.patch @@ -693,16 +693,16 @@ the libkrb5support library depends on libselinux. + len = 0; + wd = getcwd(NULL, len); + if (wd == NULL) { -+ if (previous == NULL) { ++ if (previous != NULL) { + freecon(previous); + } + return NULL; + } -+ len = strlen(wd) + strlen(pathname) + 1; ++ len = strlen(wd) + 1 + strlen(pathname) + 1; + genpath = malloc(len); + if (genpath == NULL) { + free(wd); -+ if (previous == NULL) { ++ if (previous != NULL) { + freecon(previous); + } + return NULL; @@ -722,7 +722,7 @@ the libkrb5support library depends on libselinux. +#endif + if (matchpathcon(fullpath, mode, &next) != 0) { + free(genpath); -+ if (previous) { ++ if (previous != NULL) { + freecon(previous); + } + return NULL; @@ -736,7 +736,7 @@ the libkrb5support library depends on libselinux. +#endif + if (setfscreatecon(next) != 0) { + freecon(next); -+ if (previous) { ++ if (previous != NULL) { + freecon(previous); + } + return NULL; diff --git a/krb5.spec b/krb5.spec index cd187e1..f613307 100644 --- a/krb5.spec +++ b/krb5.spec @@ -15,7 +15,7 @@ Summary: The Kerberos network authentication system. Name: krb5 Version: 1.6.3 -Release: 2%{?dist} +Release: 3%{?dist} # Maybe we should explode from the now-available-to-everybody tarball instead? # http://web.mit.edu/kerberos/dist/krb5/1.6/krb5-1.6.2-signed.tar Source0: krb5-%{version}.tar.gz @@ -222,6 +222,10 @@ to obtain initial credentials from a KDC using a private key and a certificate. %changelog +* Tue Dec 18 2007 Nalin Dahyabhai 1.6.3-3 +- allocate space for the nul-terminator in the local pathname when looking up + a file context, and properly free a previous context (Jose Plans, #426085) + * Wed Dec 5 2007 Nalin Dahyabhai 1.6.3-2 - rebuild