1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-26 10:03:40 +03:00

58925 Commits

Author SHA1 Message Date
James Hilliard
0a0d489968 journalctl: allow statically linked build
The journalctl tool may be needed on cross compilation hosts in order
to run --update-catalog against a target rootfs.

To avoid reliability issues caused by shared linking allow journalctl
to be linked statically.
2022-07-29 09:22:54 +09:00
Daan De Meyer
219fa78b5f units: Simplify container getty handling
Let's remove the baud settings for the container getty units since
they don't have any effect there anyway. On top of that, when we're
dealing with container TTYs, we can handle all the setup involved
ourselves so let's prevent agetty/login from touching the container
tty at all.

One example where this helps is that it actually makes disabling
TTYVHangup have an effect since before, login would unconditionally
call vhangup() on the tty.
2022-07-28 21:30:53 +02:00
Daan De Meyer
71ec216e86
Merge pull request #24080 from rdtscp/feature/machinectl/copy-force-flag
Add --force flag to machinectl copy-[to|from]
2022-07-28 14:15:33 +02:00
Lennart Poettering
5b6e5d57d0 update TODO 2022-07-28 11:25:26 +02:00
Luca Boccassi
bffb318491
Merge pull request #23875 from yuwata/resolve-mdns-fix-use-after-free
resolve: mdns: fix use-after-free
2022-07-27 22:57:31 +01:00
Janis Goldschmidt
9e670fdc4b Use correct option name in error message 2022-07-27 16:50:30 +01:00
Alexander Wilson
ae03e1a972 machinectl: Add plumbing for a --force flag for file copy
machine: Add APIs CopyTo[Machine]WithFlags + CopyFrom[Machine]WithFlags
- Same API to those without `WithFlags` (except this can take flags)
- Initially, only a flag to allow replacing a file if it already exists
2022-07-27 08:41:03 -07:00
Alexander Wilson
922409558e copy: Respect COPY_REPLACE flag for copy_tree
- Add a test that asserts that copy_tree on an existing file will fail without COPY_REPLACE
- Add a test that asserts that copy_tree with COPY_MERGE and COPY_REPLACE on an existing directory will overwrite files that already exist.
2022-07-27 08:40:59 -07:00
Alexander Wilson
d3e2a7f7e6 copy.[ch]: Refactor
- Refactor: Move HardlinkContext to header file
- Refactor: Create `fd_copy_tree_generic` which isolates the functionality to check stat type and appropriately copy.
- Refactor: Create `fd_copy_leaf` which handles copying leaf nodes of a file tree.
2022-07-27 03:09:35 -07:00
Lennart Poettering
24120e4038 stub: override StubInfo EFI variable unconditionally, since *we* own it
The other variables are owned by the boot menu (i.e. sd-boot), we only
fill those in if it didn't do so for us (to support cases where our stub
kernel is directly invoked by UEFI). But StubInfo is genuinely about the
stub, hence let's simplify things and unconditionally set it from the
stub.
2022-07-27 10:34:31 +02:00
Lennart Poettering
e8c6487a74 boot: introduce common shortcut exit path in pack_cpio()
THis will be useful in a later commit, when we add more stuff to the
common exit path. But even without that, it's a nice simplification,
removing redundant lines.
2022-07-27 09:29:08 +01:00
Luca Boccassi
f2d26cd89b portable: set PrivateTmp=yes in trusted profile too
When running on images you don't want to modify the /tmp
directory even if it's writable, and often it will just
be read-only. Set PrivateTmp=yes.

Fixes https://github.com/systemd/systemd/issues/23592
2022-07-26 23:18:12 +01:00
Luca Boccassi
e9c88a608c
Merge pull request #24122 from yuwata/core-mount-bind-mount-on-nfs
core/mount: ignore -EACCES from mkdir_p_label() on NFS
2022-07-26 23:17:23 +01:00
Daan De Meyer
a41940ed0e mkosi: Update to latest commit
Fixes an issue with Arch builds failing by updating the archlinux
keyring package.
2022-07-26 21:13:40 +00:00
Lennart Poettering
b447955d09 efi: update measure.h comments a bit 2022-07-26 20:48:45 +02:00
Lennart Poettering
5a20b1aacb update TODO
(this basically just copies a coment from src/boot/efi/measure.h into
the TODO)
2022-07-26 20:47:41 +02:00
asavah
3296334473 meson: fix math flags check 2022-07-27 02:27:43 +09:00
Yu Watanabe
574febda6b core/mount: downgrade log level about several mkdir failures 2022-07-27 01:13:27 +09:00
Yu Watanabe
e5e6b7c225 Revert "core/mount: fail early if directory cannot be created"
This reverts commit e4de58c8231e47509ffeb3aa47620ca42f22d7f6.

If mkdir() fails and the path does exist, then the later mount
command fails anyway. Hence, it is not necessary to fail here.

Fixes #24120.
2022-07-27 01:13:27 +09:00
Daan De Meyer
2d62579570 mkosi: Build against Fedora rawhide as well 2022-07-26 23:42:45 +09:00
Yu Watanabe
0a58cd0045 home: drop conflicted headers
Fixes #24117.
2022-07-26 23:41:48 +09:00
Yu Watanabe
52023622d2 homed: fix dbus node enumerator
Fixes #24114.
2022-07-26 23:11:34 +09:00
Lennart Poettering
5f4ccb0705
Merge pull request #23702 from igo95862/fix-object-manager-interface-in-wrong-places
Fix ObjectManager interfaces for `GetManagedObjects`, `InerfacesAdded` and `InterfacesRemoved`
2022-07-26 11:24:02 +02:00
igo95862
b283d50240
Fix ObjectManager interface emitted for non-manager objects 2022-07-25 23:54:54 +03:00
igo95862
19b581466a
test-bus-objects: Test interfaces added/removed signal interfaces
`org.freedesktop.DBus.ObjectManager` should only be emitted if
object in question has ObjectManager attached.
2022-07-25 23:53:18 +03:00
igo95862
2ccd0828fc
Fix GetManagedObjects returning ObjectManager interface for non-manager objects 2022-07-25 23:37:00 +03:00
igo95862
724e13b346
test-bus-objects: Test GetManagedObjects interfaces are correct
Objects without ObjectManager should not have
`org.freedesktop.DBus.ObjectManager` interface.

