]> git.ipfire.org Git - thirdparty/systemd.git/commit
coredump: accept hostname on command line (#8033)
authorJakub Filak <jakub@thefilaks.net>
Thu, 15 Feb 2018 11:12:46 +0000 (12:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 15 Feb 2018 11:12:46 +0000 (12:12 +0100)
commitf45b8015513d38ee5f7cc361db9c5b88c9aae704
treefbf25c8847bd2cea4c1aea2f10a184fa967e5cea
parent2e016b98c37edc8d01f37e0126cae901cde8c708
coredump: accept hostname on command line (#8033)

This commint adds a new command line parameter to sytemd-coredump. The
parameter should be mappend to core_pattern's placeholder %h - hostname.

The field _HOSTNAME holds the name from the kernel's namespaces which might be
different then the one comming from process' namespaces.

It is true that the real hostname is usually available in the field
COREDUMP_ENVIRON (environment variables) but I believe it is more reliable to
use the value passed by kernel.

----

The length of iovec is no longer static and hence I corrected the declarations
of the functions set_iovec_field and set_iovec_field_free.

Thank you @yuwata and @poettering!
src/coredump/coredump.c
sysctl.d/50-coredump.conf.in