From e8346fc44d318a6baec064ee2b181b525bad6ad8 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sep 19 2005 17:36:11 +0000 Subject: - Fix patch call --- diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index cd49bd7..5a1dceb 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -14,6 +14,50 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h lib selinux_policy_root reads the /etc/selinux/config file and returns the directory path under which the compiled policy file and context configuration files exist. +diff --exclude-from=exclude -N -u -r nsalibselinux/src/get_context_list.c libselinux-1.26/src/get_context_list.c +--- nsalibselinux/src/get_context_list.c 2005-08-11 22:41:15.000000000 -0400 ++++ libselinux-1.26/src/get_context_list.c 2005-09-16 16:22:03.000000000 -0400 +@@ -288,6 +288,40 @@ + return strcmp(c1->con, c2->con); + } + ++int get_ordered_context_list_with_level (const char *user, ++ const char *level, ++ security_context_t fromcon, ++ security_context_t **list) ++{ ++ int rc; ++ int freefrom = 0; ++ context_t con; ++ ++ if (!level) ++ return get_ordered_context_list (user, fromcon, list); ++ ++ if (!fromcon) { ++ rc = getcon(&fromcon); ++ if (rc < 0) ++ return rc; ++ freefrom = 1; ++ } ++ ++ con=context_new(fromcon); ++ if (con) { ++ context_range_set(con, level); ++ rc = get_ordered_context_list (user, context_str(con), list); ++ context_free(con); ++ } ++ else ++ rc=-1; ++ ++ if (freefrom) ++ freecon(fromcon); ++ ++ return rc; ++} ++ + int get_ordered_context_list (const char *user, + security_context_t fromcon, + security_context_t **list) diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-1.26/src/matchpathcon.c --- nsalibselinux/src/matchpathcon.c 2005-08-24 09:07:11.000000000 -0400 +++ libselinux-1.26/src/matchpathcon.c 2005-09-16 15:54:01.000000000 -0400 diff --git a/libselinux.spec b/libselinux.spec index 1cf8be7..ce738bc 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,12 +1,11 @@ Summary: SELinux library and simple utilities Name: libselinux -Version: 1.26 -Release: 6 +Version: 1.27.1 +Release: 1 License: Public domain (uncopyrighted) Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz Prereq: libsetrans -Patch: libselinux-rhat.patch BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot @@ -36,7 +35,6 @@ needed for developing SELinux applications. %prep %setup -q -%patch -p1 -b .rhat %build make CFLAGS="-g %{optflags}"