Commit Graph

54555 Commits

Author SHA1 Message Date
Luca Boccassi
4792cc5f63 test runner: print time before/after tests
When a timeout occurs we actually can't see when the test started/stopped. Print the time.
2021-11-22 09:05:00 +00:00
Zbigniew Jędrzejewski-Szmek
0895e87348 analyze: fix printing config when there is no main config file
Since 8b8024f1c2 and the follow-up commits, the
main config file may be located in /usr or in other paths. But the code in
analyze.c was still assuming that it must be in /etc. Things mostly worked for
our own config files because we usually install a comments-only file in /etc,
but was not correct in the general case.

This fixes in particular 'systemd-analyze cat-config systemd/zram-generator.conf'.
In Fedora we distribute a config file in zram-generator-defaults.rpm that is in
/usr/lib, and 'cat-config' would refuse to show it because
/etc/systemd/zram-generator.conf does not exist.

The main config file is optional, but let's print an informative message
because this is a slightly unusual case.

The file paths that we printed were missing the root prefix.
2021-11-21 12:10:51 +00:00
Luca Boccassi
289a42304d Merge pull request #21432 from DaanDeMeyer/journal-trivial-fixes
Journal trivial fixes
2021-11-20 18:00:35 +00:00
Luca Boccassi
26bae8109d Merge pull request #21431 from DaanDeMeyer/issue-19799
journal: Limit the number of audit fields we add to a message
2021-11-20 17:58:51 +00:00
Lennart Poettering
a50966416e nspawn: use FOREACH_STRING() more 2021-11-20 17:54:53 +00:00
Christian Göttsche
7e570d575f core: prefix functions to avoid identical static function names
The function name `method_reload` is used both in dbus-unit.c and
dbus-manager.c for static functions.
With the previous addition of adding the function name to the audit
information on SELinux denials, rename the one (and its relatives) in
dbus-unit.c as most of the functions in src/core/dbus-unit.c are already
prefixed with `bus_unit_`.
2021-11-20 16:38:03 +00:00
Christian Göttsche
963438a027 selinux: name mac_selinux_generic_access_check as internal function
`mac_selinux_generic_access_check()` should not be called directly, only
via the wrapper macros `mac_selinux_access_check` and
`mac_selinux_unit_access_check`.
2021-11-20 16:38:03 +00:00
Christian Göttsche
6fbb33f631 selinux: improve debug log format
path might be NULL when checking against the system permissions, so wrap
with strna().

The command line might not be available over D-Bus and thus cl might be
empty. Print "n/a" instead of the empty string.
2021-11-20 16:38:03 +00:00
Christian Göttsche
f0804759cf selinux: add function name to audit data
Include the systemd C function name in the audit message to improve the
debug ability on denials.
Similar like kernel denial messages include the syscall name.
2021-11-20 16:38:03 +00:00
Daan De Meyer
66e2bb282b journal: Limit the number of audit fields per log message
Similar to the kmsg handler, let's also limit the number of fields
we parse from audit messages.

Fixes #19799
2021-11-19 18:50:59 +00:00
Daan De Meyer
368a14b67b journal: Add verify_hash_table()
The existing verify_hash_table() function is renamed to
verify_data_hash_table() since it only verifies the data hash table.

The verify information is also made a little more detailed by splitting
one of the checks in two.
2021-11-19 17:12:29 +00:00
Daan De Meyer
363b2b9aaf journal: Add journal_file_object_to_string() 2021-11-19 17:12:27 +00:00
Daan De Meyer
b92d1eba31 journal: Simplify definition of HEADER_INCOMPATIBLE_SUPPORTED 2021-11-19 17:06:57 +00:00
Daan De Meyer
d164ac771e journal: Use more structured initialization 2021-11-19 17:06:57 +00:00
Daan De Meyer
86e68f3814 journal: Use size_t instead of unsigned for array sizes 2021-11-19 17:06:55 +00:00
Lennart Poettering
1ccfb792e4 update TODO 2021-11-19 15:40:08 +01:00
Lennart Poettering
49d5e4d0bb doc: rebreak boot loader spec 2021-11-19 15:40:08 +01:00
Lennart Poettering
14efbfd96d docs: clarify the assumption on numeric values of JSON parsers we make
Prompted by:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/BOBD6KVTXPR6K5ANAX6LIJLKNSGXCR3B/
2021-11-19 15:10:37 +01:00
Zbigniew Jędrzejewski-Szmek
e55ed6aa85 Merge pull request #21444 from poettering/gpt-test
tests: dump table of archs + wether gpt partition type exists
2021-11-19 15:08:36 +01:00
Daniel Maixner
324b410341 removed copyright 2021-11-19 13:39:01 +00:00
Lennart Poettering
bab5077098 test-gpt: add test that shows for which archs we have GPT partition types 2021-11-19 11:23:36 +01:00
Lennart Poettering
f6ec896bc1 gpt: make gpt_partition_type_uuid_from_string() return parameter optional 2021-11-19 11:23:36 +01:00
Lennart Poettering
f85b12d6fd strv: make sure FOREACH_STRING() can be nested 2021-11-19 11:23:36 +01:00
Evgeny Vereshchagin
2fd1beb3e2 oss-fuzz: move apt-gets and pips to the systemd repository
to be able to control our dependencies right here without
sending PRs like https://github.com/google/oss-fuzz/pull/5199 and
https://github.com/google/oss-fuzz/pull/5601.

It should also allow us to pin meson to let Dependabot keep track of
it and jump from one version to another without breaking anything
2021-11-19 08:52:28 +00:00
Zbigniew Jędrzejewski-Szmek
39c37ca2d2 Merge pull request #21436 from yuwata/network-bus-introspect
network: add --bus-introspect option
2021-11-19 09:42:46 +01:00