[PATCH] ecryptfs-*-confidential: don't use .ecryptfsrc Per IRC, Mike reserves the right to use .ecryptfsrc in a format that's not compatible with shell sourcing in the future.
So we'll use ~/.ecryptfs/confidential for these purposes. :-Dustin
diff --git a/src/utils/ecryptfs-mount-confidential b/src/utils/ecryptfs-mount-confidential
index d445923..5d01524 100755
--- a/src/utils/ecryptfs-mount-confidential
+++ b/src/utils/ecryptfs-mount-confidential
@@ -9,7 +9,7 @@
if [ -f $HOME/.ecryptfs/auto-mount ]; then
CONFIDENTIAL="$HOME/Confidential"
- . $HOME/.ecryptfsrc 2>/dev/null || /bin/true
+ . $HOME/.ecryptfs/confidential 2>/dev/null || /bin/true
if ! mount | grep -q "$CONFIDENTIAL type ecryptfs"; then
ENCRYPTED_DIR=`grep " $CONFIDENTIAL " /etc/fstab | awk '{print $1}'`
chmod 700 "$CONFIDENTIAL" "$ENCRYPTED_DIR"
diff --git a/src/utils/ecryptfs-setup-confidential b/src/utils/ecryptfs-setup-confidential
index 2ea8ed7..16be9ec 100755
--- a/src/utils/ecryptfs-setup-confidential
+++ b/src/utils/ecryptfs-setup-confidential
@@ -238,13 +238,13 @@ ecryptfs-wrap-passphrase $HOME/.ecryptfs/wrapped-passphrase "$MOUNTPASS" "$LOGIN
chmod 400 $HOME/.ecryptfs/wrapped-passphrase
chown $USERNAME:$USERNAME $HOME/.ecryptfs/wrapped-passphrase
-# Setup .ecryptfsrc to store the confidential mountpoint
-tmpfile1=`mktemp $HOME/.ecryptfsrc.XXXXXX`
+# Setup .ecryptfs/confidential to store the confidential mountpoint
+tmpfile1=`mktemp $HOME/.ecryptfs/confidential.XXXXXX`
chmod 400 $tmpfile1
chown $USERNAME:$USERNAME $tmpfile1
-grep -v "CONFIDENTIAL=" $HOME/.ecryptfsrc > $tmpfile1
+grep -v "CONFIDENTIAL=" $HOME/.ecryptfs/confidential > $tmpfile1
echo "CONFIDENTIAL=\"$MOUNTPOINT\"" >> $tmpfile1
-mv -f $tmpfile1 $HOME/.ecryptfsrc
+mv -f $tmpfile1 $HOME/.ecryptfs/confidential
echo
echo "Done."
diff --git a/src/utils/ecryptfs-umount-confidential b/src/utils/ecryptfs-umount-confidential
index 418f0dc..ede7310 100755
--- a/src/utils/ecryptfs-umount-confidential
+++ b/src/utils/ecryptfs-umount-confidential
@@ -6,6 +6,7 @@
# Extracted to a stand-alone script by Dustin Kirkland <[EMAIL PROTECTED]>
CONFIDENTIAL="$HOME/Private"
+. $HOME/.ecryptfs/confidential 2>/dev/null || /bin/true
if mount | grep -q "$CONFIDENTIAL type ecryptfs"; then
username=`whoami`
count=`who | grep "^$username " | wc -l`
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ eCryptfs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ecryptfs-devel
