summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@fedoraproject.org>2007-12-18 18:34:06 +0000
committerNalin Dahyabhai <nalin@fedoraproject.org>2007-12-18 18:34:06 +0000
commit0aaa920daa1b8e8d9d56cbd5ef3bcd818c3a0be0 (patch)
tree0cf10841643c81c483e0a25656f1bbf4444b39f8
parentea868608c1dfd418a871e9f4be4b17c3de8a82bd (diff)
- 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)
-rw-r--r--krb5-1.6.1-selinux-label.patch10
-rw-r--r--krb5.spec6
2 files changed, 10 insertions, 6 deletions
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 <nalin@redhat.com> 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 <nalin@redhat.com> 1.6.3-2
- rebuild