* Mon Feb 2 2009 Dan Walsh <dwalsh@redhat.com> 2.0.57-16
- Fix restorecond to not complain on global diff - Update po files
This commit is contained in:
parent
8ffeaf4bdd
commit
f99d83ab74
File diff suppressed because it is too large
Load Diff
161856
policycoreutils-po.patch
161856
policycoreutils-po.patch
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/audit2allow policycoreutils-2.0.57/audit2allow/audit2allow
|
||||
--- nsapolicycoreutils/audit2allow/audit2allow 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/audit2allow/audit2allow 2008-12-15 15:39:08.000000000 -0500
|
||||
+++ policycoreutils-2.0.57/audit2allow/audit2allow 2009-02-02 08:33:36.000000000 -0500
|
||||
@@ -42,10 +42,10 @@
|
||||
from optparse import OptionParser
|
||||
|
||||
@ -50,7 +50,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po
|
||||
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/audit2allow.1 policycoreutils-2.0.57/audit2allow/audit2allow.1
|
||||
--- nsapolicycoreutils/audit2allow/audit2allow.1 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/audit2allow/audit2allow.1 2008-12-15 15:39:09.000000000 -0500
|
||||
+++ policycoreutils-2.0.57/audit2allow/audit2allow.1 2009-02-02 08:33:36.000000000 -0500
|
||||
@@ -44,9 +44,6 @@
|
||||
Note that all audit messages are not available via dmesg when
|
||||
auditd is running; use "ausearch -m avc | audit2allow" or "-a" instead.
|
||||
@ -76,7 +76,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po
|
||||
.B "\-v" | "\-\-verbose"
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.57/Makefile
|
||||
--- nsapolicycoreutils/Makefile 2008-09-22 13:25:07.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/Makefile 2008-12-01 15:20:08.000000000 -0500
|
||||
+++ policycoreutils-2.0.57/Makefile 2009-02-02 08:33:36.000000000 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-SUBDIRS = setfiles semanage load_policy newrole run_init secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po
|
||||
+SUBDIRS = setfiles semanage load_policy newrole run_init secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui
|
||||
@ -85,7 +85,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po
|
||||
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-2.0.57/newrole/newrole.c
|
||||
--- nsapolicycoreutils/newrole/newrole.c 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/newrole/newrole.c 2008-12-01 15:20:08.000000000 -0500
|
||||
+++ policycoreutils-2.0.57/newrole/newrole.c 2009-02-02 08:33:36.000000000 -0500
|
||||
@@ -553,7 +553,7 @@
|
||||
new_caps = cap_init();
|
||||
tmp_caps = cap_init();
|
||||
@ -104,10 +104,80 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po
|
||||
return -1;
|
||||
}
|
||||
rc |= cap_set_flag(new_caps, CAP_PERMITTED, 6, cap_list, CAP_SET);
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-2.0.57/restorecond/Makefile
|
||||
--- nsapolicycoreutils/restorecond/Makefile 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/restorecond/Makefile 2009-02-02 08:34:07.000000000 -0500
|
||||
@@ -20,7 +20,7 @@
|
||||
install -m 755 restorecond $(SBINDIR)
|
||||
install -m 644 restorecond.8 $(MANDIR)/man8
|
||||
-mkdir -p $(INITDIR)
|
||||
- install -m 644 restorecond.init $(INITDIR)/restorecond
|
||||
+ install -m 755 restorecond.init $(INITDIR)/restorecond
|
||||
-mkdir -p $(SELINUXDIR)
|
||||
install -m 600 restorecond.conf $(SELINUXDIR)/restorecond.conf
|
||||
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.57/restorecond/restorecond.c
|
||||
--- nsapolicycoreutils/restorecond/restorecond.c 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/restorecond/restorecond.c 2008-12-02 08:37:59.000000000 -0500
|
||||
@@ -283,6 +283,8 @@
|
||||
+++ policycoreutils-2.0.57/restorecond/restorecond.c 2009-02-02 08:34:07.000000000 -0500
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* restorecond
|
||||
*
|
||||
- * Copyright (C) 2006 Red Hat
|
||||
+ * Copyright (C) 2006-2009 Red Hat
|
||||
* see file 'COPYING' for use and warranty information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -75,7 +75,7 @@
|
||||
static int debug_mode = 0;
|
||||
static int verbose_mode = 0;
|
||||
|
||||
-static void restore(const char *filename);
|
||||
+static void restore(const char *filename, int exact);
|
||||
|
||||
struct watchList {
|
||||
struct watchList *next;
|
||||
@@ -113,12 +113,13 @@
|
||||
printf("%d: File=%s\n", wd, file);
|
||||
while (ptr != NULL) {
|
||||
if (ptr->wd == wd) {
|
||||
- if (strings_list_find(ptr->files, file) == 0) {
|
||||
+ int exact=0;
|
||||
+ if (strings_list_find(ptr->files, file, &exact) == 0) {
|
||||
char *path = NULL;
|
||||
if (asprintf(&path, "%s/%s", ptr->dir, file) <
|
||||
0)
|
||||
exitApp("Error allocating memory.");
|
||||
- restore(path);
|
||||
+ restore(path, exact);
|
||||
free(path);
|
||||
return 0;
|
||||
}
|
||||
@@ -155,7 +156,7 @@
|
||||
Set the file context to the default file context for this system.
|
||||
Same as restorecon.
|
||||
*/
|
||||
-static void restore(const char *filename)
|
||||
+static void restore(const char *filename, int exact)
|
||||
{
|
||||
int retcontext = 0;
|
||||
security_context_t scontext = NULL;
|
||||
@@ -181,9 +182,11 @@
|
||||
}
|
||||
|
||||
if (!(st.st_mode & S_IFDIR) && st.st_nlink > 1) {
|
||||
- syslog(LOG_ERR,
|
||||
- "Will not restore a file with more than one hard link (%s) %s\n",
|
||||
- filename, strerror(errno));
|
||||
+ if (exact) {
|
||||
+ syslog(LOG_ERR,
|
||||
+ "Will not restore a file with more than one hard link (%s) %s\n",
|
||||
+ filename, strerror(errno));
|
||||
+ }
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
@@ -283,6 +286,8 @@
|
||||
inotify_rm_watch(fd, master_wd);
|
||||
master_wd =
|
||||
inotify_add_watch(fd, watch_file_path, IN_MOVED_FROM | IN_MODIFY);
|
||||
@ -116,7 +186,16 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -411,7 +413,14 @@
|
||||
@@ -396,7 +401,7 @@
|
||||
char *file = basename(path);
|
||||
ptr = firstDir;
|
||||
|
||||
- restore(path);
|
||||
+ restore(path, 1);
|
||||
|
||||
while (ptr != NULL) {
|
||||
if (strcmp(dir, ptr->dir) == 0) {
|
||||
@@ -411,7 +416,14 @@
|
||||
|
||||
if (!ptr)
|
||||
exitApp("Out of Memory");
|
||||
@ -131,9 +210,44 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po
|
||||
|
||||
ptr->dir = strdup(dir);
|
||||
if (!ptr->dir)
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.57/restorecond/restorecond.conf
|
||||
--- nsapolicycoreutils/restorecond/restorecond.conf 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/restorecond/restorecond.conf 2009-02-02 08:34:07.000000000 -0500
|
||||
@@ -5,4 +5,3 @@
|
||||
/var/run/utmp
|
||||
/var/log/wtmp
|
||||
~/*
|
||||
-~/.mozilla/plugins/libflashplayer.so
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/stringslist.c policycoreutils-2.0.57/restorecond/stringslist.c
|
||||
--- nsapolicycoreutils/restorecond/stringslist.c 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/restorecond/stringslist.c 2009-02-02 08:34:07.000000000 -0500
|
||||
@@ -55,9 +55,10 @@
|
||||
*list = newptr;
|
||||
}
|
||||
|
||||
-int strings_list_find(struct stringsList *ptr, const char *string)
|
||||
+int strings_list_find(struct stringsList *ptr, const char *string, int *exact)
|
||||
{
|
||||
while (ptr) {
|
||||
+ *exact = strcmp(ptr->string, string) == 0;
|
||||
int cmp = fnmatch(ptr->string, string, 0);
|
||||
if (cmp == 0)
|
||||
return 0; /* Match found */
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/stringslist.h policycoreutils-2.0.57/restorecond/stringslist.h
|
||||
--- nsapolicycoreutils/restorecond/stringslist.h 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/restorecond/stringslist.h 2009-02-02 08:34:07.000000000 -0500
|
||||
@@ -31,7 +31,7 @@
|
||||
void strings_list_free(struct stringsList *list);
|
||||
void strings_list_add(struct stringsList **list, const char *string);
|
||||
void strings_list_print(struct stringsList *list);
|
||||
-int strings_list_find(struct stringsList *list, const char *string);
|
||||
+int strings_list_find(struct stringsList *list, const char *string, int *exact);
|
||||
int strings_list_diff(struct stringsList *from, struct stringsList *to);
|
||||
|
||||
#endif
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/utmpwatcher.c policycoreutils-2.0.57/restorecond/utmpwatcher.c
|
||||
--- nsapolicycoreutils/restorecond/utmpwatcher.c 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/restorecond/utmpwatcher.c 2008-12-02 08:38:00.000000000 -0500
|
||||
+++ policycoreutils-2.0.57/restorecond/utmpwatcher.c 2009-02-02 08:34:07.000000000 -0500
|
||||
@@ -57,7 +57,7 @@
|
||||
utmp_ptr = NULL;
|
||||
FILE *cfg = fopen(utmp_path, "r");
|
||||
@ -155,7 +269,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po
|
||||
strings_list_free(prev_utmp_ptr);
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.57/scripts/chcat
|
||||
--- nsapolicycoreutils/scripts/chcat 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/scripts/chcat 2008-12-01 15:23:46.000000000 -0500
|
||||
+++ policycoreutils-2.0.57/scripts/chcat 2009-02-02 08:33:36.000000000 -0500
|
||||
@@ -291,6 +291,8 @@
|
||||
for i in c.split(","):
|
||||
if i not in newcats:
|
||||
@ -167,7 +281,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po
|
||||
def translate(cats):
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.14 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.57/semanage/seobject.py
|
||||
--- nsapolicycoreutils/semanage/seobject.py 2008-09-22 13:25:08.000000000 -0400
|
||||
+++ policycoreutils-2.0.57/semanage/seobject.py 2008-12-01 15:20:08.000000000 -0500
|
||||
+++ policycoreutils-2.0.57/semanage/seobject.py 2009-02-02 08:33:36.000000000 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import __builtin__
|
||||
__builtin__.__dict__['_'] = unicode
|
||||
|
@ -6,7 +6,7 @@
|
||||
Summary: SELinux policy core utilities
|
||||
Name: policycoreutils
|
||||
Version: 2.0.57
|
||||
Release: 15%{?dist}
|
||||
Release: 16%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||
@ -192,6 +192,10 @@ if [ "$1" -ge "1" ]; then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Mon Feb 2 2009 Dan Walsh <dwalsh@redhat.com> 2.0.57-16
|
||||
- Fix restorecond to not complain on global diff
|
||||
- Update po files
|
||||
|
||||
* Mon Dec 15 2008 Dan Walsh <dwalsh@redhat.com> 2.0.57-15
|
||||
- Fix audit2allow man page
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user