Package: ecryptfs-utils
Version: 58-1
Severity: Important

Hello,

Some of the utilities included in the ecryptfs-utils package assume
that "/sbin" is in the PATH environment variable. This happens to be
true in Ubuntu, which, I am guessing, is the upstream. However,
because Debian does not include "/sbin" and "/usr/sbin" in PATH for
non-root users by default, the shell-script utilities included in
ecryptfs-utils package exit with errors stating that the relevant
executable cannot be found.

Here is a list of the shell scripts affected:

src/utils/ecryptfs-mount-private
src/utils/ecryptfs-setup-private
src/utils/ecryptfs-umount-private

As one can see by looking at the shell scripts, all of them contain
references to "mount.ecryptfs_private" and "umount.ecryptfs_private"
(which are installed in "/sbin") without including the "/sbin/" in
the calling line.

This problem affects users of the "Private" directory a lot as one
is forced to include "/sbin" in the PATH before doing anything with
ecryptfs.

Attached is a patch which fixes this issue.

Regards,

- situert





      
diff -ur ecryptfs-utils-58/src/utils/ecryptfs-mount-private ecryptfs-utils-58.fix/src/utils/ecryptfs-mount-private
--- ecryptfs-utils-58/src/utils/ecryptfs-mount-private	2008-06-27 11:05:37.000000000 -0400
+++ ecryptfs-utils-58.fix/src/utils/ecryptfs-mount-private	2008-09-10 19:11:14.000000000 -0400
@@ -11,7 +11,7 @@
 	if ! egrep -qs "$HOME/[\.]{0,1}$PRIVATE_DIR " /proc/mounts; then
 		chmod 500 "$HOME/$PRIVATE_DIR"
 		chmod 700 "$HOME/.$PRIVATE_DIR"
-		mount.ecryptfs_private
+		/sbin/mount.ecryptfs_private
 	fi
 fi
 
diff -ur ecryptfs-utils-58/src/utils/ecryptfs-setup-private ecryptfs-utils-58.fix/src/utils/ecryptfs-setup-private
--- ecryptfs-utils-58/src/utils/ecryptfs-setup-private	2008-09-08 11:55:30.000000000 -0400
+++ ecryptfs-utils-58.fix/src/utils/ecryptfs-setup-private	2008-09-10 19:11:42.000000000 -0400
@@ -44,7 +44,7 @@
 
 error_testing() {
 	rm -f "$1" >/dev/null
-	umount.ecryptfs_private >/dev/null
+	/sbin/umount.ecryptfs_private >/dev/null
 	error "$2"
 	exit 1
 }
@@ -251,16 +251,16 @@
 
 # Now let's perform some basic mount/write/umount/read sanity testing...
 echo "Testing mount/write/umount/read..."
-mount.ecryptfs_private || error "Could not mount private ecryptfs directory"
+/sbin/mount.ecryptfs_private || error "Could not mount private ecryptfs directory"
 temp=`mktemp "$HOME/$PRIVATE_DIR/ecryptfs.test.XXXXXX"` || error_testing "$temp" "Could not create empty file"
 random_data=`head -c 16000 /dev/urandom | od -x` || error_testing "$temp" "Could not generate random data"
 echo "$random_data" > "$temp" || error_testing "$temp" "Could not write encrypted file"
 md5sum1=`md5sum "$temp"` || error_testing "$temp" "Could not read encrypted file"
-umount.ecryptfs_private || error_testing "$temp" "Could not unmount private ecryptfs directory"
-mount.ecryptfs_private || error_testing "$temp" "Could not mount private ecryptfs directory (2)"
+/sbin/umount.ecryptfs_private || error_testing "$temp" "Could not unmount private ecryptfs directory"
+/sbin/mount.ecryptfs_private || error_testing "$temp" "Could not mount private ecryptfs directory (2)"
 md5sum2=`md5sum "$temp"` || error_testing "$temp" "Could not read encrypted file (2)"
 rm -f "$temp"
-umount.ecryptfs_private || error_testing "$temp" "Could not unmount private ecryptfs directory (2)"
+/sbin/umount.ecryptfs_private || error_testing "$temp" "Could not unmount private ecryptfs directory (2)"
 if [ "$md5sum1" != "$md5sum2" ]; then
 	error "Testing failed."
 else
diff -ur ecryptfs-utils-58/src/utils/ecryptfs-umount-private ecryptfs-utils-58.fix/src/utils/ecryptfs-umount-private
--- ecryptfs-utils-58/src/utils/ecryptfs-umount-private	2008-07-23 16:00:12.000000000 -0400
+++ ecryptfs-utils-58.fix/src/utils/ecryptfs-umount-private	2008-09-10 19:11:47.000000000 -0400
@@ -13,7 +13,7 @@
 		count=`who | grep "^$username " | wc -l`
 		if [ $count -le 1 ]; then
 			chmod 500 "$HOME/$PRIVATE_DIR" "$HOME/.$PRIVATE_DIR"
-			umount.ecryptfs_private
+			/sbin/umount.ecryptfs_private
 		fi
 	fi
 fi

Reply via email to