1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
Commit Graph

36661 Commits

Author SHA1 Message Date
Lennart Poettering
f60947d970 debug-generator: port over to DEFINE_MAIN_FUNCTION() 2018-11-19 21:14:34 +01:00
Lennart Poettering
8a4fdaf292 main-func: automatically call static destructors from main-func.h macros 2018-11-19 21:14:34 +01:00
Lennart Poettering
67e16c31e9 util: add set of macros for declaring _cleanup_-style destructors for static variables 2018-11-19 21:14:34 +01:00
Lennart Poettering
5e332028f2 util-lib: move main() definition macros to its own header file
This way, we can extend the macro a bit with stuff pulled in from other
headers without this affecting everything which pulls in macro.h, which
is one of our most basic headers.

This is just refactoring, no change in behaviour, in prepartion for
later changes.
2018-11-19 21:14:34 +01:00
Lennart Poettering
2a44bf5099
Merge pull request #10811 from keszybz/define-main-through-macro
Define main through macro
2018-11-19 15:28:17 +01:00
Lennart Poettering
2675747f3c pam_systemd: suppress LOG_DEBUG log messages if debugging is off
In the PAM module we need to suppress LOG_DEBUG messages manually, if
debug logging is not on, as PAM won't do this for us. We did this
correctly for most log messages already, but two were missing. Let's fix
those too.

Fixes: #10822
2018-11-19 14:03:34 +01:00
Lennart Poettering
e16f425654
Merge pull request #10698 from yuwata/udevd-replace-udev-device
udevd: replace udev_device by sd_device
2018-11-19 11:28:45 +01:00
Lennart Poettering
b08020893a
Merge pull request #10809 from keszybz/unit-log-result
Add helper function for logging unit results
2018-11-19 11:07:07 +01:00
Lennart Poettering
431957c959
Merge pull request #10814 from poettering/logind-suspend-fallback
if we need to hibernate/suspend-then-hibernate/hybrid-sleep due to keypress/lid switch but can't, fallback to regular suspend
2018-11-19 11:05:48 +01:00
Lennart Poettering
a44088f10f
Merge pull request #10825 from keszybz/advertize-followup
udev link advertizing followup
2018-11-19 11:05:18 +01:00
Lennart Poettering
2b38a8ea80
Merge pull request #10507 from cdown/cpu_acct
cgroup v2: Don't require CPU controller for CPU accounting in 4.15+
2018-11-19 10:57:48 +01:00
Evgeny Vereshchagin
f7f8e8cbb9 test: kill all processes launched by test-execute before exiting
As was shown in https://github.com/systemd/systemd/issues/10696#issuecomment-439613204,
currently `meson` waits for 1080 seconds (which is three times the global timeout) for the
test to fail completely even though it takes just two minutes for it to really fail. This
happens because the test itself leaves the services it has launched behind, which, in turn, makes
meson think that the test is still in progress. KILL_ALL with SIGKILL should make the issue
go away.
2018-11-19 09:24:22 +01:00
Piotr Drąg
85b18dbec5 catalog: update Polish translation 2018-11-19 09:23:04 +01:00
Xi Ruoyao
b0fbf9bd40 test: let the shell find "touch" instead of hard-coded "/bin/touch" 2018-11-19 08:37:36 +01:00
Zbigniew Jędrzejewski-Szmek
64d9f7568b basic/missing: drop _ETHTOOL_LINK_MODE_MAX
It was only used in one place, where we don't actually need it, and
it is too easy to forget to update it when adding new items to the table.
Let's just drop it.
2018-11-18 16:14:21 +01:00
Zbigniew Jędrzejewski-Szmek
5dd101186b udev: use an "inline" array instead of allocating for advertise mode
The code is a bit shorter and we don't allocate the uint32_t[127] array.
2018-11-18 16:14:19 +01:00
Zbigniew Jędrzejewski-Szmek
7f6bfc561f basic/util: import memeqzero from casync 2018-11-18 16:12:53 +01:00
Chris Down
a88c5b8ac4 cgroup v2: DefaultCPUAccounting=yes if CPU controller isn't required
We now don't enable the CPU controller just for CPU accounting if we are
on 4.15+ and using pure unified hierarchy, as this is provided
externally to the CPU controller. This makes CPUAccounting=yes
essentially free, so enabling it by default when it's cheap seems like a
good idea.
2018-11-18 12:21:41 +00:00
Chris Down
94ddb08d74 cgtop: Still try to get CPU statistics if controller-free
If CPU accounting is cheap, no controller necessarily needs to be
enabled here for us to be able to read statistics.
2018-11-18 12:21:41 +00:00
Chris Down
f98c25850f cgroup v2: Don't require CPU controller for CPU accounting in 4.15+
systemd only uses functions that are as of Linux 4.15+ provided
externally to the CPU controller (currently usage_usec), so if we have a
new enough kernel, we don't need to set CGROUP_MASK_CPU for
CPUAccounting=true as the CPU controller does not need to necessarily be
enabled in this case.

