hal/tools hal-luks-setup,1.3,1.4
David Zeuthen
david at kemper.freedesktop.org
Thu Feb 23 20:29:08 PST 2006
Update of /cvs/hal/hal/tools
In directory kemper:/tmp/cvs-serv11516/tools
Modified Files:
hal-luks-setup
Log Message:
2006-02-23 David Zeuthen <davidz at redhat.com>
* hald/linux2/blockdev.c (hotplug_event_begin_add_blockdev): Add
some useful debugging on errors
* tools/hal-luks-setup: Sleep three seconds on error to avoid
attacks for cracking the password
Index: hal-luks-setup
===================================================================
RCS file: /cvs/hal/hal/tools/hal-luks-setup,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hal-luks-setup 14 Feb 2006 02:52:44 -0000 1.3
+++ hal-luks-setup 24 Feb 2006 04:29:06 -0000 1.4
@@ -18,21 +18,22 @@
CRYPTSETUP=/sbin/cryptsetup
if [ ! -f $CRYPTSETUP ]; then
- echo org.freedesktop.Hal.Device.Volume.Crypto.SetupError >&2
- echo Error setting up $HAL_PROP_BLOCK_DEVICE - $CRYPTSETUP not found >&2
- exit 1
+ echo org.freedesktop.Hal.Device.Volume.Crypto.SetupError >&2
+ echo Error setting up $HAL_PROP_BLOCK_DEVICE - $CRYPTSETUP not found >&2
+ exit 1
fi
if [ -e /dev/mapper/luks_crypto_$HAL_PROP_VOLUME_UUID ]; then
- echo org.freedesktop.Hal.Device.Volume.Crypto.SetupError >&2
- echo $HAL_PROP_BLOCK_DEVICE is already setup? >&2
- exit 1
+ echo org.freedesktop.Hal.Device.Volume.Crypto.SetupError >&2
+ echo $HAL_PROP_BLOCK_DEVICE is already setup? >&2
+ exit 1
fi
if ! echo $password | $CRYPTSETUP luksOpen $HAL_PROP_BLOCK_DEVICE luks_crypto_$HAL_PROP_VOLUME_UUID 2> /dev/null; then
- echo org.freedesktop.Hal.Device.Volume.Crypto.SetupPasswordError >&2
- echo Error setting up $HAL_PROP_BLOCK_DEVICE - bad password? >&2
- exit 1
+ /bin/sleep 3
+ echo org.freedesktop.Hal.Device.Volume.Crypto.SetupPasswordError >&2
+ echo Error setting up $HAL_PROP_BLOCK_DEVICE - bad password? >&2
+ exit 1
fi
hal-set-property --udi=$UDI --key="info.callouts.remove" --strlist-pre="hal-luks-remove" > /dev/null 2>&1
More information about the hal-commit
mailing list