policycoreutils/policycoreutils-rhat.patch

62 lines
1.8 KiB
Diff
Raw Normal View History

--- policycoreutils-1.13.1/run_init/run_init.c.rhat 2004-06-02 15:20:37.000000000 -0400
+++ policycoreutils-1.13.1/run_init/run_init.c 2004-06-12 05:24:51.000000000 -0400
@@ -51,6 +51,7 @@
#include <ctype.h>
#include <libintl.h>
#include <locale.h>
+#include <limits.h>
#define _(msgid) gettext (msgid)
#ifndef PACKAGE
#define PACKAGE "policycoreutils" /* the name of this package lang translation */
@@ -60,7 +61,7 @@
where: <script> is the name of the init script to run,\n\
<args ...> are the arguments to that script.")
auto-import changelog data from policycoreutils-1.9-12.src.rpm * Tue Mar 23 2004 Dan Walsh <dwalsh@redhat.com> 1.9-12 - Remove setfiles-assoc patch - Fix restorecon to not crash on missing dir * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-11 - Eliminate trailing / in restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-10 - Add Verbosity check * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-9 - Change restorecon to not follow symlinks. It is too difficult and confusing - to figure out the file context for the file pointed to by a symlink. * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-8 - Fix restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-7 - Read restorecon patch * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-6 - Change genhomedircon to take POLICYSOURCEDIR from command line * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-5 - Add checkselinux - move fixfiles and restorecon to /sbin * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-4 - Restore patch of genhomedircon * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-3 - Add setfiles-assoc patch to try to freeup memory use * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-2 - Add fixlabels * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-1 - Update to latest from NSA * Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-8 - Increase the size of buffer accepted by setfiles to BUFSIZ. * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-7 - genhomedircon should complete even if it can't read /etc/default/useradd * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-6 - fix restorecon to relabel unlabled files. * Fri Mar 05 2004 Dan Walsh <dwalsh@redhat.com> 1.6-5 - Add genhomedircon from tresys - Fixed patch for restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-4 - exit out when selinux is not enabled * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3 - Fix minor bugs in restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2 - Add restorecon c program * Tue Feb 24 2004 Dan Walsh <dwalsh@redhat.com> 1.6-1 - Update to latest tarball from NSA * Thu Feb 19 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9 - Add sort patch * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt
2004-09-09 10:34:14 +00:00
-#define CONTEXT_FILE "/etc/security/initrc_context"
+#define CONTEXT_FILE "initrc_context"
#ifdef USE_PAM
auto-import changelog data from policycoreutils-1.9-12.src.rpm * Tue Mar 23 2004 Dan Walsh <dwalsh@redhat.com> 1.9-12 - Remove setfiles-assoc patch - Fix restorecon to not crash on missing dir * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-11 - Eliminate trailing / in restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-10 - Add Verbosity check * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-9 - Change restorecon to not follow symlinks. It is too difficult and confusing - to figure out the file context for the file pointed to by a symlink. * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-8 - Fix restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-7 - Read restorecon patch * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-6 - Change genhomedircon to take POLICYSOURCEDIR from command line * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-5 - Add checkselinux - move fixfiles and restorecon to /sbin * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-4 - Restore patch of genhomedircon * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-3 - Add setfiles-assoc patch to try to freeup memory use * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-2 - Add fixlabels * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-1 - Update to latest from NSA * Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-8 - Increase the size of buffer accepted by setfiles to BUFSIZ. * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-7 - genhomedircon should complete even if it can't read /etc/default/useradd * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-6 - fix restorecon to relabel unlabled files. * Fri Mar 05 2004 Dan Walsh <dwalsh@redhat.com> 1.6-5 - Add genhomedircon from tresys - Fixed patch for restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-4 - exit out when selinux is not enabled * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3 - Fix minor bugs in restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2 - Add restorecon c program * Tue Feb 24 2004 Dan Walsh <dwalsh@redhat.com> 1.6-1 - Update to latest tarball from NSA * Thu Feb 19 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9 - Add sort patch * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt
2004-09-09 10:34:14 +00:00
/************************************************************************
@@ -269,10 +270,11 @@
FILE* fp;
char buf[255], *bufp;
int buf_len;
-
- fp = fopen(CONTEXT_FILE, "r");
+ char context_file[PATH_MAX];
+ snprintf(context_file, sizeof(context_file)-1, "%s%s", selinux_default_context_path(), CONTEXT_FILE);
+ fp = fopen(context_file, "r");
if (!fp) {
- fprintf(stderr, _("Could not open file %s\n"), CONTEXT_FILE);
+ fprintf(stderr, _("Could not open file %s\n"), context_file);
return -1;
}
auto-import changelog data from policycoreutils-1.9-12.src.rpm * Tue Mar 23 2004 Dan Walsh <dwalsh@redhat.com> 1.9-12 - Remove setfiles-assoc patch - Fix restorecon to not crash on missing dir * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-11 - Eliminate trailing / in restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-10 - Add Verbosity check * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-9 - Change restorecon to not follow symlinks. It is too difficult and confusing - to figure out the file context for the file pointed to by a symlink. * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-8 - Fix restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-7 - Read restorecon patch * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-6 - Change genhomedircon to take POLICYSOURCEDIR from command line * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-5 - Add checkselinux - move fixfiles and restorecon to /sbin * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-4 - Restore patch of genhomedircon * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-3 - Add setfiles-assoc patch to try to freeup memory use * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-2 - Add fixlabels * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-1 - Update to latest from NSA * Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-8 - Increase the size of buffer accepted by setfiles to BUFSIZ. * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-7 - genhomedircon should complete even if it can't read /etc/default/useradd * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-6 - fix restorecon to relabel unlabled files. * Fri Mar 05 2004 Dan Walsh <dwalsh@redhat.com> 1.6-5 - Add genhomedircon from tresys - Fixed patch for restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-4 - exit out when selinux is not enabled * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3 - Fix minor bugs in restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2 - Add restorecon c program * Tue Feb 24 2004 Dan Walsh <dwalsh@redhat.com> 1.6-1 - Update to latest tarball from NSA * Thu Feb 19 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9 - Add sort patch * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt
2004-09-09 10:34:14 +00:00
@@ -299,7 +301,7 @@
}
out:
fclose(fp);
- fprintf(stderr, _("No context in file %s\n"), CONTEXT_FILE);
+ fprintf(stderr, _("No context in file %s\n"), context_file);
return -1;
} /* get_init_context() */
--- policycoreutils-1.13.1/restorecon/restorecon.8.rhat 2004-06-02 15:20:37.000000000 -0400
+++ policycoreutils-1.13.1/restorecon/restorecon.8 2004-06-14 11:50:57.279494592 -0400
@@ -21,7 +21,7 @@
.SH "OPTIONS"
.TP
.B \-n
-don't change any file labels.
+do not change any file labels.
.TP
.B \-v
show changes in file labels.
@@ -38,5 +38,5 @@
.SH "SEE ALSO"
.BR load_policy (8),
-.BR checkpolicy (8)
+.BR checkpolicy (8),
.BR setfiles (8)