From 807d8f9c858d2adf5285a3ba27aec6ed226d14d7 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 17 Mar 2012 13:46:12 +0100 Subject: crypttab: warn if using passphrase in /etc/crypttab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no reason not to use a keyfile, and allowing literal passphrases in crypttab has caused issues with the parsing in the past. Furthermore, it is not supported by any other crypttab implementation (to the best of my knowledge). The use of keyfiles have been the recomendation in /etc/crypttab for as long as I can remember. We are looking at refactoring the encryption support, and I think it makes sense to drop support for this when we move to the new implementation. Cc: Thomas Bächler Cc: Matthew Monaco Cc: Dave Reisner Signed-off-by: Tom Gundersen --- functions | 1 + 1 file changed, 1 insertion(+) diff --git a/functions b/functions index 11ab11f..04b7ec4 100644 --- a/functions +++ b/functions @@ -444,6 +444,7 @@ do_unlock() { /*) cryptsetup -d "$3" $4 $open "$a" "$b" >/dev/null;; *) + printf "${C_FAIL}crypttab contains a literal encryption key. This will stop working in the future.${C_OTHER}\n" echo "$3" | cryptsetup $4 $open "$a" "$b" >/dev/null;; esac if (( $? )); then -- cgit v1.2.3-54-g00ecf