[PATCH] .ecryptfs/auto-umount support This very simple patch adds support for ~/.ecryptfs/auto-umount.
This allows a user to separately configure automatic mounting and unmounting of ecryptfs directories. It is conceivable that a user might want to automatically mount their ecryptfs directory, but NOT unmount it (background processes, and such). Conversely, a more conservative user might NOT want to mount their ecryptfs directory automatically, but always want to automatically unmount it. -- :-Dustin Dustin Kirkland Ubuntu Server Developer Canonical, LTD [EMAIL PROTECTED] GPG: 1024D/83A61194 diff --git a/src/utils/ecryptfs-setup-private b/src/utils/ecryptfs-setup-private index ee977ae..1aa6bf5 100755 --- a/src/utils/ecryptfs-setup-private +++ b/src/utils/ecryptfs-setup-private @@ -188,6 +188,7 @@ chmod 500 "$MOUNTPOINT" # Setup ~/.ecryptfs directory mkdir -m 700 $HOME/.ecryptfs 2>/dev/null touch $HOME/.ecryptfs/auto-mount || error "Could not setup ecryptfs auto-mount" +touch $HOME/.ecryptfs/auto-umount || error "Could not setup ecryptfs auto-umount" # Backup any existing wrapped-passphrase or sig files; we DO NOT destroy this timestamp=`date +%Y%m%d%H%M%S` diff --git a/src/utils/ecryptfs-umount-private b/src/utils/ecryptfs-umount-private index 37be1a4..12b5706 100755 --- a/src/utils/ecryptfs-umount-private +++ b/src/utils/ecryptfs-umount-private @@ -7,7 +7,7 @@ # Extracted to a stand-alone script by Dustin Kirkland <[EMAIL PROTECTED]> PRIVATE_DIR="Private" -if [ -f "$HOME/.ecryptfs/auto-mount" -a -f "$HOME/.ecryptfs/$PRIVATE_DIR.sig" ]; then +if [ -f "$HOME/.ecryptfs/auto-umount" -a -f "$HOME/.ecryptfs/$PRIVATE_DIR.sig" ]; then if egrep -qs "$HOME/[\.]{0,1}$PRIVATE_DIR " /proc/mounts; then username=`whoami` count=`who | grep "^$username " | wc -l`
diff --git a/src/utils/ecryptfs-setup-private b/src/utils/ecryptfs-setup-private index ee977ae..1aa6bf5 100755 --- a/src/utils/ecryptfs-setup-private +++ b/src/utils/ecryptfs-setup-private @@ -188,6 +188,7 @@ chmod 500 "$MOUNTPOINT" # Setup ~/.ecryptfs directory mkdir -m 700 $HOME/.ecryptfs 2>/dev/null touch $HOME/.ecryptfs/auto-mount || error "Could not setup ecryptfs auto-mount" +touch $HOME/.ecryptfs/auto-umount || error "Could not setup ecryptfs auto-umount" # Backup any existing wrapped-passphrase or sig files; we DO NOT destroy this timestamp=`date +%Y%m%d%H%M%S` diff --git a/src/utils/ecryptfs-umount-private b/src/utils/ecryptfs-umount-private index 37be1a4..12b5706 100755 --- a/src/utils/ecryptfs-umount-private +++ b/src/utils/ecryptfs-umount-private @@ -7,7 +7,7 @@ # Extracted to a stand-alone script by Dustin Kirkland <[EMAIL PROTECTED]> PRIVATE_DIR="Private" -if [ -f "$HOME/.ecryptfs/auto-mount" -a -f "$HOME/.ecryptfs/$PRIVATE_DIR.sig" ]; then +if [ -f "$HOME/.ecryptfs/auto-umount" -a -f "$HOME/.ecryptfs/$PRIVATE_DIR.sig" ]; then if egrep -qs "$HOME/[\.]{0,1}$PRIVATE_DIR " /proc/mounts; then username=`whoami` count=`who | grep "^$username " | wc -l`
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ eCryptfs-devel mailing list eCryptfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecryptfs-devel