From ce82f572f7967bd44f3d7ec633272bb943cfe187 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Apr 13 2005 19:12:02 +0000 Subject: - Fix selinux_policy_root man page --- diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 1131c2c..45ed4e4 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,43 +1,42 @@ -diff --exclude-from=exclude -N -u -r nsalibselinux/src/booleans.c libselinux-1.23.5/src/booleans.c ---- nsalibselinux/src/booleans.c 2005-03-29 21:55:23.000000000 -0500 -+++ libselinux-1.23.5/src/booleans.c 2005-04-12 08:48:47.000000000 -0400 -@@ -45,7 +45,8 @@ - char **n; - - assert(len); -- assert(selinux_mnt); -+ if (!selinux_mnt) -+ return -1; - - snprintf(path, sizeof path, "%s%s", selinux_mnt, SELINUX_BOOL_DIR); - *len = scandir(path, &namelist, &filename_select, -@@ -94,7 +95,8 @@ - int fd, len; - char *fname = NULL; - -- assert(selinux_mnt); -+ if (!selinux_mnt) -+ return -1; - - *buf = (char*)malloc(sizeof(char) * (STRBUF_SIZE + 1)); - if (!*buf) -@@ -164,7 +166,8 @@ - int fd, ret, len; - char buf[2], *fname; - -- assert(selinux_mnt); -+ if (!selinux_mnt) -+ return -1; - if ( value < 0 || value > 1 ) - return -1; - -@@ -203,7 +206,8 @@ - char buf[2]; - char path[PATH_MAX]; - -- assert(selinux_mnt); -+ if (!selinux_mnt) -+ return -1; - - snprintf(path, sizeof path, "%s/commit_pending_bools", selinux_mnt); - fd = open(path, O_WRONLY); +diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_policy_root.3 libselinux-1.23.7/man/man3/selinux_policy_root.3 +--- nsalibselinux/man/man3/selinux_policy_root.3 1969-12-31 19:00:00.000000000 -0500 ++++ libselinux-1.23.7/man/man3/selinux_policy_root.3 2005-04-13 15:02:22.000000000 -0400 +@@ -0,0 +1,17 @@ ++.TH "selinux_policy_root" "3" "25 May 2004" "dwalsh@redhat.com" "SE Linux API documentation" ++.SH "NAME" ++selinux_policy_root \- return the path of the SELinux policy files for this machine. ++.SH "SYNOPSIS" ++.B #include ++.sp ++.B char *selinux_policy_root(); ++.br ++ ++.SH "DESCRIPTION" ++.B selinux_policy_root ++Reads the contents of the /etc/selinux/config file to determine which policy files should be used for this machine. ++.SH "RETURN VALUE" ++On success, returns a directory path containing the SELinux policy files. ++On failure, NULL is returned. ++ ++ +diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_policyroot.3 libselinux-1.23.7/man/man3/selinux_policyroot.3 +--- nsalibselinux/man/man3/selinux_policyroot.3 2004-10-20 16:31:36.000000000 -0400 ++++ libselinux-1.23.7/man/man3/selinux_policyroot.3 1969-12-31 19:00:00.000000000 -0500 +@@ -1,17 +0,0 @@ +-.TH "selinux_policyroot" "3" "25 May 2004" "dwalsh@redhat.com" "SE Linux API documentation" +-.SH "NAME" +-selinux_policyroot \- return the path of the SELinux policy files for this machine. +-.SH "SYNOPSIS" +-.B #include +-.sp +-.B char *selinux_policyroot(); +-.br +- +-.SH "DESCRIPTION" +-.B selinux_policyroot +-Reads the contents of the /etc/selinux/config file to determine which policy files should be used for this machine. +-.SH "RETURN VALUE" +-On success, returns a directory path containing the SELinux policy files. +-On failure, NULL is returned. +- +- diff --git a/libselinux.spec b/libselinux.spec index cfbb3e2..17646de 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,10 +1,11 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 1.23.7 -Release: 1 +Release: 2 License: Public domain (uncopyrighted) Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz +Patch: libselinux-rhat.patch BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot @@ -34,6 +35,7 @@ needed for developing SELinux applications. %prep %setup -q +%patch -p1 -b .rhat %build make CFLAGS="-g %{optflags}" @@ -84,6 +86,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man8/* %changelog +* Wed Apr 13 2005 Dan Walsh 1.23.7-2 +- Fix selinux_policy_root man page + * Wed Apr 13 2005 Dan Walsh 1.23.7-1 - Change assert(selinux_mnt) to if (!selinux_mnt) return -1;