- Fix patch call

This commit is contained in:
Daniel J Walsh 2005-09-19 17:36:11 +00:00
parent fedf8202cb
commit e8346fc44d
2 changed files with 46 additions and 4 deletions

View File

@ -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 selinux_policy_root reads the /etc/selinux/config file and returns
the directory path under which the compiled policy file and context the directory path under which the compiled policy file and context
configuration files exist. 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 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 --- 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 +++ libselinux-1.26/src/matchpathcon.c 2005-09-16 15:54:01.000000000 -0400

View File

@ -1,12 +1,11 @@
Summary: SELinux library and simple utilities Summary: SELinux library and simple utilities
Name: libselinux Name: libselinux
Version: 1.26 Version: 1.27.1
Release: 6 Release: 1
License: Public domain (uncopyrighted) License: Public domain (uncopyrighted)
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
Prereq: libsetrans Prereq: libsetrans
Patch: libselinux-rhat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
@ -36,7 +35,6 @@ needed for developing SELinux applications.
%prep %prep
%setup -q %setup -q
%patch -p1 -b .rhat
%build %build
make CFLAGS="-g %{optflags}" make CFLAGS="-g %{optflags}"