1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 21:55:36 +03:00
Commit Graph

62756 Commits

Author SHA1 Message Date
Daan De Meyer
06762aa53e journal-file: Improve debug messages 2023-02-23 19:16:59 +00:00
Daan De Meyer
0399902440 journal-file: Fix return value in bump_entry_array() 2023-02-23 19:11:25 +00:00
Yu Watanabe
43823dfefd systemctl: use bus_message_hash_ops 2023-02-23 19:10:00 +00:00
Lennart Poettering
efb18b6ae7 man: link up sd_event_add_memory_pressure() more 2023-02-23 19:04:56 +00:00
Daan De Meyer
caeb2b616f
Merge pull request #26258 from DaanDeMeyer/boot-smbios
stub: Read extra kernel command line items from SMBIOS
2023-02-23 15:59:18 +01:00
Yu Watanabe
500ecfd513
Merge pull request #26535 from yuwata/systemctl-list-cleanups
systemctl-list: several cleanups
2023-02-23 21:38:13 +09:00
Yu Watanabe
e47c426b5c
Merge pull request #26560 from yuwata/journal-send-fix-memleak-and-cleanups
sd-journal: several fixlets and cleanups for sd_journal_send()
2023-02-23 21:37:20 +09:00
Yu Watanabe
4de2b47bde core/dbus-socket: check the socket path is absolute
In config_parse_socket_listen(), we have checked the path is absolute,
however we have not in the dbus method.
2023-02-23 21:34:16 +09:00
Lennart Poettering
638fd8ccb8 execute: pass ambient caps from PAM through to invoked service
If a PAM service sets some ambient caps, we should honour that, hence
query it, and merge it with our own ambient settings.

This needs to be done manually since otherwise dropping privs via
setresuid() will undo all such caps, and we need to manually tweak
things to keep them.
2023-02-23 12:53:09 +01:00
Zbigniew Jędrzejewski-Szmek
20b569a4c6
Merge pull request #26563 from dtardon/fd-init
Initialize fds with -EBADF + drop one unneeded initialization
2023-02-23 11:43:09 +01:00
Zbigniew Jędrzejewski-Szmek
a34180a22f
Merge pull request #26556 from keszybz/list-timers-optimize-left
Do not say " left" on every timer in LEFT column
2023-02-23 11:37:48 +01:00
Yu Watanabe
1b7b956a9b systemctl: cleanups for list-paths
- Rename struct path_info -> PathInfo,
- Drop struct path_infos,
- Use CLEANUP_ARRAY(),

No functional change, just refactoring.
2023-02-23 18:00:38 +09:00
Yu Watanabe
032b3f518c systemctl: cleanups for list-automounts
- Rename struct automount_info -> AutomountInfo,
- use CLEANUP_ARRAY(), and etc.

No functional change, just refactoring.
2023-02-23 18:00:38 +09:00
Yu Watanabe
0e351e9a27 systemctl: cleanups for list-timers
- Rename struct timer_info -> TimerInfo,
- use CLEANUP_ARRAY().

No functional change, just refactoring.
2023-02-23 18:00:38 +09:00
Yu Watanabe
1b87606639 systemctl: cleanups for list-sockets
- Rename struct socket_info -> SocketInfo.
- Drop own_triggered field, and always copy the triggered field.
- Use CLEANUP_ARRAY().

No functional changes, just refactoring.
2023-02-23 18:00:24 +09:00
Daan De Meyer
c8e5d82c97 vmm: Modernize get_smbios_table() 2023-02-23 09:51:20 +01:00
Daan De Meyer
717af0de46 stub: Read extra kernel command line items from SMBIOS
Let's read more kernel command line arguments from SMBIOS OEM string
io.systemd.stub.kernel-cmdline-extra. This allows adding debug kernel
command line arguments when booting in qemy without having to modify
the UKI.
2023-02-23 09:51:18 +01:00
David Tardon
fabaf9ae25 bootctl: drop unneeded initialization 2023-02-23 09:50:26 +01:00
Daan De Meyer
a885188b3a vmm: Add smbios_find_oem_string()
This function can be used to find SMBIOS strings in the SMBIOS Type 11
table.
2023-02-23 09:50:18 +01:00
Daan De Meyer
761f62fe98 vmm: Add more const
SMBIOS tables are immutable, so let's access it via const pointers
where possible.
2023-02-23 09:50:18 +01:00
Daan De Meyer
e71f0f63da efi-string: Add efi_memchr() 2023-02-23 09:49:56 +01:00
David Tardon
92651a7a2d tree-wide: initialize fds with -EBADF 2023-02-23 09:48:54 +01:00
Lennart Poettering
f1e1614e10
Merge pull request #26458 from yuwata/core-network-namespace-remount-sysfs
core: remount sysfs when network and mount namespace are enabled
2023-02-23 09:44:06 +01:00
Yu Watanabe
1912f790fe sd-event: fix error handling
Follow-up for 6d2326e036.
2023-02-23 09:27:48 +01:00
Lennart Poettering
ca06d8984f
Merge pull request #26559 from yuwata/sd-event-memory-pressure-follow-ups
sd-event: follow-ups for memory pressure event source
2023-02-23 09:27:20 +01:00
Yu Watanabe
f2ccc0d3e1 systemctl-list-units: drop unused return value 2023-02-23 15:13:05 +09:00
Yu Watanabe
eef96911e1 systemctl-list-units: fix memleak on error 2023-02-23 15:13:05 +09:00
Yu Watanabe
5648ebaf40 sd-journal: fix memleak and freeing invalid pointers
This also makes
- use GREEDY_REALLOC() or GREEDY_REALLOC0(),
- use CLEANUP_ARRAY() macro.
2023-02-23 15:09:59 +09:00
Yu Watanabe
de5cc016b5 io-util: drop double evaluation in IOVEC_INIT_STRING()
This also makes IOVEC_INIT_STRING() and IOVEC_MAKE_STRING() identical.
2023-02-23 15:09:59 +09:00
Yu Watanabe
65e7d565e4 io-util: introduce IOVEC_NULL 2023-02-23 15:09:59 +09:00
Lennart Poettering
253a83ea44 io-util: introduce iovec_array_free()
It will be used in later commits.
2023-02-23 15:09:59 +09:00
Yu Watanabe
752e92615d test-execute: add test for PrivateNetwork= with/without mount namespacing 2023-02-23 15:09:13 +09:00
Yu Watanabe
c2da3bf237 core/namespace: mount new sysfs when new network namespace is requested
Even when a mount namespace is created, previously host's sysfs is used,
especially with RootDirectory= or RootImage=, thus service processes can
still access the properties of the network interfaces in the main network
namespace through sysfs.

