diff -up ecryptfs-utils-96/src/utils/ecryptfs-mount-private.groupcheck ecryptfs-utils-96/src/utils/ecryptfs-mount-private
--- ecryptfs-utils-96/src/utils/ecryptfs-mount-private.groupcheck 2012-04-16 14:42:56.386317997 +0200
+++ ecryptfs-utils-96/src/utils/ecryptfs-mount-private 2012-04-16 14:49:13.637431764 +0200
@@ -69,7 +69,16 @@ if [ -f "$WRAPPED_PASSPHRASE_FILE" -a -f
echo `gettext "ERROR:"` `gettext "Too many incorrect password attempts, exiting"`
exit 1
fi
- /sbin/mount.ecryptfs_private
+ if ! /sbin/mount.ecryptfs_private;
+ then
+ # Check if the ecryptfs group exists, and user is member of ecryptfs group
+ if grep -qs "^ecryptfs:" /etc/group; then
+ if ! id "$USER" | grep -qs "\(ecryptfs\)"; then
+ echo $(gettext 'ERROR: ') $(gettext 'User needs to be a member of ecryptfs group')
+ exit 1
+ fi
else
echo `gettext "ERROR:"` `gettext "Encrypted private directory is not setup properly"`