~ubuntu-branches/ubuntu/vivid/ecryptfs-utils/vivid

« back to all changes in this revision

Viewing changes to debian/patches/25-ecryptfs-setup-private_fix-pw-echo.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland
  • Date: 2008-08-20 23:20:36 UTC
  • Revision ID: james.westby@ubuntu.com-20080820232036-08hkxqeccmmb9wti
Tags: 53-1ubuntu5
* debian/patches/00list: add 25-ecryptfs-setup-private_fix-pw-echo.dpatch
  (LP: #259746).
* debian/patches/25-ecryptfs-setup-private_fix-pw-echo.dpatch: comment out
  mostly-debugish echo's; conditionally print randomly generated passphrase;
  always remind the user to print/record the mount passphrase for data
  recovery.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh /usr/share/dpatch/dpatch-run
 
2
# 25-ecryptfs-setup-private_fix-pw-echo.dpatch
 
3
# Dustin Kirkland <kirkland@canonical.com>
 
4
#
 
5
# Don't echo passphrases to screen
 
6
 
 
7
@DPATCH@
 
8
 
 
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"`
 
16
+                       RANDOM_MOUNTPASS=1
 
17
                        break
 
18
                else
 
19
                        stty -echo
 
20
@@ -171,21 +172,24 @@ if [ -z "$MOUNTPASS" ]; then
 
21
        done
 
22
 fi
 
23
 
 
24
-echo
 
25
-echo
 
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]"
 
31
-echo
 
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."
 
35
+#echo
 
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]"
 
41
+#echo
 
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."
 
45
 echo
 
46
 echo "************************************************************************"
 
47
-echo "YOU SHOULD RECORD THIS MOUNT PASSPHRASE AND STORE IN A SAFE LOCATION:"
 
48
-echo "$MOUNTPASS"
 
49
+if [ "$RANDOM_MOUNTPASS" = "1" ]; then
 
50
+       echo "YOU SHOULD RECORD THIS MOUNT PASSPHRASE AND STORE IN A SAFE LOCATION:"
 
51
+       echo "$MOUNTPASS"
 
52
+else
 
53
+       echo "YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IN A SAFE LOCATION:"
 
54
+fi
 
55
 echo "THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME."
 
56
 echo "************************************************************************"
 
57
 echo