1
#!/bin/sh /usr/share/dpatch/dpatch-run
2
# 25-ecryptfs-setup-private_fix-pw-echo.dpatch
3
# Dustin Kirkland <kirkland@canonical.com>
5
# Don't echo passphrases to screen
9
diff -upr ecryptfs-utils-53/src/utils/ecryptfs-setup-private ecryptfs-utils-53.new/src/utils/ecryptfs-setup-private
10
--- ecryptfs-utils-53/src/utils/ecryptfs-setup-private 2008-08-20 23:06:09.220683144 +0100
11
+++ ecryptfs-utils-53.new/src/utils/ecryptfs-setup-private 2008-08-20 23:13:45.051913720 +0100
12
@@ -155,6 +155,7 @@ if [ -z "$MOUNTPASS" ]; then
13
# Pull 128 bits of random data from /dev/urandom, and convert
14
# to a string of 32 hex digits
15
MOUNTPASS=`head -c 16 /dev/urandom | od -x | head -n 1 |sed "s/^0000000//" | sed "s/\s*//g"`
20
@@ -171,21 +172,24 @@ if [ -z "$MOUNTPASS" ]; then
26
-echo "Using username [$USER]"
27
-echo "Using mount passphrase [$MOUNTPASS]"
28
-echo "Using login passphrase [$LOGINPASS]"
29
-echo "Using mount point [$MOUNTPOINT]"
30
-echo "Using encrypted dir [$CRYPTDIR]"
32
-echo "This script will attempt to set up your system to mount"
33
-echo "$MOUNTPOINT with eCryptfs automatically on login,"
34
-echo "using your login passphrase."
36
+#echo "Using username [$USER]"
37
+#echo "Using mount passphrase [$MOUNTPASS]"
38
+#echo "Using login passphrase [$LOGINPASS]"
39
+#echo "Using mount point [$MOUNTPOINT]"
40
+#echo "Using encrypted dir [$CRYPTDIR]"
42
+#echo "This script will attempt to set up your system to mount"
43
+#echo "$MOUNTPOINT with eCryptfs automatically on login,"
44
+#echo "using your login passphrase."
46
echo "************************************************************************"
47
-echo "YOU SHOULD RECORD THIS MOUNT PASSPHRASE AND STORE IN A SAFE LOCATION:"
49
+if [ "$RANDOM_MOUNTPASS" = "1" ]; then
50
+ echo "YOU SHOULD RECORD THIS MOUNT PASSPHRASE AND STORE IN A SAFE LOCATION:"
53
+ echo "YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IN A SAFE LOCATION:"
55
echo "THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME."
56
echo "************************************************************************"