]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptsetup: rework how we log about activation failures 11513/head
authorLennart Poettering <lennart@poettering.net>
Mon, 21 Jan 2019 19:19:11 +0000 (20:19 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 23 Jan 2019 22:37:17 +0000 (23:37 +0100)
commit6f177c7dc092eb68762b4533d41b14244adb2a73
tree620a20d0e66f394b9fbf4516e09dbde1f3dca3c6
parent906962f312e3f17b1e76cc6b9f4f344d76df1d7f
cryptsetup: rework how we log about activation failures

First of all let's always log where the errors happen, and not in an
upper stackframe, in all cases. Previously we'd do this somethis one way
and sometimes another, which resulted in sometimes duplicate logging and
sometimes none.

When we cannot activate something due to bad password the kernel gives
us EPERM. Let's uniformly return this EAGAIN, so tha the next password
is tried. (previously this was done in most cases but not in all)

When we get EPERM let's also explicitly indicate that this probably
means the password is simply wrong.

Fixes: #11498
src/cryptsetup/cryptsetup.c