From a925159382ea4d99eb7540a11304eea5bdac0fbe Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 2 May 2006 18:49:41 +0000 Subject: [PATCH] - Add selinuxswig fixes - Stop using PAGE_SIZE and start using sysconf(_SC_PAGE_SIZE) --- libselinux-rhat.patch | 157 ++++++++++++++++++++++++++++++++++-------- libselinux.spec | 2 +- 2 files changed, 129 insertions(+), 30 deletions(-) diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 279fd9b..d7ec9ab 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,7 +1,15 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/canonicalize_context.c libselinux-1.30.3/src/canonicalize_context.c --- nsalibselinux/src/canonicalize_context.c 2005-11-08 09:34:17.000000000 -0500 -+++ libselinux-1.30.3/src/canonicalize_context.c 2006-05-02 14:11:27.000000000 -0400 -@@ -23,7 +23,7 @@ ++++ libselinux-1.30.3/src/canonicalize_context.c 2006-05-02 14:48:20.000000000 -0400 +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + #include +@@ -23,7 +22,7 @@ if (fd < 0) return -1; @@ -12,8 +20,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/canonicalize_context.c li ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_av.c libselinux-1.30.3/src/compute_av.c --- nsalibselinux/src/compute_av.c 2005-08-23 13:34:34.000000000 -0400 -+++ libselinux-1.30.3/src/compute_av.c 2006-05-02 14:11:33.000000000 -0400 -@@ -26,7 +26,7 @@ ++++ libselinux-1.30.3/src/compute_av.c 2006-05-02 14:48:22.000000000 -0400 +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + #include +@@ -26,7 +25,7 @@ if (fd < 0) return -1; @@ -24,8 +40,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_av.c libselinux-1 ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_create.c libselinux-1.30.3/src/compute_create.c --- nsalibselinux/src/compute_create.c 2005-08-23 13:34:34.000000000 -0400 -+++ libselinux-1.30.3/src/compute_create.c 2006-05-02 14:11:39.000000000 -0400 -@@ -25,7 +25,7 @@ ++++ libselinux-1.30.3/src/compute_create.c 2006-05-02 14:48:23.000000000 -0400 +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + #include +@@ -25,7 +24,7 @@ if (fd < 0) return -1; @@ -36,8 +60,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_create.c libselin ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_member.c libselinux-1.30.3/src/compute_member.c --- nsalibselinux/src/compute_member.c 2005-08-25 11:32:02.000000000 -0400 -+++ libselinux-1.30.3/src/compute_member.c 2006-05-02 14:11:55.000000000 -0400 -@@ -25,7 +25,7 @@ ++++ libselinux-1.30.3/src/compute_member.c 2006-05-02 14:48:25.000000000 -0400 +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + #include +@@ -25,7 +24,7 @@ if (fd < 0) return -1; @@ -48,8 +80,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_member.c libselin ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_relabel.c libselinux-1.30.3/src/compute_relabel.c --- nsalibselinux/src/compute_relabel.c 2005-08-25 11:32:02.000000000 -0400 -+++ libselinux-1.30.3/src/compute_relabel.c 2006-05-02 14:12:05.000000000 -0400 -@@ -25,7 +25,7 @@ ++++ libselinux-1.30.3/src/compute_relabel.c 2006-05-02 14:48:27.000000000 -0400 +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + #include +@@ -25,7 +24,7 @@ if (fd < 0) return -1; @@ -60,8 +100,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_relabel.c libseli ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_user.c libselinux-1.30.3/src/compute_user.c --- nsalibselinux/src/compute_user.c 2005-08-23 13:34:34.000000000 -0400 -+++ libselinux-1.30.3/src/compute_user.c 2006-05-02 14:13:15.000000000 -0400 -@@ -26,7 +26,7 @@ ++++ libselinux-1.30.3/src/compute_user.c 2006-05-02 14:48:32.000000000 -0400 +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + #include +@@ -26,7 +25,7 @@ if (fd < 0) return -1; @@ -72,8 +120,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/compute_user.c libselinux ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/enabled.c libselinux-1.30.3/src/enabled.c --- nsalibselinux/src/enabled.c 2005-08-23 13:34:34.000000000 -0400 -+++ libselinux-1.30.3/src/enabled.c 2006-05-02 14:13:20.000000000 -0400 -@@ -22,7 +22,7 @@ ++++ libselinux-1.30.3/src/enabled.c 2006-05-02 14:48:35.000000000 -0400 +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include + #include "policy.h" + +@@ -22,7 +21,7 @@ if (fd < 0) return -1; @@ -84,8 +140,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/enabled.c libselinux-1.30 enabled = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/getcon.c libselinux-1.30.3/src/getcon.c --- nsalibselinux/src/getcon.c 2005-08-23 13:34:34.000000000 -0400 -+++ libselinux-1.30.3/src/getcon.c 2006-05-02 14:13:24.000000000 -0400 -@@ -18,7 +18,7 @@ ++++ libselinux-1.30.3/src/getcon.c 2006-05-02 14:48:37.000000000 -0400 +@@ -4,7 +4,6 @@ + #include "selinux_internal.h" + #include + #include +-#include + #include "policy.h" + + int getcon_raw(security_context_t *context) +@@ -18,7 +17,7 @@ if (fd < 0) return -1; @@ -96,8 +160,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/getcon.c libselinux-1.30. ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/getexeccon.c libselinux-1.30.3/src/getexeccon.c --- nsalibselinux/src/getexeccon.c 2005-08-25 11:32:02.000000000 -0400 -+++ libselinux-1.30.3/src/getexeccon.c 2006-05-02 14:13:34.000000000 -0400 -@@ -18,7 +18,7 @@ ++++ libselinux-1.30.3/src/getexeccon.c 2006-05-02 14:48:39.000000000 -0400 +@@ -3,7 +3,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + +@@ -18,7 +17,7 @@ if (fd < 0) return -1; @@ -108,8 +180,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/getexeccon.c libselinux-1 ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/getfscreatecon.c libselinux-1.30.3/src/getfscreatecon.c --- nsalibselinux/src/getfscreatecon.c 2005-08-25 11:32:02.000000000 -0400 -+++ libselinux-1.30.3/src/getfscreatecon.c 2006-05-02 14:13:39.000000000 -0400 -@@ -18,7 +18,7 @@ ++++ libselinux-1.30.3/src/getfscreatecon.c 2006-05-02 14:48:41.000000000 -0400 +@@ -3,7 +3,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + +@@ -18,7 +17,7 @@ if (fd < 0) return -1; @@ -120,8 +200,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/getfscreatecon.c libselin ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/getpidcon.c libselinux-1.30.3/src/getpidcon.c --- nsalibselinux/src/getpidcon.c 2005-08-25 11:32:02.000000000 -0400 -+++ libselinux-1.30.3/src/getpidcon.c 2006-05-02 14:13:46.000000000 -0400 -@@ -22,7 +22,7 @@ ++++ libselinux-1.30.3/src/getpidcon.c 2006-05-02 14:48:43.000000000 -0400 +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include + #include "selinux_internal.h" + #include "policy.h" + +@@ -22,7 +21,7 @@ if (fd < 0) return -1; @@ -132,8 +220,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/getpidcon.c libselinux-1. ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/getprevcon.c libselinux-1.30.3/src/getprevcon.c --- nsalibselinux/src/getprevcon.c 2005-08-23 13:34:34.000000000 -0400 -+++ libselinux-1.30.3/src/getprevcon.c 2006-05-02 14:13:51.000000000 -0400 -@@ -18,7 +18,7 @@ ++++ libselinux-1.30.3/src/getprevcon.c 2006-05-02 14:48:45.000000000 -0400 +@@ -4,7 +4,6 @@ + #include "selinux_internal.h" + #include + #include +-#include + #include "policy.h" + + int getprevcon_raw(security_context_t *context) +@@ -18,7 +17,7 @@ if (fd < 0) return -1; @@ -144,9 +240,12 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/getprevcon.c libselinux-1 ret = -1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/init.c libselinux-1.30.3/src/init.c --- nsalibselinux/src/init.c 2005-12-14 14:16:46.000000000 -0500 -+++ libselinux-1.30.3/src/init.c 2006-05-02 14:18:48.000000000 -0400 -@@ -7,12 +7,14 @@ - #include ++++ libselinux-1.30.3/src/init.c 2006-05-02 14:48:04.000000000 -0400 +@@ -4,15 +4,16 @@ + #include + #include + #include +-#include #include #include +#include @@ -160,7 +259,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/init.c libselinux-1.30.3/ static void init_selinuxmnt(void) { -@@ -27,11 +29,12 @@ +@@ -27,11 +28,12 @@ if (!fp) return; @@ -175,7 +274,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/init.c libselinux-1.30.3/ memset(buf, 0, size); while(( bufp = fgets_unlocked(buf, size, fp))) -@@ -134,6 +137,7 @@ +@@ -134,6 +136,7 @@ static void init_lib(void) __attribute__ ((constructor)); static void init_lib(void) { diff --git a/libselinux.spec b/libselinux.spec index b4aff54..fc8e8b8 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -113,7 +113,7 @@ exit 0 %changelog * Tue May 2 2006 Dan Walsh 1.30.3-2 - Add selinuxswig fixes -- Stop using PAGE_SIZE and start using sysconfig(_SC_PAGE_SIZE) +- Stop using PAGE_SIZE and start using sysconf(_SC_PAGE_SIZE) * Fri Apr 14 2006 Dan Walsh 1.30.3-1 - Upgrade to latest from NSA