This makes, sysfs is remounted with the new network namespace tag, except
when PrivateMounts= is explicitly disabled. Hence, the properties of the
network interfaces in the main network namespace cannot be accessed by
service processes through sysfs.

Fixes #26422.
2023-02-23 15:09:13 +09:00
Yu Watanabe
277b269e25 core/namespace: introduce a new namespace mount mode PRIVATE_SYSFS
This is useful when a service running with a new network namespace.

The mount mode is not used yet, but will be used in a later commit.
2023-02-23 15:09:13 +09:00
Yu Watanabe
10028263fd core/namespace: rename SYSFS -> BIND_SYSFS
No functional change, just preparation for later commits.
2023-02-23 15:09:13 +09:00
Yu Watanabe
f63a2c4821 mount-util: introduce remount_sysfs()
This is useful when creating a new network namespace. Unlike procfs,
we need to remount sysfs, otherwise properties of the network interfaces
in the main network namespace are still accessible through the old sysfs,
e.g. /sys/class/net/eth0. All sub-mounts previously mounted on the sysfs
are moved onto the new sysfs mount.

The function will be used in later commits.
2023-02-23 15:09:13 +09:00
Yu Watanabe
2400212128 core/execute: make PrivateMounts= tristate
No functional change, just preparation for later commits.
2023-02-23 15:09:13 +09:00
Yu Watanabe
faac56d5d2 core/dbus-util: introduce bus_set_transient_tristate()
This will be used in later commits.
2023-02-23 15:09:13 +09:00
Yu Watanabe
ec1b4be82e bus-util: introduce bus_property_get_tristate()
This will be used in later commits.
2023-02-23 15:09:13 +09:00
Yu Watanabe
fde36d2581 core/execute: introduce exec_needs_ipc_namespace() helper function
This also fixes a missing condition in exec_runtime_make().
2023-02-23 15:09:13 +09:00
Yu Watanabe
fbbb9697b6 core/execute: introduce exec_needs_network_namespace() helper function 2023-02-23 15:09:13 +09:00
Yu Watanabe
06b3a2f6f0 core/namespace: drop unused field in NamespaceInfo 2023-02-23 15:09:13 +09:00
Yu Watanabe
dcef5e293f
Merge pull request #26555 from poettering/cleanup-array
add gcc cleanup attribute based logic to destroy arrays
2023-02-23 15:08:56 +09:00
Lennart Poettering
8c2d0d3af4 tree-wide: port various things over to CLEANUP_ARRAY() 2023-02-23 11:43:43 +09:00
Lennart Poettering
ff3f1464ec memory-util: add a concept for gcc cleanup attribute based array destruction 2023-02-23 11:43:43 +09:00
Yu Watanabe
63b1e67ed9 sd-event: fix error handling
Follow-up for 158fe190af.
2023-02-23 11:05:59 +09:00
Yu Watanabe
40c5d5d2a1 sd-event: fix use of uninitialized variable
Follow-up for 158fe190af.

Fixes CID#1505670.
2023-02-23 11:05:49 +09:00
Yu Watanabe
c7d941c527
Merge pull request #26557 from poettering/more-cap-utils
new helper for cap-list.[ch] + capability-util.[ch]
2023-02-23 10:44:53 +09:00
Yu Watanabe
2457a36d30
Merge pull request #26542 from medhefgo/boot-device-path
boot: Misc device path improvements
2023-02-23 10:26:40 +09:00
Yu Watanabe
6d2326e036 sd-event: always initialize sd_event.perturb
If the boot ID cannot be obtained, let's first fallback to the machine
ID, and if still cannot, then let's use 0.
Otherwise, no timer event source cannot be triggered.

Fixes #26549.
2023-02-23 10:11:45 +09:00