]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/ask-password-api.c
ask-password: check keyring in ask_password_tty and ask_password_agent
authorXiang Fan <sfanxiang@gmail.com>
Wed, 24 Oct 2018 10:34:04 +0000 (18:34 +0800)
committerLennart Poettering <lennart@poettering.net>
Wed, 31 Oct 2018 17:26:58 +0000 (18:26 +0100)
commitc7b7d74e81bae65ffef38f46dd6abf0b8a9c3d4f
tree2e99111cfda17bbfcd6f213871cc3a33adfbd81d
parent45313bd9211d456b8e27486ab9032572ce6743bd
ask-password: check keyring in ask_password_tty and ask_password_agent

A race condition happens when calling ask_password_auto() multiple times
to unlock several disks on boot and effectively no password caching is
utilized. This patch fixes it by polling the cache when waiting for
the password.
src/firstboot/firstboot.c
src/shared/ask-password-api.c
src/shared/ask-password-api.h
src/test/test-ask-password-api.c
src/tty-ask-password-agent/tty-ask-password-agent.c