diff --git a/cbox-tree.d/usr/lib/cryptobox/cbox-manage.sh b/cbox-tree.d/usr/lib/cryptobox/cbox-manage.sh index 79259c5..4100571 100755 --- a/cbox-tree.d/usr/lib/cryptobox/cbox-manage.sh +++ b/cbox-tree.d/usr/lib/cryptobox/cbox-manage.sh @@ -133,10 +133,6 @@ function create_crypto() # Parameter: device { local device="$1" - # flood the crypto partition with noise - # TODO: do we need "wipe"? - #$WIPE -kq -R /dev/urandom "${device}2" - # passphrase may be passed via command line $CRYPTSETUP -h "$HASH" -c "$ALGO" create "`basename $CRYPTMAPPER_DEV`" "${device}2" } @@ -145,6 +141,13 @@ function create_crypto() function mkfs_crypto() # split from create_crypto to allow background execution via web interface { + local device=$(find_harddisk) + + # flood the crypto partition with noise + # writing to the real partition is faster + # TODO: this takes _much_ too long - maybe add a "secure wipe" switch to the interface? + #dd if=/dev/urandom of="${device}2" bs=512 + $MKFS_DATA "$CRYPTMAPPER_DEV" } diff --git a/cbox-tree.d/usr/share/cryptobox/templates/config_form.cs b/cbox-tree.d/usr/share/cryptobox/templates/config_form.cs index ec9cbdf..dd815c3 100644 --- a/cbox-tree.d/usr/share/cryptobox/templates/config_form.cs +++ b/cbox-tree.d/usr/share/cryptobox/templates/config_form.cs @@ -1,9 +1,7 @@