- Fix selinux_policy_root man page

This commit is contained in:
Daniel J Walsh 2005-04-13 19:12:02 +00:00
parent b83512ff2c
commit ce82f572f7
2 changed files with 48 additions and 44 deletions

View File

@ -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 <selinux/selinux.h>
+.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 <selinux/selinux.h>
-.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.
-
-

View File

@ -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 <dwalsh@redhat.com> 1.23.7-2
- Fix selinux_policy_root man page
* Wed Apr 13 2005 Dan Walsh <dwalsh@redhat.com> 1.23.7-1
- Change assert(selinux_mnt) to if (!selinux_mnt) return -1;