summaryrefslogtreecommitdiffstats
path: root/src/cryptsetup
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-06 16:17:18 +0100
committerDave Reisner <dreisner@archlinux.org>2012-11-06 16:18:10 +0100
commit8db9d8c2a4ef9806c286e258f9932a0972dc2375 (patch)
tree5230559e9c701a7b2e6445f65129b44d14dfcbc3 /src/cryptsetup
parentRevert "Implement SocketUser= and SocketGroup= for [Socket]" (diff)
downloadsystemd-8db9d8c2a4ef9806c286e258f9932a0972dc2375.tar.xz
systemd-8db9d8c2a4ef9806c286e258f9932a0972dc2375.zip
cryptsetup: fix inverted comparison in pass_volume_key
Diffstat (limited to 'src/cryptsetup')
-rw-r--r--src/cryptsetup/cryptsetup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index e8ba3f02a3..56a3b50974 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -468,7 +468,8 @@ int main(int argc, char *argv[]) {
opt_keyfile_size,
&params);
- pass_volume_key = !!hash;
+ /* hash == NULL implies the user passed "plain" */
+ pass_volume_key = (hash == NULL);
}
if (k < 0) {