[Bug 220768] rc.sysinit: Allow more than one attempt at non-LUKS passphrase

bugzilla at redhat.com bugzilla at redhat.com
Fri Apr 4 07:01:26 UTC 2008


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: rc.sysinit: Allow more than one attempt at non-LUKS passphrase


https://bugzilla.redhat.com/show_bug.cgi?id=220768


bugzilla at mbreen.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard| bzcl34nup                  |bzcl34nup
               Flag|                            |needinfo?




------- Additional Comments From bugzilla at mbreen.com  2008-04-04 03:01 EST -------
Still applies. My changes for F8 (note that I don't use a graphical boot and 
havven't tested it with rhgb option):

$ rcsdiff -u -r1.2 -r1.3 /etc/rc.d/rc.sysinit
===================================================================
RCS file: /etc/rc.d/RCS/rc.sysinit,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /etc/rc.d/rc.sysinit        2008/01/15 12:55:14     1.2
+++ /etc/rc.d/rc.sysinit        2008/01/21 16:01:44     1.3
@@ -236,10 +236,33 @@
                    "ignoring them"
            fi
            /sbin/cryptsetup ${key:+-d $key} luksOpen "$src" "$dst" <&1
+           rc=$?
        else
-           /sbin/cryptsetup $params ${key:+-d $key} create "$dst" "$src" <&1 
2>/dev/null
+           while ((1)); do
+               /sbin/cryptsetup $params ${key:+-d $key} create 
"$dst" "$src" <&1
+               rc=$?
+               if [ $rc -ne 0 ]; then
+                   break;
+               elif [ -n "$key" -a "x$key" != "xnone" ]; then
+                   break;
+               elif blkid "/dev/mapper/$dst" >/dev/null; then
+                   break;
+               fi
+               echo "/dev/mapper/$dst is not a recognized block device -" \
+                   "passphrase may be incorrect."
+               echo -n "Try again (y/[n])? "
+               read AGAIN <&1
+               case "$AGAIN" in
+                   Y|yes|Yes|YES)
+                       AGAIN=y
+                       ;;
+               esac
+               if [ "$AGAIN" != "y" ]; then
+                   break
+               fi
+               /sbin/cryptsetup remove "$dst"
+           done
        fi
-       rc=$?
        if [ $rc -ne 0 ]; then
            ret=1
            continue


-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the fedora-triage-list mailing list