From fdbc02588c2b929eed923ca1a4b586820f38eac6 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Sep 09 2004 07:43:01 +0000 Subject: auto-import libselinux-1.13.3-1 from libselinux-1.13.3-1.src.rpm --- diff --git a/.cvsignore b/.cvsignore index 4215907..d8b086e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libselinux-1.13.2.tgz +libselinux-1.13.3.tgz diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch new file mode 100644 index 0000000..b909e5e --- /dev/null +++ b/libselinux-rhat.patch @@ -0,0 +1,44 @@ +--- libselinux-1.13.3/src/selinux_config.c.rhat 2004-06-09 08:08:32.000000000 -0400 ++++ libselinux-1.13.3/src/selinux_config.c 2004-06-09 08:23:44.109508112 -0400 +@@ -34,6 +34,7 @@ + }; + + /* Old layout had fixed locations. */ ++#define SECURITYCONFIG "/etc/sysconfig/selinux" + #define SECURITYDIR "/etc/security" + static char *compat_file_paths[NEL] = { + SECURITYDIR "/selinux/policy", +@@ -52,6 +53,9 @@ + FILE *cfg = fopen(SELINUXCONFIG,"r"); + char buf[4097]; + int len=sizeof(SELINUXTAG)-1; ++ if (!cfg) { ++ cfg = fopen(SECURITYCONFIG,"r"); ++ } + if (cfg) { + while (fgets(buf, 4096, cfg)) { + if (strncmp(buf,SELINUXTAG,len)) +--- libselinux-1.13.3/utils/selinuxconfig.c.rhat 2004-06-09 08:08:32.000000000 -0400 ++++ libselinux-1.13.3/utils/selinuxconfig.c 2004-06-09 08:31:09.251836192 -0400 +@@ -6,6 +6,21 @@ + + int main(int argc __attribute__ ((unused)), char **argv) + { ++ int enforce; ++ if (selinux_getenforcemode(&enforce)==0) { ++ switch (enforce) { ++ case 1: ++ printf("selinux state=\"enforcing\"\n"); ++ break; ++ case 0: ++ printf("selinux state=\"permissive\"\n"); ++ break; ++ case -1: ++ printf("selinux state=\"disabled\"\n"); ++ break; ++ } ++ } ++ + printf("policypath=\"%s\"\n", selinux_policy_root()); + printf("default_type_path=\"%s\"\n", selinux_default_type_path()); + printf("default_context_path=\"%s\"\n", selinux_default_context_path()); diff --git a/libselinux.spec b/libselinux.spec index 2df6ae2..2d14cfd 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,6 +1,6 @@ Summary: SELinux library and simple utilities Name: libselinux -Version: 1.13.2 +Version: 1.13.3 Release: 1 License: Public domain (uncopyrighted) Group: System Environment/Libraries @@ -8,6 +8,7 @@ Source: http://www.nsa.gov/selinux/archives/libselinux-%{version}.tgz Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-buildroot Provides: libselinux.so +Patch: libselinux-rhat.patch %description Security-enhanced Linux is a patch of the Linux® kernel and a number @@ -35,7 +36,7 @@ needed for developing SELinux applications. %prep %setup -q - +%patch -p1 -b .rhat %build make diff --git a/sources b/sources index 6a6729e..c865f92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -239d1bbeeb27f880e25f43ff0d9a4459 libselinux-1.13.2.tgz +5d1a67bb52a156714618e97b3116833c libselinux-1.13.3.tgz