- 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 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/src/booleans.c 2005-03-29 21:55:23.000000000 -0500 --- nsalibselinux/man/man3/selinux_policy_root.3 1969-12-31 19:00:00.000000000 -0500
+++ libselinux-1.23.5/src/booleans.c 2005-04-12 08:48:47.000000000 -0400 +++ libselinux-1.23.7/man/man3/selinux_policy_root.3 2005-04-13 15:02:22.000000000 -0400
@@ -45,7 +45,8 @@ @@ -0,0 +1,17 @@
char **n; +.TH "selinux_policy_root" "3" "25 May 2004" "dwalsh@redhat.com" "SE Linux API documentation"
+.SH "NAME"
assert(len); +selinux_policy_root \- return the path of the SELinux policy files for this machine.
- assert(selinux_mnt); +.SH "SYNOPSIS"
+ if (!selinux_mnt) +.B #include <selinux/selinux.h>
+ return -1; +.sp
+.B char *selinux_policy_root();
snprintf(path, sizeof path, "%s%s", selinux_mnt, SELINUX_BOOL_DIR); +.br
*len = scandir(path, &namelist, &filename_select, +
@@ -94,7 +95,8 @@ +.SH "DESCRIPTION"
int fd, len; +.B selinux_policy_root
char *fname = NULL; +Reads the contents of the /etc/selinux/config file to determine which policy files should be used for this machine.
+.SH "RETURN VALUE"
- assert(selinux_mnt); +On success, returns a directory path containing the SELinux policy files.
+ if (!selinux_mnt) +On failure, NULL is returned.
+ return -1; +
+
*buf = (char*)malloc(sizeof(char) * (STRBUF_SIZE + 1)); diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_policyroot.3 libselinux-1.23.7/man/man3/selinux_policyroot.3
if (!*buf) --- nsalibselinux/man/man3/selinux_policyroot.3 2004-10-20 16:31:36.000000000 -0400
@@ -164,7 +166,8 @@ +++ libselinux-1.23.7/man/man3/selinux_policyroot.3 1969-12-31 19:00:00.000000000 -0500
int fd, ret, len; @@ -1,17 +0,0 @@
char buf[2], *fname; -.TH "selinux_policyroot" "3" "25 May 2004" "dwalsh@redhat.com" "SE Linux API documentation"
-.SH "NAME"
- assert(selinux_mnt); -selinux_policyroot \- return the path of the SELinux policy files for this machine.
+ if (!selinux_mnt) -.SH "SYNOPSIS"
+ return -1; -.B #include <selinux/selinux.h>
if ( value < 0 || value > 1 ) -.sp
return -1; -.B char *selinux_policyroot();
-.br
@@ -203,7 +206,8 @@ -
char buf[2]; -.SH "DESCRIPTION"
char path[PATH_MAX]; -.B selinux_policyroot
-Reads the contents of the /etc/selinux/config file to determine which policy files should be used for this machine.
- assert(selinux_mnt); -.SH "RETURN VALUE"
+ if (!selinux_mnt) -On success, returns a directory path containing the SELinux policy files.
+ return -1; -On failure, NULL is returned.
-
snprintf(path, sizeof path, "%s/commit_pending_bools", selinux_mnt); -
fd = open(path, O_WRONLY);

View File

@ -1,10 +1,11 @@
Summary: SELinux library and simple utilities Summary: SELinux library and simple utilities
Name: libselinux Name: libselinux
Version: 1.23.7 Version: 1.23.7
Release: 1 Release: 2
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
Patch: libselinux-rhat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
@ -34,6 +35,7 @@ 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}"
@ -84,6 +86,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %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 * Wed Apr 13 2005 Dan Walsh <dwalsh@redhat.com> 1.23.7-1
- Change assert(selinux_mnt) to if (!selinux_mnt) return -1; - Change assert(selinux_mnt) to if (!selinux_mnt) return -1;