libselinux/libselinux-rhat.patch
Daniel J Walsh 3898d8da39 - Update to Upstream
New man pages from Dan Walsh.
Update flask headers from refpolicy trunk from Dan Walsh.
2008-09-30 13:30:18 +00:00

133 lines
5.0 KiB
Diff

diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/matchpathcon.3 libselinux-2.0.71/man/man3/matchpathcon.3
--- nsalibselinux/man/man3/matchpathcon.3 2008-08-28 09:34:24.000000000 -0400
+++ libselinux-2.0.71/man/man3/matchpathcon.3 2008-09-26 10:21:43.000000000 -0400
@@ -18,6 +18,11 @@
.BI "void set_matchpathcon_flags(unsigned int " flags ");"
+.BI "int selinux_file_context_cmp(const security_context_t a,
+ const security_context_t b);"
+
+.BI "int selinux_file_context_verify(const char *path, mode_t mode);"
+
.SH "DESCRIPTION"
.B matchpathcon_init
loads the file contexts configuration specified by
@@ -111,6 +116,12 @@
.B MATCHPATHCON_BASEONLY
flag is set, then only the base file contexts configuration file
will be processed, not any dynamically generated entries or local customizations.
+.sp
+.B selinux_file_context_cmp
+compares two file contexts to see if their differences are "significant", the function runs the strcmp function ignoring the user componant of the file context.
+.sp
+.B selinux_file_context_verify
+compares the file context on disk to the system default.
.sp
.SH "RETURN VALUE"
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_file_context_cmp.3 libselinux-2.0.71/man/man3/selinux_file_context_cmp.3
--- nsalibselinux/man/man3/selinux_file_context_cmp.3 1969-12-31 19:00:00.000000000 -0500
+++ libselinux-2.0.71/man/man3/selinux_file_context_cmp.3 2008-09-26 10:21:43.000000000 -0400
@@ -0,0 +1 @@
+.so man3/matchpathcon.3
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man3/selinux_file_context_verify.3 libselinux-2.0.71/man/man3/selinux_file_context_verify.3
--- nsalibselinux/man/man3/selinux_file_context_verify.3 1969-12-31 19:00:00.000000000 -0500
+++ libselinux-2.0.71/man/man3/selinux_file_context_verify.3 2008-09-26 10:21:43.000000000 -0400
@@ -0,0 +1 @@
+.so man3/matchpathcon.3
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxconlist.8 libselinux-2.0.71/man/man8/selinuxconlist.8
--- nsalibselinux/man/man8/selinuxconlist.8 1969-12-31 19:00:00.000000000 -0500
+++ libselinux-2.0.71/man/man8/selinuxconlist.8 2008-09-26 10:21:43.000000000 -0400
@@ -0,0 +1,18 @@
+.TH "selinuxconlist" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation"
+.SH "NAME"
+selinuxconlist \- list all SELinux context reachable for user
+.SH "SYNOPSIS"
+.B selinuxconlist [-l level] user [context]
+
+.SH "DESCRIPTION"
+.B selinuxconlist
+reports the list of context reachable for user from the current context or specified context
+
+.B \-l level
+mcs/mls level
+
+.SH AUTHOR
+This manual page was written by Dan Walsh <dwalsh@redhat.com>.
+
+.SH "SEE ALSO"
+secon(8), selinuxdefcon(8)
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxdefcon.8 libselinux-2.0.71/man/man8/selinuxdefcon.8
--- nsalibselinux/man/man8/selinuxdefcon.8 1969-12-31 19:00:00.000000000 -0500
+++ libselinux-2.0.71/man/man8/selinuxdefcon.8 2008-09-26 10:21:43.000000000 -0400
@@ -0,0 +1,19 @@
+.TH "selinuxdefcon" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation"
+.SH "NAME"
+selinuxdefcon \- list default SELinux context for user
+
+.SH "SYNOPSIS"
+.B selinuxdefcon [-l level] user [fromcon]
+
+.SH "DESCRIPTION"
+.B seconlist
+reports the default context for the specified user from current context or specified context
+
+.B \-l level
+mcs/mls level
+
+.SH AUTHOR
+This manual page was written by Dan Walsh <dwalsh@redhat.com>.
+
+.SH "SEE ALSO"
+secon(8), selinuxconlist(8)
diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2.0.71/src/callbacks.c
--- nsalibselinux/src/callbacks.c 2008-08-28 09:34:24.000000000 -0400
+++ libselinux-2.0.71/src/callbacks.c 2008-09-26 10:21:43.000000000 -0400
@@ -16,6 +16,7 @@
{
int rc;
va_list ap;
+ if (is_selinux_enabled() == 0) return 0;
va_start(ap, fmt);
rc = vfprintf(stderr, fmt, ap);
va_end(ap);
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.71/src/matchpathcon.c
--- nsalibselinux/src/matchpathcon.c 2008-08-28 09:34:24.000000000 -0400
+++ libselinux-2.0.71/src/matchpathcon.c 2008-09-26 10:21:43.000000000 -0400
@@ -2,6 +2,7 @@
#include <string.h>
#include <errno.h>
#include <stdio.h>
+#include <syslog.h>
#include "selinux_internal.h"
#include "label_internal.h"
#include "callbacks.h"
@@ -57,7 +58,7 @@
{
va_list ap;
va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
+ vsyslog(LOG_ERR, fmt, ap);
va_end(ap);
}
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.71/utils/matchpathcon.c
--- nsalibselinux/utils/matchpathcon.c 2008-08-28 09:34:24.000000000 -0400
+++ libselinux-2.0.71/utils/matchpathcon.c 2008-09-26 10:21:43.000000000 -0400
@@ -106,12 +106,12 @@
if (verify) {
if (quiet) {
- if (selinux_file_context_verify(argv[i], 0))
+ if (selinux_file_context_verify(argv[i], mode))
continue;
else
exit(1);
}
- if (selinux_file_context_verify(argv[i], 0)) {
+ if (selinux_file_context_verify(argv[i], mode)) {
printf("%s verified.\n", argv[i]);
} else {
security_context_t con;