summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris PeBenito <pebenito@gentoo.org>2003-08-04 20:16:05 +0000
committerChris PeBenito <pebenito@gentoo.org>2003-08-04 20:16:05 +0000
commit9bfa9172f2e8a432ec998477e134c07685520c02 (patch)
tree19224ff8db5a096213598b765846ac7c3c7d8265 /sys-libs
parentmoved to glib-perl to avoid conflict with other glibs (diff)
downloadhistorical-9bfa9172f2e8a432ec998477e134c07685520c02.tar.gz
historical-9bfa9172f2e8a432ec998477e134c07685520c02.tar.bz2
historical-9bfa9172f2e8a432ec998477e134c07685520c02.zip
updated patch
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libselinux/ChangeLog6
-rw-r--r--sys-libs/libselinux/Manifest4
-rw-r--r--sys-libs/libselinux/files/libselinux-1.0-gentoo.diff261
3 files changed, 268 insertions, 3 deletions
diff --git a/sys-libs/libselinux/ChangeLog b/sys-libs/libselinux/ChangeLog
index 7d30a2482e54..dd9b1e36dc6a 100644
--- a/sys-libs/libselinux/ChangeLog
+++ b/sys-libs/libselinux/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-libs/libselinux
# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.1 2003/08/04 04:19:16 pebenito Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.2 2003/08/04 20:16:01 pebenito Exp $
+
+ 04 Aug 2003; Chris PeBenito <pebenito@gentoo.org>
+ files/libselinux-1.0-gentoo.diff:
+ Add on a NSA nullbyte patch to the gentoo patch
*libselinux-1.0 (03 Aug 2003)
diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest
index 7080c6dae6cb..6e07f17ac2e6 100644
--- a/sys-libs/libselinux/Manifest
+++ b/sys-libs/libselinux/Manifest
@@ -1,5 +1,5 @@
MD5 717f87e8763e0467b99cf5568fd27f91 libselinux-1.0.ebuild 746
MD5 36bf0405b9d81999a4c53df2e5b6c748 metadata.xml 270
-MD5 78302725e325e2da99beeb1ede503b67 ChangeLog 396
+MD5 6205210446e323e4bed09237fc3fd5ea ChangeLog 535
MD5 fa6cb6d507ae7a7c1b4ccc7e673d37cc files/digest-libselinux-1.0 62
-MD5 ee2480e816c5fb6bdc78e94cf0a4d1f5 files/libselinux-1.0-gentoo.diff 1242
+MD5 0618c08091c01107cf53015a85ac3fcb files/libselinux-1.0-gentoo.diff 8902
diff --git a/sys-libs/libselinux/files/libselinux-1.0-gentoo.diff b/sys-libs/libselinux/files/libselinux-1.0-gentoo.diff
index 5685fa0273ae..86d81bfb4b04 100644
--- a/sys-libs/libselinux/files/libselinux-1.0-gentoo.diff
+++ b/sys-libs/libselinux/files/libselinux-1.0-gentoo.diff
@@ -34,3 +34,264 @@ diff -urN libselinux-1.0.orig/utils/Makefile libselinux-1.0/utils/Makefile
override CFLAGS += -I../include
LDLIBS += -L../src -lselinux -lattr
+Index: libselinux/src/compute_av.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/compute_av.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 compute_av.c
+--- libselinux/src/compute_av.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/compute_av.c 17 Jul 2003 14:49:01 -0000
+@@ -37,7 +37,7 @@
+ goto out2;
+
+ memset(buf, 0, len);
+- ret = read(fd, buf, len);
++ ret = read(fd, buf, len-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/compute_create.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/compute_create.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 compute_create.c
+--- libselinux/src/compute_create.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/compute_create.c 17 Jul 2003 14:49:01 -0000
+@@ -35,7 +35,7 @@
+ goto out2;
+
+ memset(buf, 0, size);
+- ret = read(fd, buf, size);
++ ret = read(fd, buf, size-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/compute_relabel.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/compute_relabel.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 compute_relabel.c
+--- libselinux/src/compute_relabel.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/compute_relabel.c 17 Jul 2003 14:49:01 -0000
+@@ -35,7 +35,7 @@
+ goto out2;
+
+ memset(buf, 0, size);
+- ret = read(fd, buf, size);
++ ret = read(fd, buf, size-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/compute_user.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/compute_user.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 compute_user.c
+--- libselinux/src/compute_user.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/compute_user.c 17 Jul 2003 14:49:01 -0000
+@@ -36,7 +36,7 @@
+ goto out2;
+
+ memset(buf, 0, size);
+- ret = read(fd, buf, size);
++ ret = read(fd, buf, size-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/fgetfilecon.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/fgetfilecon.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 fgetfilecon.c
+--- libselinux/src/fgetfilecon.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/fgetfilecon.c 17 Jul 2003 14:49:01 -0000
+@@ -13,13 +13,13 @@
+ size_t size;
+ ssize_t ret;
+
+- size = INITCONTEXTLEN;
++ size = INITCONTEXTLEN+1;
+ buf = malloc(size);
+ if (!buf)
+ return -1;
+ memset(buf, 0, size);
+
+- ret = fgetxattr(fd, XATTR_NAME_SELINUX, buf, size);
++ ret = fgetxattr(fd, XATTR_NAME_SELINUX, buf, size-1);
+ if (ret < 0 && errno == ERANGE) {
+ char *newbuf;
+
+@@ -27,13 +27,14 @@
+ if (size < 0)
+ goto out;
+
++ size++;
+ newbuf = realloc(buf, size);
+ if (!newbuf)
+ goto out;
+
+ buf = newbuf;
+ memset(buf, 0, size);
+- ret = fgetxattr(fd, XATTR_NAME_SELINUX, buf, size);
++ ret = fgetxattr(fd, XATTR_NAME_SELINUX, buf, size-1);
+ }
+ out:
+ if (ret < 0)
+Index: libselinux/src/getcon.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/getcon.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 getcon.c
+--- libselinux/src/getcon.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/getcon.c 17 Jul 2003 14:49:01 -0000
+@@ -26,7 +26,7 @@
+ }
+ memset(buf, 0, size);
+
+- ret = read(fd, buf, size);
++ ret = read(fd, buf, size-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/getexeccon.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/getexeccon.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 getexeccon.c
+--- libselinux/src/getexeccon.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/getexeccon.c 17 Jul 2003 14:49:01 -0000
+@@ -26,7 +26,7 @@
+ }
+ memset(buf, 0, size);
+
+- ret = read(fd, buf, size);
++ ret = read(fd, buf, size-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/getfilecon.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/getfilecon.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 getfilecon.c
+--- libselinux/src/getfilecon.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/getfilecon.c 17 Jul 2003 14:49:01 -0000
+@@ -13,13 +13,13 @@
+ size_t size;
+ ssize_t ret;
+
+- size = INITCONTEXTLEN;
++ size = INITCONTEXTLEN+1;
+ buf = malloc(size);
+ if (!buf)
+ return -1;
+ memset(buf, 0, size);
+
+- ret = getxattr(path, XATTR_NAME_SELINUX, buf, size);
++ ret = getxattr(path, XATTR_NAME_SELINUX, buf, size-1);
+ if (ret < 0 && errno == ERANGE) {
+ char *newbuf;
+
+@@ -27,13 +27,14 @@
+ if (size < 0)
+ goto out;
+
++ size++;
+ newbuf = realloc(buf, size);
+ if (!newbuf)
+ goto out;
+
+ buf = newbuf;
+ memset(buf, 0, size);
+- ret = getxattr(path, XATTR_NAME_SELINUX, buf, size);
++ ret = getxattr(path, XATTR_NAME_SELINUX, buf, size-1);
+ }
+ out:
+ if (ret < 0)
+Index: libselinux/src/getfscreatecon.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/getfscreatecon.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 getfscreatecon.c
+--- libselinux/src/getfscreatecon.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/getfscreatecon.c 17 Jul 2003 14:49:01 -0000
+@@ -26,7 +26,7 @@
+ }
+ memset(buf, 0, size);
+
+- ret = read(fd, buf, size);
++ ret = read(fd, buf, size-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/getpidcon.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/getpidcon.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 getpidcon.c
+--- libselinux/src/getpidcon.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/getpidcon.c 17 Jul 2003 14:49:01 -0000
+@@ -30,7 +30,7 @@
+ }
+ memset(buf, 0, size);
+
+- ret = read(fd, buf, size);
++ ret = read(fd, buf, size-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/getprevcon.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/getprevcon.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 getprevcon.c
+--- libselinux/src/getprevcon.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/getprevcon.c 17 Jul 2003 14:49:01 -0000
+@@ -26,7 +26,7 @@
+ }
+ memset(buf, 0, size);
+
+- ret = read(fd, buf, size);
++ ret = read(fd, buf, size-1);
+ if (ret < 0)
+ goto out2;
+
+Index: libselinux/src/lgetfilecon.c
+===================================================================
+RCS file: /cvsroot/selinux/nsa/selinux-2.5/libselinux/src/lgetfilecon.c,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 lgetfilecon.c
+--- libselinux/src/lgetfilecon.c 14 Jul 2003 17:11:31 -0000 1.1.1.1
++++ libselinux/src/lgetfilecon.c 17 Jul 2003 14:49:01 -0000
+@@ -13,13 +13,13 @@
+ size_t size;
+ ssize_t ret;
+
+- size = INITCONTEXTLEN;
++ size = INITCONTEXTLEN+1;
+ buf = malloc(size);
+ if (!buf)
+ return -1;
+ memset(buf, 0, size);
+
+- ret = lgetxattr(path, XATTR_NAME_SELINUX, buf, size);
++ ret = lgetxattr(path, XATTR_NAME_SELINUX, buf, size-1);
+ if (ret < 0 && errno == ERANGE) {
+ char *newbuf;
+
+@@ -27,13 +27,14 @@
+ if (size < 0)
+ goto out;
+
++ size++;
+ newbuf = realloc(buf, size);
+ if (!newbuf)
+ goto out;
+
+ buf = newbuf;
+ memset(buf, 0, size);
+- ret = lgetxattr(path, XATTR_NAME_SELINUX, buf, size);
++ ret = lgetxattr(path, XATTR_NAME_SELINUX, buf, size-1);
+ }
+ out:
+ if (ret < 0)