Object with ObjectManager should do.

Also added ASSERT_SE_NONNEG and ASSERT_NONNEG macros.
2022-07-25 23:29:17 +03:00
Luca Boccassi
406f62edae
Merge pull request #24033 from dtardon/list-automounts
Add `systemctl list-automounts`
2022-07-25 21:28:11 +01:00
Lennart Poettering
d3efe29452 localed: don't fail if we cannot copy an xattr
We ignore xattr copy failures on all other cases, and we should do so
here too.

Fixes: #24106
2022-07-25 20:32:57 +01:00
Lennart Poettering
1160267a98 update TODO 2022-07-25 16:08:10 +02:00
Lennart Poettering
9eb41aab8c update TODO 2022-07-25 15:01:37 +02:00
Lennart Poettering
812a873123 update TODO 2022-07-25 14:59:35 +02:00
Lennart Poettering
3345802cd7 TODO: add new 'deprecations and removals' section 2022-07-25 14:55:48 +02:00
Daan De Meyer
75db32dcd8 journal: Move more pattern matching logic into pcre2-util
To avoid having "#if HAVE_PCRE2" all throughout the code, let's
confine the pcre2 header specific stuff to pcre2-util.c. Instead of
exposing all the individual symbols from pcre2, let's only expose
three high level functions that do all we need:

- pcre2_pattern_compile(): Compile the regex
- pcre2_pattern_matches(): Check if the compiled regex matches a message
- pcre2_pattern_free(): Free the compiled regex

We expose the compiled pcre2 pattern (which is of type pcre2_code *) as
a void pointer to avoid having to include pcre2.h in all code where we
work with compiled pcre2 patterns. For readability, we typedef void
to pcre2_pattern and use that as the type specifier for compiled pcre2
patterns.
2022-07-25 14:16:17 +02:00
David Tardon
5edea3b77e shell-completion: add systemctl list-automounts 2022-07-25 13:37:20 +02:00
David Tardon
2d5cdc6224 man: document systemctl list-automounts 2022-07-25 13:37:20 +02:00
David Tardon
ed462ea3fa systemctl: add list-automounts verb
Fixes: #6056
2022-07-25 13:37:19 +02:00
David Tardon
0f787940b7 systemctl: simplify var. definition a bit 2022-07-25 13:23:19 +02:00
David Tardon
11d6270b42 systemctl: extract output of legend to a function 2022-07-25 13:23:17 +02:00
David Tardon
25facd0384 systemctl: drop unneeded condition 2022-07-25 13:12:31 +02:00
David Tardon
551d0afe2e systemctl: reduce var. scope and shorten the code a bit 2022-07-25 13:08:12 +02:00
Frantisek Sumsal
05abe85033 boot: a couple of tweaks recommended by Coccinelle 2022-07-25 12:47:23 +02:00
Lennart Poettering
46e6449acb systemctl: fix type used for array sizes to size_t
We always should use size_t for sizes of arrays (and any size of memory,
in fact), unless there's a strong reason to use something else. Hence,
let's fix these cases where we sloppily used "unsigned" or "int"
instead.

No change in behaviour, this is just to make things less surprising for
the random reader.
2022-07-25 12:46:57 +02:00
Lennart Poettering
8f304b991c
Merge pull request #23991 from yuwata/udev-reload
udev: reload rules and builtins only when mtime of a config changed
2022-07-25 11:20:08 +02:00
Quentin Deslandes
e88748c17e sysctl: add --strict option to fail if sysctl does not exists
systemd-sysctl currently fails silently under any of these conditions:
- Missing permission to write a sysctl.
- Invalid sysctl (path doesn't exists).
- Ignore failure flag ('-' in front of the sysctl name).

Because of this behaviour, configuration issues can go unnoticed as
there is no way to detect those unless going through the logs.

--strict option forces systemd-sysctl to fail if a sysctl is invalid or
if permission are insufficient. Errors on sysctl marked as "ignore
failure" will still be ignored.
2022-07-25 10:15:43 +02:00
Rudi Heitbaum
3657d3a01c glibc: Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36 2022-07-24 20:52:35 +09:00
Yu Watanabe
7c35b78a0b unit-file: avoid (null) in debugging logs
The variable `inst` was set to NULL by TAKE_PTR().

This fixes the following log message:
```
systemd[1]: Unit getty@tty2.service has alias (null).
```
2022-07-24 20:51:27 +09:00
Yu Watanabe
978642b633
Merge pull request #24020 from yuwata/network-rfkill
network: fix wlan interface handling when its RF is killed
2022-07-24 13:01:50 +09:00
Yu Watanabe
cd331a6d51
Merge pull request #23828 from yuwata/nfnl-cleanups
sd-netlink: several cleanups for netfilter
2022-07-24 13:01:28 +09:00
Yu Watanabe
573bb24df7 sd-netlink: introduce sd_nfnl_{send,call}_batch()
This also introduces sd_nfnl_message_new() which can be also used for
non-nftables subsystems.
2022-07-24 00:16:21 +09:00