Part of this patch is modelled on an earlier patch by Ryutaroh Matsumoto
(see PR #9665).
2018-11-18 12:21:41 +00:00
Zbigniew Jędrzejewski-Szmek
09c984c6f7 test-util: modernize 2018-11-18 10:47:16 +01:00
Zbigniew Jędrzejewski-Szmek
b8cb5effeb
Merge pull request #10819 from yuwata/fix-10807
ethtool: drop NetDevAdvertise
2018-11-18 10:27:29 +01:00
Yu Watanabe
2d18ac4491 ethtool: drop NetDevAdvertise
Fixes #10807.
2018-11-18 14:33:50 +09:00
Yu Watanabe
8a716f26ef missing: add ETHTOOL_LINK_MODE_* and struct ethtool_link_settings 2018-11-18 14:33:50 +09:00
Zbigniew Jędrzejewski-Szmek
f921797d61
Merge pull request #10817 from evverx/audit-fuzzer
Add a fuzzer for process_audit_string
2018-11-17 18:26:54 +01:00
Yu Watanabe
af18705f8e test: also tests enumerating subsystems 2018-11-17 18:18:22 +01:00
Yu Watanabe
eb546b3532 udevd: replace udev_device in struct event by sd_device 2018-11-17 21:45:03 +09:00
Yu Watanabe
044497e2a3 udevd: update several log messages 2018-11-17 21:45:03 +09:00
Yu Watanabe
ba47b71c2d udevd: decrease indentation 2018-11-17 21:45:03 +09:00
Yu Watanabe
d8f462b435 udevd: rename event sources in struct event 2018-11-17 21:45:03 +09:00
Yu Watanabe
dc7faf2a6f udevd: capitalize log messages in on_sigchld() 2018-11-17 21:45:03 +09:00
Yu Watanabe
e2130348ef udevd: also use sd_device_monitor_start() in worker_main() 2018-11-17 21:45:03 +09:00
Yu Watanabe
f00d2b6dd2 udevd: use sd_device_monitor_start() in manager_new() 2018-11-17 21:45:03 +09:00
Yu Watanabe
7f2e3a1409 udevd: replace udev_monitor by sd_device_monitor 2018-11-17 21:45:03 +09:00
Yu Watanabe
7443654e5f udevd: use safe_fork() to spawn worker process 2018-11-17 21:45:03 +09:00
Yu Watanabe
abde5ea854 udevd: make worker_process_device() take sd_device instead of udev_device 2018-11-17 21:45:03 +09:00
Yu Watanabe
b97897e3e8 udevd: make worker_lock_block_device() take sd_device instead of udev_device
Also adds many debug logs.
2018-11-17 21:45:02 +09:00
Yu Watanabe
0bed242cbe udevd: split worker_spawn() and manager_free() in small pieces 2018-11-17 21:45:02 +09:00
Evgeny Vereshchagin
ed62712dc6 tests: introduce dummy_server_init and use it in all journald fuzzers 2018-11-17 13:02:26 +01:00
Evgeny Vereshchagin
b6b35f0e0b travis: make the ASan & UBsan job a little bit stricter 2018-11-17 14:20:49 +03:00
Evgeny Vereshchagin
1dab14aba7 journald: check whether sscanf has changed the value corresponding to %n
It's possible for sscanf to receive strings containing all three fields
and not matching the template at the same time. When this happens the
value of k doesn't change, which basically means that process_audit_string
tries to access memory randomly. Sometimes it works and sometimes it doesn't :-)

See also https://bugzilla.redhat.com/show_bug.cgi?id=1059314.
2018-11-17 11:25:19 +01:00
Zbigniew Jędrzejewski-Szmek
51e2378642 volatile-root: define main through macro 2018-11-17 09:13:35 +01:00
Zbigniew Jędrzejewski-Szmek
0420d20dd2 tty-ask-password-agent: define main through macro 2018-11-17 09:13:35 +01:00
Zbigniew Jędrzejewski-Szmek
47031c9276 sysv-generator: configure logging before use and define main through macro 2018-11-17 09:13:35 +01:00
Zbigniew Jędrzejewski-Szmek
1b425cb28f stdio-bridge: define main through macro 2018-11-17 09:13:35 +01:00
Zbigniew Jędrzejewski-Szmek
7caefb8140 sleep: define main through macro 2018-11-17 09:13:35 +01:00
Zbigniew Jędrzejewski-Szmek
6e61c701f2 remount-fs: configure logging before use and define main through macro 2018-11-17 09:13:35 +01:00
Zbigniew Jędrzejewski-Szmek
72d0d7a628 random-seed: configure logging before use and define main through macro 2018-11-17 09:13:35 +01:00
Zbigniew Jędrzejewski-Szmek
2ab2a55bd6 quotacheck: configure logging before use and define main through macro 2018-11-17 09:13:35 +01:00
Zbigniew Jędrzejewski-Szmek
44c5d0442e portabled: add missing STOPPING=1 notification 2018-11-17 09:13:35 +01:00