hal: Branch 'master' - 2 commits

Danny Kukawka dkukawka at kemper.freedesktop.org
Wed Feb 7 10:58:48 PST 2007


 tools/linux/hal-luks-setup-linux |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

New commits:
diff-tree 215a01bafed3c450185bbe9c6e0c82d042dc7f8d (from cdd567b2ddc413372cd82a1096919dc0e26053b6)
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Wed Feb 7 19:58:18 2007 +0100

    remove sanitizing passwords for luks and prevent word splitting/path expansion
    
    This patch remove unused sanitizing of the password in the linux
    hal-liks-setup script. Sanitize the password is not needed and reduce the
    strength of strong passwords if used.
    
    Also changed usage of the password within "" to prevent the shell from
    performing word splitting and pathname expansion.

diff --git a/tools/linux/hal-luks-setup-linux b/tools/linux/hal-luks-setup-linux
index dcf113a..1f4ddb3 100755
--- a/tools/linux/hal-luks-setup-linux
+++ b/tools/linux/hal-luks-setup-linux
@@ -6,8 +6,7 @@
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2.
 
-read password
-PASSWORD=${PASSWORD//[^[:alnum:]_=[:space:]:.+-]/@}
+read PASSWORD 
 
 CRYPTSETUP=/sbin/cryptsetup
 
@@ -23,7 +22,7 @@ if [ -e /dev/mapper/luks_crypto_$HAL_PRO
     exit 1
 fi
 
-if ! echo $password | $CRYPTSETUP luksOpen $HAL_PROP_BLOCK_DEVICE luks_crypto_$HAL_PROP_VOLUME_UUID  2> /dev/null; then
+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
diff-tree cdd567b2ddc413372cd82a1096919dc0e26053b6 (from 4e78e06043a92e7c9df57f8ef989da9f8fa5712f)
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Wed Feb 7 19:54:59 2007 +0100

    changed D-Bus error if /sbin/cryptsetup is not available
    
    This patch change the name/type of the D-Bus error if /sbin/cryptsetup is not
    available to differ (on the desktop) between this case and if the device is
    already setup.

diff --git a/tools/linux/hal-luks-setup-linux b/tools/linux/hal-luks-setup-linux
index 11fa148..dcf113a 100755
--- a/tools/linux/hal-luks-setup-linux
+++ b/tools/linux/hal-luks-setup-linux
@@ -12,7 +12,7 @@ PASSWORD=${PASSWORD//[^[:alnum:]_=[:spac
 CRYPTSETUP=/sbin/cryptsetup
 
 if [ ! -f $CRYPTSETUP ]; then
-    echo org.freedesktop.Hal.Device.Volume.Crypto.SetupError >&2
+    echo org.freedesktop.Hal.Device.Volume.Crypto.CryptSetupMissing >&2
     echo Error setting up $HAL_PROP_BLOCK_DEVICE - $CRYPTSETUP not found >&2
     exit 1
 fi


More information about the hal-commit mailing list