[ecryptfs-utils/f15/master] fix selinux context

Michal Hlavinka mhlavink at fedoraproject.org
Wed Mar 2 14:10:03 UTC 2011


commit ba21fafab4d9d981add09ec68b5098597544f9aa
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Wed Mar 2 15:09:43 2011 +0100

    fix selinux context

 ecryptfs-utils-86-selinux.patch |   14 ++++++++++++++
 ecryptfs-utils.spec             |   10 +++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/ecryptfs-utils-86-selinux.patch b/ecryptfs-utils-86-selinux.patch
new file mode 100644
index 0000000..c411a0a
--- /dev/null
+++ b/ecryptfs-utils-86-selinux.patch
@@ -0,0 +1,14 @@
+--- a/src/utils/ecryptfs-setup-private	2011-03-02 12:22:05.000000000 +0100
++++ b/src/utils/ecryptfs-setup-private	2011-03-02 12:22:47.000000000 +0100
+@@ -399,9 +399,11 @@
+ temp=`mktemp`
+ echo "$sig" > "$temp" || error "$(gettext 'Could not create signature file')" "[$HOME/.ecryptfs/$PRIVATE_DIR.sig]"
+ mv "$temp" "$HOME/.ecryptfs/$PRIVATE_DIR.sig"
++restorecon "$HOME/.ecryptfs/$PRIVATE_DIR.sig" > /dev/null 2>&1
+ temp=`mktemp`
+ echo "$MOUNTPOINT" > "$temp" || error "$(gettext 'Could not create mountpoint file')" "[$HOME/.ecryptfs/$PRIVATE_DIR.mnt]"
+ mv "$temp" "$HOME/.ecryptfs/$PRIVATE_DIR.mnt"
++restorecon "$HOME/.ecryptfs/$PRIVATE_DIR.mnt" > /dev/null 2>&1
+ 
+ echo
+ echo "$(gettext 'Done configuring.')"
diff --git a/ecryptfs-utils.spec b/ecryptfs-utils.spec
index 61a5f76..434b209 100644
--- a/ecryptfs-utils.spec
+++ b/ecryptfs-utils.spec
@@ -5,7 +5,7 @@
 
 Name: ecryptfs-utils
 Version: 86
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: The eCryptfs mount helper and support libraries
 Group: System Environment/Base
 License: GPLv2+
@@ -29,6 +29,10 @@ Patch5: ecryptfs-utils-84-fixsigness.patch
 # also fixes this issue: char c; while((c = fgetc(fh)) != EOF)
 Patch6: ecryptfs-utils-84-fgetc.patch
 
+# selinux specific, rhbz#681495
+# fix selinux context for ~/Private cfg files
+Patch7: ecryptfs-utils-86-selinux.patch
+
 # allow building with -Werror
 Patch999: ecryptfs-utils-75-werror.patch
 
@@ -74,6 +78,7 @@ the interface supplied by the ecryptfs-utils library.
 %patch4 -p1 -b .splitnss
 %patch5 -p1 -b .fixsigness
 %patch6 -p1 -b .fgetc
+%patch7 -p1 -b .selinux
 %patch999 -p1 -b .werror
 
 %build
@@ -202,6 +207,9 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitearch}/ecryptfs-utils/_libecryptfs.so
 
 %changelog
+* Wed Mar 02 2011 Michal Hlavinka <mhlavink at redhat.com> - 86-2
+- fix selinux context
+
 * Fri Feb 25 2011 Michal Hlavinka <mhlavink at redhat.com> - 86-1
 - updated to v. 86
 


More information about the scm-commits mailing list