]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemd-fsck: fix systemd-fsck/fsck pipe bad closure
authorBenjamin Bouvier <benjamin.bouvier@nokia.com>
Tue, 1 Oct 2019 09:12:10 +0000 (12:12 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 18 Oct 2019 14:07:00 +0000 (16:07 +0200)
commite4fc74554773969ab208427c8489bd21af4195db
treeb57e7e4943a88566aa54595cfde7219053a69f59
parentab84cf91911b54e51096c889b084a825a23a4e26
systemd-fsck: fix systemd-fsck/fsck pipe bad closure

Currently, when console is disabled but progress is tracked, pipe opened
for communication between systemd-fsck and fsck may be closed
inadvertently (when opening of /dev/console return in error). That lead
to finish fsck prematurely (because it receives a SIGPIPE) and so fsck
may not check correctly filesystems and do not have time to fix memory
corruptions.

This commit changes the opening of /dev/console to be done previously to
pipe creation and so fix the bug described just above.
src/fsck/fsck.c