diff --git a/cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh b/cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh index 0277dcd..0231b19 100755 --- a/cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh +++ b/cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh @@ -124,7 +124,7 @@ function create_crypto() #$WIPE -kq -R /dev/urandom "${device}2" # passphrase may be passed via command line - $CRYPTSETUP -h "$HASH" -c "$ALGO" create "$CRYPTMAPPER_DEV" "${device}2" + $CRYPTSETUP -h "$HASH" -c "$ALGO" create "`basename $CRYPTMAPPER_DEV`" "${device}2" } @@ -205,7 +205,7 @@ function mount_crypto() is_crypto_mounted && echo "Das Crypto-Dateisystem ist bereits aktiv!" local device=`find_harddisk` # passphrase is read from stdin - $CRYPTSETUP -h "$HASH" -c "$ALGO" create "$CRYPTMAPPER_DEV" "${device}2" + $CRYPTSETUP -h "$HASH" -c "$ALGO" create "`basename $CRYPTMAPPER_DEV`" "${device}2" if mount "$CRYPTMAPPER_DEV" "$CRYPTO_DIR" then /etc/init.d/samba start else dmsetup remove "$CRYPTMAPPER_DEV" diff --git a/cryptobox.conf.d/usr/lib/cryptobox/devel-features.sh b/cryptobox.conf.d/usr/lib/cryptobox/devel-features.sh index e0504b4..69b6d11 100755 --- a/cryptobox.conf.d/usr/lib/cryptobox/devel-features.sh +++ b/cryptobox.conf.d/usr/lib/cryptobox/devel-features.sh @@ -46,7 +46,8 @@ case "$ACTION" in diff ) cd "`dirname \"$MIRROR_ORIG_DIR\"`" # diff and remove "binary files differ"-warnings (vi-swap-files) - diff -ruN "`basename \"$MIRROR_ORIG_DIR\"`" "`basename \"$MIRROR_DIR\"`" | grep -v "^Binary files" + # ignore generated reports + diff -ruN --exclude=report "`basename \"$MIRROR_ORIG_DIR\"`" "`basename \"$MIRROR_DIR\"`" | grep -v "^Binary files" ;; stop ) /etc/init.d/ssh stop diff --git a/cryptobox.conf.d/usr/lib/cryptobox/validate.sh b/cryptobox.conf.d/usr/lib/cryptobox/validate.sh index e7ea4d6..940f13c 100755 --- a/cryptobox.conf.d/usr/lib/cryptobox/validate.sh +++ b/cryptobox.conf.d/usr/lib/cryptobox/validate.sh @@ -62,7 +62,7 @@ create_summary() local DIFF_FILE=${a%.desc}.diff if [ -s "$DIFF_FILE" ] then cat "$SUMMARY_TEMPLATE_DIR/result-error" - cat "$DIFF_FILE" | sed 's/\$//' + sed 's#$#
#' "$DIFF_FILE" else cat "$SUMMARY_TEMPLATE_DIR/result-ok" echo "no differences found" fi @@ -70,7 +70,7 @@ create_summary() # remove description file rm "$a" # remove if empty - [ -e "$DIFF_FILE" -a ! -s "$DIFF_FILE"] && rm "$DIFF_FILE" + [ -e "$DIFF_FILE" -a ! -s "$DIFF_FILE" ] && rm "$DIFF_FILE" done cat "$SUMMARY_TEMPLATE_DIR/footer" } diff --git a/cryptobox.conf.d/usr/share/cryptobox/templates/config_form.cs b/cryptobox.conf.d/usr/share/cryptobox/templates/config_form.cs index fdecb67..d4e0ab5 100644 --- a/cryptobox.conf.d/usr/share/cryptobox/templates/config_form.cs +++ b/cryptobox.conf.d/usr/share/cryptobox/templates/config_form.cs @@ -4,20 +4,18 @@
-

+


-

-
+

-

+


