[ecryptfs-utils/f16] set selinux boolean only if not already set (#868298)

Michal Hlavinka mhlavink at fedoraproject.org
Mon Oct 22 13:30:26 UTC 2012


commit d528c99046979327727a67fd37ff4cf56a8f858c
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Mon Oct 22 15:30:21 2012 +0200

    set selinux boolean only if not already set (#868298)

 ecryptfs-utils-99-selinux.patch |    2 +-
 ecryptfs-utils.spec             |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/ecryptfs-utils-99-selinux.patch b/ecryptfs-utils-99-selinux.patch
index 07f945f..5859ae0 100644
--- a/ecryptfs-utils-99-selinux.patch
+++ b/ecryptfs-utils-99-selinux.patch
@@ -5,7 +5,7 @@ diff -up ecryptfs-utils-99/src/utils/ecryptfs-migrate-home.selinux ecryptfs-util
  		error "Cannot proceed."
  	fi
  	# start encryption
-+	setsebool -P use_ecryptfs_home_dirs=1 1>/dev/null 2>&1 ||:
++	[[ "$(getsebool use_ecryptfs_home_dirs 2>/dev/null)" =~ off$ ]] && setsebool -P use_ecryptfs_home_dirs=1 1>/dev/null 2>&1 ||:
  	orig=$(mktemp /home/$USER_NAME.XXXXXXXX)
  	rm "$orig" && mv "$USER_HOME" "$orig"
  	chmod 700 "$orig"
diff --git a/ecryptfs-utils.spec b/ecryptfs-utils.spec
index f1ceb69..33e1bfa 100644
--- a/ecryptfs-utils.spec
+++ b/ecryptfs-utils.spec
@@ -5,7 +5,7 @@
 
 Name: ecryptfs-utils
 Version: 100
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: The eCryptfs mount helper and support libraries
 Group: System Environment/Base
 License: GPLv2+
@@ -252,6 +252,9 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitearch}/ecryptfs-utils/_libecryptfs.so
 
 %changelog
+* Mon Oct 22 2012 Michal Hlavinka <mhlavink at redhat.com> - 100-4
+- set selinux boolean only if not already set (#868298)
+
 * Thu Oct 18 2012 Michal Hlavinka <mhlavink at redhat.com> - 100-3
 - fix typo in restorecon path (#865839)
 


More information about the scm-commits mailing list