- Fix handling of seusers and users_map file
This commit is contained in:
parent
b40694835e
commit
437a1672f8
@ -1,42 +1,57 @@
|
||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/Makefile libsemanage-1.5.14/Makefile
|
||||
--- nsalibsemanage/Makefile 2006-01-05 10:33:10.000000000 -0500
|
||||
+++ libsemanage-1.5.14/Makefile 2006-01-13 23:46:32.000000000 -0500
|
||||
@@ -1,11 +1,17 @@
|
||||
all:
|
||||
$(MAKE) -C src all
|
||||
diff -Naurp --exclude-from excludes old/libsemanage/src/direct_api.c new/libsemanage/src/direct_api.c
|
||||
--- old/libsemanage/src/direct_api.c 2006-02-08 03:20:08.000000000 -0500
|
||||
+++ new/libsemanage/src/direct_api.c 2006-02-09 19:14:15.000000000 -0500
|
||||
@@ -475,7 +475,7 @@ static int semanage_direct_commit(semana
|
||||
|
||||
+pywrap:
|
||||
+ $(MAKE) -C src pywrap
|
||||
/* ==================== File-backed ================== */
|
||||
|
||||
- /* write the linked file contexts template */
|
||||
+ /* File Contexts */
|
||||
if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_FC_TMPL)) == NULL ||
|
||||
write_file(sh, ofilename, sepol_module_package_get_file_contexts(base),
|
||||
sepol_module_package_get_file_contexts_len(base)) == -1) {
|
||||
@@ -484,29 +484,36 @@ static int semanage_direct_commit(semana
|
||||
|
||||
if (semanage_split_fc(sh))
|
||||
goto cleanup;
|
||||
-
|
||||
+
|
||||
install:
|
||||
$(MAKE) -C include install
|
||||
$(MAKE) -C src install
|
||||
$(MAKE) -C man install
|
||||
|
||||
+install-pywrap:
|
||||
+ $(MAKE) -C src install-pywrap
|
||||
+ pfcontexts->dtable->drop_cache(pfcontexts->dbase);
|
||||
+
|
||||
relabel:
|
||||
+ /* Seusers */
|
||||
if (sepol_module_package_get_seusers_len(base)) {
|
||||
if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_SEUSERS)) == NULL ||
|
||||
write_file(sh, ofilename, sepol_module_package_get_seusers(base),
|
||||
sepol_module_package_get_seusers_len(base)) == -1) {
|
||||
goto cleanup;
|
||||
}
|
||||
+ pseusers->dtable->drop_cache(pseusers->dbase);
|
||||
+
|
||||
+ } else {
|
||||
+ if (pseusers->dtable->clear(sh, pseusers->dbase) < 0)
|
||||
+ goto cleanup;
|
||||
}
|
||||
|
||||
clean:
|
||||
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/Makefile libsemanage-1.5.14/src/Makefile
|
||||
--- nsalibsemanage/src/Makefile 2005-11-29 10:54:15.000000000 -0500
|
||||
+++ libsemanage-1.5.14/src/Makefile 2006-01-13 23:46:17.000000000 -0500
|
||||
@@ -37,7 +37,7 @@
|
||||
+ /* Users_extra */
|
||||
if (sepol_module_package_get_user_extra_len(base)) {
|
||||
if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_USER_EXTRA)) == NULL ||
|
||||
write_file(sh, ofilename, sepol_module_package_get_user_extra(base),
|
||||
sepol_module_package_get_user_extra_len(base)) == -1) {
|
||||
goto cleanup;
|
||||
}
|
||||
- }
|
||||
+ pusers_extra->dtable->drop_cache(pusers_extra->dbase);
|
||||
|
||||
SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
|
||||
- /* Drop any cached content for file_contexts, seusers, or users_extra,
|
||||
- * since it is now superceded by the files just written, and needs to be
|
||||
- * re-cached */
|
||||
- pfcontexts->dtable->drop_cache(pfcontexts->dbase);
|
||||
- pseusers->dtable->drop_cache(pseusers->dbase);
|
||||
- pusers_extra->dtable->drop_cache(pusers_extra->dbase);
|
||||
+ } else {
|
||||
+ if (pusers_extra->dtable->clear(sh, pusers_extra->dbase) < 0)
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
|
||||
-all: $(LIBA) $(LIBSO) $(SWIGSO)
|
||||
+all: $(LIBA) $(LIBSO)
|
||||
/* ==================== Policydb-backed ================ */
|
||||
|
||||
pywrap: all $(SWIGLOBJ) $(SWIGSO)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
swigify: $(SWIGIF)
|
||||
$(SWIG) $^
|
||||
|
||||
-install: all install-pywrap
|
||||
+install: all
|
||||
test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
|
||||
install -m 644 $(LIBA) $(LIBDIR)
|
||||
test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)
|
||||
|
@ -3,10 +3,11 @@
|
||||
Summary: SELinux binary policy manipulation library
|
||||
Name: libsemanage
|
||||
Version: 1.5.21
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: GPL
|
||||
Group: System Environment/Libraries
|
||||
Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz
|
||||
Patch: libsemanage-rhat.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
||||
BuildRequires: libselinux-devel >= %{libselinuxver}
|
||||
@ -39,6 +40,7 @@ needed for developing applications that manipulate binary policies.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -p2 -b .rhat
|
||||
|
||||
%build
|
||||
make clean
|
||||
@ -75,7 +77,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.5.21-1
|
||||
* Fri Feb 10 2006 Dan Walsh <dwalsh@redhat.com> - 1.5.21-2
|
||||
- Fix handling of seusers and users_map file
|
||||
|
||||
* Tue Feb 07 2006 Dan Walsh <dwalsh@redhat.com> - 1.5.21-1
|
||||
- Upgrade to latest from NSA
|
||||
* Merged seuser/user_extra support patch from Joshua Brindle.
|
||||
* Merged remote system dbase patch from Ivan Gyurdiev.
|
||||
|
Loading…
Reference in New Issue
Block a user