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/files
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/files')
-rw-r--r--sys-libs/libselinux/files/digest-libselinux-1.22-r11
-rw-r--r--sys-libs/libselinux/files/libselinux-1.22.diff55
2 files changed, 56 insertions, 0 deletions
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;