Revert hard linking of files between tmp/active/previous.

Enable configuration of bzip behavior from Stephen Smalley.
    bzip-blocksize=0 to disable compression and decompression support.
    bzip-blocksize=1..9 to set the blocksize for compression.
    bzip-small=true to reduce memory usage for decompression.
This commit is contained in:
Daniel J Walsh 2009-08-05 19:21:58 +00:00
parent 6eb64237b0
commit 168ea7cab1
4 changed files with 26 additions and 28 deletions

View File

@ -107,3 +107,4 @@ libsemanage-2.0.30.tgz
libsemanage-2.0.31.tgz
libsemanage-2.0.32.tgz
libsemanage-2.0.33.tgz
libsemanage-2.0.35.tgz

View File

@ -1,7 +1,18 @@
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.33/src/genhomedircon.c
--- nsalibsemanage/src/genhomedircon.c 2008-08-28 09:34:24.000000000 -0400
+++ libsemanage-2.0.33/src/genhomedircon.c 2009-07-10 14:46:05.000000000 -0400
@@ -794,6 +794,10 @@
+++ libsemanage-2.0.33/src/genhomedircon.c 2009-07-15 10:32:20.000000000 -0400
@@ -304,6 +304,10 @@
continue;
if (!semanage_list_find(shells, pwbuf->pw_shell))
continue;
+ int len = strlen(pwbuf->pw_dir) -1;
+ for(; len > 0 && pwbuf->pw_dir[len]=='/'; len--) {
+ pwbuf->pw_dir[len]=0;
+ }
if (strcmp(pwbuf->pw_dir, "/") == 0)
continue;
if (semanage_str_count(pwbuf->pw_dir, '/') <= 1)
@@ -794,6 +798,11 @@
* /root */
continue;
}
@ -9,37 +20,16 @@ diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libseman
+ /* don't relabel /root*/
+ continue;
+ }
+
if (push_user_entry(&head, name, seuname,
prefix, pwent->pw_dir) != STATUS_SUCCESS) {
*errors = STATUS_ERR;
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage.conf libsemanage-2.0.33/src/semanage.conf
--- nsalibsemanage/src/semanage.conf 2008-08-28 09:34:24.000000000 -0400
+++ libsemanage-2.0.33/src/semanage.conf 2009-07-10 14:45:44.000000000 -0400
+++ libsemanage-2.0.33/src/semanage.conf 2009-07-15 10:30:33.000000000 -0400
@@ -35,4 +35,4 @@
# given in <sepol/policydb.h>. Change this setting if a different
# version is necessary.
#policy-version = 19
-
+expand-check=0
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage_store.c libsemanage-2.0.33/src/semanage_store.c
--- nsalibsemanage/src/semanage_store.c 2009-07-07 15:32:32.000000000 -0400
+++ libsemanage-2.0.33/src/semanage_store.c 2009-07-10 14:45:44.000000000 -0400
@@ -441,8 +441,6 @@
char tmp[PATH_MAX];
char buf[4192];
- if (link(src,dst) == 0) return 0;
-
n = snprintf(tmp, PATH_MAX, "%s.tmp", dst);
if (n < 0 || n >= PATH_MAX)
return -1;
@@ -510,7 +508,8 @@
goto cleanup;
}
} else if (S_ISREG(sb.st_mode)) {
- if (semanage_copy_file(path, path2, sb.st_mode) == -1) {
+ if ((link(path,path2) == -1) &&
+ (semanage_copy_file(path, path2, sb.st_mode) == -1)) {
goto cleanup;
}
}

View File

@ -2,8 +2,8 @@
%define libselinuxver 2.0.0-1
Summary: SELinux binary policy manipulation library
Name: libsemanage
Version: 2.0.33
Release: 3%{?dist}
Version: 2.0.35
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz
@ -91,6 +91,13 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/python*/site-packages/*
%changelog
* Wed Aug 5 2009 Dan Walsh <dwalsh@redhat.com> - 2.0.35-1
* Revert hard linking of files between tmp/active/previous.
* Enable configuration of bzip behavior from Stephen Smalley.
bzip-blocksize=0 to disable compression and decompression support.
bzip-blocksize=1..9 to set the blocksize for compression.
bzip-small=true to reduce memory usage for decompression.
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.33-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

View File

@ -1 +1 @@
3c5af39fda8e81567f0c6d4bf96cfc7f libsemanage-2.0.33.tgz
a1592f93fbe653d9c9e1de00597d7df4 libsemanage-2.0.35.tgz