diff --git a/cryptobox.conf.d/var/www/cgi-bin/cryptobox.pl b/cryptobox.conf.d/var/www/cgi-bin/cryptobox.pl index 93b627a..9dcc22d 100755 --- a/cryptobox.conf.d/var/www/cgi-bin/cryptobox.pl +++ b/cryptobox.conf.d/var/www/cgi-bin/cryptobox.pl @@ -156,11 +156,6 @@ sub mount_vol close(PW_INPUT); $pagedata->setValue('Data.ProgOutput',"$output") if ($output); - - if (!&check_mounted()) { - $pagedata->setValue('Data.Warning', 'MountFailed'); - $pagedata->setValue('Data.Action', 'umount_form'); - } } @@ -252,7 +247,12 @@ if ( ! &check_ssl()) { } else { # mounten &mount_vol($query->param('password')); - $pagedata->setValue('Data.Action', 'umount_form'); + if (!&check_mounted()) { + $pagedata->setValue('Data.Warning', 'MountFailed'); + $pagedata->setValue('Data.Action', 'mount_form'); + } else { + $pagedata->setValue('Data.Action', 'umount_form'); + } } ################## mount_ask ####################### } elsif ($action eq 'mount_ask') { @@ -334,11 +334,16 @@ if ( ! &check_ssl()) { $pagedata->setValue('Data.Action', 'intro'); #################### config_do ####################### } elsif ($action eq 'config_do') { - # TODO: parse for valid values - system("$CB_SCRIPT", "set_config", "language", $query->param('language')); - system("$CB_SCRIPT", "set_config", "timeout", $query->param('timeout')); - system("$CB_SCRIPT", "set_config", "ip", $query->param('ip')); - $pagedata->setValue('Data.Action', 'intro'); + if ( ! &check_config()) { + $pagedata->setValue('Data.Warning', 'NotConfigured'); + $pagedata->setValue('Data.Action', 'init_form'); + } else { + # TODO: parse for valid values + system("$CB_SCRIPT", "set_config", "language", $query->param('language')); + system("$CB_SCRIPT", "set_config", "timeout", $query->param('timeout')); + system("$CB_SCRIPT", "set_config", "ip", $query->param('ip')); + $pagedata->setValue('Data.Action', 'intro'); + } #################### show_log ######################## } elsif ($action eq 'show_log') { $pagedata->setValue('Data.Action', 'show_log'); diff --git a/cryptobox.conf.d/var/www/cryptobox.css b/cryptobox.conf.d/var/www/cryptobox.css index 7194251..a1cc727 100644 --- a/cryptobox.conf.d/var/www/cryptobox.css +++ b/cryptobox.conf.d/var/www/cryptobox.css @@ -1,7 +1,7 @@ body { background-image: url(img/backg.gif); background-position: top center; - background-attachment: scroll; + background-attachment: fixed; background-repeat: no-repeat; text-align: center; margin: 0; @@ -40,6 +40,10 @@ body { height: 120px; margin: 0; padding: 0; + background-image: url(img/evil_small.png); + background-position: top right; + background-attachment: scroll; + background-repeat: no-repeat; } #content { @@ -175,7 +179,8 @@ body { } #words .warning a { - line-height: 5em; +// WHY line-height??? +// line-height: 5em; color: #5e5e5e; text-decoration: none; font-weight: bold; diff --git a/cryptobox.conf.d/var/www/img/evil_small.png b/cryptobox.conf.d/var/www/img/evil_small.png new file mode 100644 index 0000000..958a84d Binary files /dev/null and b/cryptobox.conf.d/var/www/img/evil_small.png differ diff --git a/cryptobox.conf.d/var/www/img/evil_test.png b/cryptobox.conf.d/var/www/img/evil_test.png new file mode 100644 index 0000000..ce6aa55 Binary files /dev/null and b/cryptobox.conf.d/var/www/img/evil_test.png differ