fba50bc coredump: Connect stdout/stderr to /dev/null before doing anything

1 file Authored by daandemeyer 2 years ago, Committed by zbyszek 2 years ago,
    coredump: Connect stdout/stderr to /dev/null before doing anything
    
    When invoked as the coredump handler by the kernel, systemd-coredump's
    stdout and stderr streams are closed. This is dangerous as this means
    the fd's can get reallocated, leading to hard to debug errors such as
    log messages ending up being appended to a compressed coredump file.
    
    To avoid such issues in the future, let's bind stdout/stderr to
    /dev/null so the file descriptors can't get used for anything else.
    
    (cherry picked from commit 1f9d2a8199c261593aa6a11df9cce5d31e23c714)
    
        
file modified
+7 -0