summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris PeBenito <pebenito@gentoo.org>2005-05-08 23:02:28 +0000
committerChris PeBenito <pebenito@gentoo.org>2005-05-08 23:02:28 +0000
commit35976e24524400a545a716eaee7fbdd009579847 (patch)
treebac7d654a245b1b723a91da351563f306ac68d49 /sys-libs/libselinux
parentfixed (diff)
downloadgentoo-2-35976e24524400a545a716eaee7fbdd009579847.tar.gz
gentoo-2-35976e24524400a545a716eaee7fbdd009579847.tar.bz2
gentoo-2-35976e24524400a545a716eaee7fbdd009579847.zip
a couple of fixes, incl. one for #91921
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'sys-libs/libselinux')
-rw-r--r--sys-libs/libselinux/ChangeLog8
-rw-r--r--sys-libs/libselinux/files/digest-libselinux-1.22-r11
-rw-r--r--sys-libs/libselinux/files/libselinux-1.22.diff55
-rw-r--r--sys-libs/libselinux/libselinux-1.22-r1.ebuild43
4 files changed, 106 insertions, 1 deletions
diff --git a/sys-libs/libselinux/ChangeLog b/sys-libs/libselinux/ChangeLog
index 78d39e4354d4..08d25ff306a2 100644
--- a/sys-libs/libselinux/ChangeLog
+++ b/sys-libs/libselinux/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-libs/libselinux
# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.30 2005/05/01 22:11:02 spb Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.31 2005/05/08 23:02:28 pebenito Exp $
+
+*libselinux-1.22-r1 (08 May 2005)
+
+ 08 May 2005; Chris PeBenito <pebenito@gentoo.org>
+ +files/libselinux-1.22.diff, +libselinux-1.22-r1.ebuild:
+ A couple fixes, including one for bug #91921.
01 May 2005; Stephen Bennett <spb@gentoo.org> libselinux-1.22.ebuild:
Mark ~mips.
diff --git a/sys-libs/libselinux/files/digest-libselinux-1.22-r1 b/sys-libs/libselinux/files/digest-libselinux-1.22-r1
new file mode 100644
index 000000000000..cc35c44f474d
--- /dev/null
+++ b/sys-libs/libselinux/files/digest-libselinux-1.22-r1
@@ -0,0 +1 @@
+MD5 43b7640652d1fd85e6ab3df9b873ddd3 libselinux-1.22.tgz 81142
diff --git a/sys-libs/libselinux/files/libselinux-1.22.diff b/sys-libs/libselinux/files/libselinux-1.22.diff
new file mode 100644
index 000000000000..b6040c971c99
--- /dev/null
+++ b/sys-libs/libselinux/files/libselinux-1.22.diff
@@ -0,0 +1,55 @@
+--- libselinux-1.22.orig/src/matchpathcon.c 2005-04-04 15:01:14.000000000 +0200
++++ libselinux-1.22/src/matchpathcon.c 2005-04-04 15:01:23.000000000 +0200
+@@ -29,7 +29,10 @@
+
+ void set_matchpathcon_printf(void (*f)(const char *fmt, ...))
+ {
+- myprintf = f;
++ if (f)
++ myprintf = f;
++ else
++ myprintf = &default_printf;
+ }
+
+ static int default_invalidcon(const char *path, unsigned lineno, char *context)
+@@ -45,7 +48,10 @@
+
+ void set_matchpathcon_invalidcon(int (*f)(const char *p, unsigned l, char *c))
+ {
+- myinvalidcon = f;
++ if (f)
++ myinvalidcon = f;
++ else
++ myinvalidcon = &default_invalidcon;
+ }
+
+ /*
+@@ -324,6 +324,9 @@
+ file_spec_t *fl, *tmp;
+ int h;
+
++ if (!fl_head)
++ return;
++
+ for (h = 0; h < HASH_BUCKETS; h++) {
+ fl = fl_head[h].next;
+ while (fl) {
+diff -rNu libselinux-1.22.orig/utils/getconlist.c libselinux-1.22/utils/getconlist.c
+--- libselinux-1.22.orig/utils/getconlist.c 2004-11-01 15:21:46.000000000 +0100
++++ libselinux-1.22/utils/getconlist.c 2005-03-29 13:13:13.000000000 +0200
+@@ -38,10 +38,12 @@
+
+ /* Get the list and print it */
+ ret = get_ordered_context_list(argv[1], cur_context, &list);
+- for (i = 0; list[i]; i++)
+- puts (list[i]);
++ if(ret != -1) {
++ for (i = 0; list[i]; i++)
++ puts (list[i]);
++ freeconary(list);
++ }
+
+- freeconary(list);
+ free(usercon);
+
+ return 0;
diff --git a/sys-libs/libselinux/libselinux-1.22-r1.ebuild b/sys-libs/libselinux/libselinux-1.22-r1.ebuild
new file mode 100644
index 000000000000..6d2b4626e86f
--- /dev/null
+++ b/sys-libs/libselinux/libselinux-1.22-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-1.22-r1.ebuild,v 1.1 2005/05/08 23:02:28 pebenito Exp $
+
+IUSE=""
+
+inherit eutils multilib
+
+DESCRIPTION="SELinux userland library"
+HOMEPAGE="http://www.nsa.gov/selinux"
+SRC_URI="http://www.nsa.gov/selinux/archives/${P}.tgz"
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~mips"
+
+DEPEND="virtual/libc"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/libselinux-1.22.diff
+
+ # make portage CFLAGS work
+ sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" ${S}/src/Makefile \
+ || die "src Makefile CFLAGS fix failed."
+ sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" ${S}/utils/Makefile \
+ || die "utils Makefile CFLAGS fix failed."
+
+ # fix up paths for multilib
+ sed -i -e "/^LIBDIR/s/lib/$(get_libdir)/" ${S}/src/Makefile \
+ || die "Fix for multilib LIBDIR failed."
+ sed -i -e "/^SHLIBDIR/s/lib/$(get_libdir)/" ${S}/src/Makefile \
+ || die "Fix for multilib SHLIBDIR failed."
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install
+}