]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/firstboot/firstboot.c
tty-ask-password-agent: don't open terminal multiple times
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Feb 2018 23:10:00 +0000 (00:10 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Feb 2018 23:11:16 +0000 (00:11 +0100)
commitdaa557208de1d77d4aa4f8f8fb162b10d796678f
tree96fca15e972d589bcb5f66dc709509bd71294ed4
parent088dcd8e41c589f1a180124370a90768a8bd521d
tty-ask-password-agent: don't open terminal multiple times

We already have the terminal open, hence pass the fd we got to
ask_password_tty(), so that it doesn't have to reopen it a second time.

This is mostly an optimization, but it has the nice benefit of making us
independent from RLIMIT_NOFILE issues and so on, as we don't need to
allocate another fd needlessly.
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