Mike Yuan [Thu, 26 Oct 2023 12:27:12 +0000 (20:27 +0800)]
sleep: introduce sleep_operation_is_hibernation
xinpeng wang [Wed, 25 Oct 2023 03:19:58 +0000 (11:19 +0800)]
logind: fix abnormal switching causing the screen to go black
After logind receives the SIGRTMIN signal from the kernel, it will execute
manager_vt_switch---session_leave_vt---session_device_pause_all,The device
permissions of the session are removed here;under normal circumstances, the
tty value read from /sys/class/tty/tty0/active changes and switchesto a new
session,give the new session resume device permissions.
But under abnormal circumstances (such as switching quickly on a device using
wayland; and sometimes the kernel will suddenly send a SIGRTMIN signal, but
nothing changes),In these cases, logind does not give session resume device
permission, causing the device to have a black screen and suspended animation.
janana [Fri, 27 Oct 2023 08:19:48 +0000 (16:19 +0800)]
udev: fix typo for persistent flag
The 'parsistent' adjective is misspelt.
Luca Boccassi [Thu, 26 Oct 2023 23:10:28 +0000 (00:10 +0100)]
Merge pull request #29332 from esposem/ukify_simplify
ukify: automatically infer --signtool from the parameters given
Michal Sekletar [Wed, 25 Oct 2023 11:17:18 +0000 (13:17 +0200)]
fstab-generator: drop nofail and noauto options for critical mounts
Setting nofail for /usr mount doesn't make sense because without /usr we
can't really boot. However, having the flag set might cause races in
initrd where we could try to switchroot into rootfs before /usr is
actually mounted. Let's just ignore it so that we always have proper
mount unit ordering for /sysroot/usr mount.
Ronan Pigott [Thu, 26 Oct 2023 21:32:55 +0000 (14:32 -0700)]
editorconfig: add NEWS whitespace configuration
Lennart Poettering [Thu, 26 Oct 2023 16:45:33 +0000 (18:45 +0200)]
fd-uitl: rename PIPE_EBADF → EBADF_PAIR, and add EBADF_TRIPLET
We use it for more than just pipe() arrays. For example also for
socketpair(). Hence let's give it a generic name.
Also add EBADF_TRIPLET to mirror this for things like
stdin/stdout/stderr arrays, which we use a bunch of times.
Raul Cheleguini [Thu, 26 Oct 2023 17:22:31 +0000 (14:22 -0300)]
nspawn: Make parameter provided_mac a const for setup_veth()
Luca Boccassi [Thu, 26 Oct 2023 20:17:03 +0000 (21:17 +0100)]
Merge pull request #29711 from berrange/tests-silverblue
Fix test suite when developing on Fedora SilverBlue (rpm-ostree) host
Luca Boccassi [Thu, 26 Oct 2023 20:16:07 +0000 (21:16 +0100)]
Merge pull request #29727 from aafeijoo-suse/default-tpm2-public-key-fix
tpm2: fixes related to `tpm2-pcr-public-key.pem`
Luca Boccassi [Thu, 26 Oct 2023 13:56:58 +0000 (14:56 +0100)]
core: do not post-process skipped mounts
When a mount is gracefully skipped (e.g.: BindReadOnlyPaths=-/nonexistent)
we still post-process it, like making it read-only. Except if nothing
has been mounted, the mount point will be made read-only for no reason.
Track when mounts are skipped and avoid post-processing.
One day we'll switch all of this to the new mount api and do these
operations atomically or not at all.
Fixes https://github.com/systemd/systemd/issues/29725
Richard Maw [Wed, 25 Oct 2023 17:12:58 +0000 (18:12 +0100)]
test: Skip test-recurse-dir on overlayfs
Daan De Meyer [Thu, 26 Oct 2023 14:46:16 +0000 (16:46 +0200)]
mkfs-util: Use actual UID/GID in protofile instead of root
Antonio Alvarez Feijoo [Thu, 26 Oct 2023 14:51:37 +0000 (16:51 +0200)]
repart: do not ignore `tpm2-pcr-public-key.pem`
If `--tpm2-public-key=` is not specified, but `tpm2-pcr-public-key.pem` exists
in /{etc,run,usr/lib}/systemd/, it's being ignored.
Fixes
9e437994
Daniel P. Berrangé [Wed, 25 Oct 2023 16:52:11 +0000 (17:52 +0100)]
test-fstab-generator: skip test impacted by /mnt symlink
On rpm-ostree distributions such as Fedora SilverBlue /mnt
(and other well known paths) will be a symlink to a location
under /var. The fstab generator emits correct output in this
case, however, the data does not match the expected output
stored in the source tree.
Rather than trying to adapt the test data, just skip this
single test scenario when we see /mnt is a symlink.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Daniel P. Berrangé [Wed, 25 Oct 2023 16:39:04 +0000 (17:39 +0100)]
test-systemd-tmpfiles: skip when /tmp has unexpected ownership
The systemd-tmpfiles binary will report a fatal error if /tmp is not owned
either by root, or by the current user:
Detected unsafe path transition /tmp (owned by nobody) →
/tmp/test-systemd-tmpfiles.a8qc6n18 (owned by berrange)
during canonicalization of
tmp/test-systemd-tmpfiles.a8qc6n18/test-content.7chd7rdi
When doing development inside a 'toolbox' container (which is required
on a Fedora SilverBlue distro), /tmp is owned by 'nobody', because it
has been passed through from the host and host UID 0 gets mapped to
UID 65536 by usernamespaces. This triggers the unsafe path transition
error message.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Daniel P. Berrangé [Wed, 25 Oct 2023 16:19:35 +0000 (17:19 +0100)]
test-blockdev-util: avoid abort when /home is a symlink
On rpm-ostree distributions like Fedora SilverBlue /home (and various
other well known locations) are symlinks to somewhere beneath /var.
The path_is_encrypted() method uses O_NOFOLLOW and as a result will
return ELOOP on /home. This causes test-blockdev-util to abort.
Add ELOOP to the ignorable set of errnos for testing.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Michal Sekletar [Fri, 6 Oct 2023 10:26:44 +0000 (12:26 +0200)]
logind: introduce CreateSessionWithPIDFD()
This new D-Bus API uses pidfd to refer to the session leader. Also,
pam_systemd will try to make use of it when pidfd support is available.
Luca Boccassi [Thu, 26 Oct 2023 13:28:28 +0000 (14:28 +0100)]
Merge pull request #29720 from poettering/cgls-fix-delegate
cgls: fix display of delegation flag
Luca Boccassi [Thu, 26 Oct 2023 13:27:56 +0000 (14:27 +0100)]
Merge pull request #29529 from yuwata/core-namespace-check-priv
core/namespace: check if we have enough privilege
Antonio Alvarez Feijoo [Thu, 26 Oct 2023 13:14:52 +0000 (15:14 +0200)]
cryptenroll: fix bind default TPM2 signed policy to PCR 11
If `--tpm2-public-key=` is not specified, but `tpm2-pcr-public-key.pem` exists
in /{etc,run,usr/lib}/systemd/, the default PCR 11 is not being set.
Fixes
9e437994
Lennart Poettering [Thu, 26 Oct 2023 07:19:45 +0000 (09:19 +0200)]
varlink: make sure 'incomplete' bool is nullable
This field is optional, it only makes sense for user records that
actually have a privileged part to set.
Yu Watanabe [Wed, 11 Oct 2023 04:02:14 +0000 (13:02 +0900)]
test: add a simple test for PrivateNetwork=
Yu Watanabe [Wed, 11 Oct 2023 05:58:38 +0000 (14:58 +0900)]
core/namespace: check if we have enough privilege to mount sysfs or procfs
If we do not have enough privilege to mount a new instance of sysfs or
procfs, units e.g. with PrivateNetwork=yes may fail.
Let's first try to mount sysfs or procfs anyway to check if we have enough
privilege.
Fixes #29526.
Yu Watanabe [Wed, 11 Oct 2023 05:57:54 +0000 (14:57 +0900)]
core/namespace: unify logic of mounting /proc and /sys
No functional change, just refactoring.
Frantisek Sumsal [Thu, 26 Oct 2023 08:16:57 +0000 (08:16 +0000)]
Merge pull request #29718 from yuwata/networkd-update-state-file-after-dhcp6-information-request
network: update state file when DHCPv6 reply for INFORMATION-REQUEST is received
Lennart Poettering [Wed, 25 Oct 2023 21:05:24 +0000 (23:05 +0200)]
cgroup-show: rework cgroup tree display to operate by fd only
This restores display of the "delegate" flag of a cgroup. Previously we
erroneously passed a full fs path where a cgroup path was expected (the
difference being the /sys/fs/cgroup/ prefix), which meant we never read
the xattr properly. Let's fix that by simply operating by fd on the
cgroup and using it for all operations.
Lennart Poettering [Wed, 25 Oct 2023 21:04:15 +0000 (23:04 +0200)]
cgroup-util: add cg_is_delegated_fd() helper
This is just like cg_is_delegate() but operates on an fd instead of a
cgroup path.
Sooner or later we should access cgroupfs mostly via fds rather than
paths, but we aren't there yet. But let's at least get started.
Lennart Poettering [Wed, 25 Oct 2023 21:02:22 +0000 (23:02 +0200)]
tree-wide: port various users over to the new getxattr_at_bool() call
Lennart Poettering [Wed, 25 Oct 2023 20:59:53 +0000 (22:59 +0200)]
xattr-util: add new getxattr_at_bool() helper
This carefully combines getxattr_at_malloc() and parse_bool(), which is
something we use at multiple places.
Topi Miettinen [Wed, 25 Oct 2023 18:32:35 +0000 (21:32 +0300)]
core/cgroup: ignore NFT sets for other sources
Partially fixes: #29678
Luca Boccassi [Wed, 25 Oct 2023 14:15:02 +0000 (15:15 +0100)]
core: do not reset tty if there's no tty configured
Otherwise a lock is taken, which can be taken by multiple units at the
same time, depending on each other, causing a deadlock.
Fixes https://github.com/systemd/systemd/issues/29682
Yu Watanabe [Tue, 24 Oct 2023 18:56:10 +0000 (03:56 +0900)]
inotify-util: drop to use pointer outside of the buffer
Hopefully fixes many Coverity issues.
Yu Watanabe [Thu, 26 Oct 2023 03:42:49 +0000 (12:42 +0900)]
tree-wide: fix typo
Yu Watanabe [Thu, 26 Oct 2023 03:26:15 +0000 (12:26 +0900)]
test-network: suppress too much outputs of state file
Follow-up for
0f9efffaeb84964a3ab0f32271fba38f3bee2394.
Yu Watanabe [Thu, 26 Oct 2023 03:19:40 +0000 (12:19 +0900)]
network: update state file when DHCPv6 reply for INFORMATION-REQUEST is received
Otherwise, received information, e.g. DNS servers, may not be saved in
the state file, and will not be propagated to clients like resolved.
Fixes the first issue of #29678.
Yu Watanabe [Tue, 24 Oct 2023 10:32:04 +0000 (19:32 +0900)]
dissect: insert missing space
Daan De Meyer [Wed, 25 Oct 2023 20:59:59 +0000 (22:59 +0200)]
Merge pull request #29708 from DaanDeMeyer/bootctl-always
Always build bootctl
Luca Boccassi [Wed, 25 Oct 2023 20:13:56 +0000 (21:13 +0100)]
Merge pull request #29710 from mrc0mmand/test-pcrextend
test: TEST-70-TPM2 shenagians
Frantisek Sumsal [Wed, 25 Oct 2023 17:25:38 +0000 (19:25 +0200)]
random-seed: terminate the option array
So we don't crash on invalid options:
$ build/systemd-random-seed --foo
Segmentation fault (core dumped)
Mike Yuan [Wed, 25 Oct 2023 12:54:49 +0000 (20:54 +0800)]
man/systemd.unit: add PropagatesStopTo= to reverse property table
Frantisek Sumsal [Wed, 25 Oct 2023 15:57:08 +0000 (17:57 +0200)]
test: slightly extend systemd-tpm2-setup's coverage
Frantisek Sumsal [Wed, 25 Oct 2023 16:04:26 +0000 (18:04 +0200)]
tpm2-setup: drop the COMMAND placeholder from the help
Since systemd-tpm2-setup doesn't expect any arguments.
Frantisek Sumsal [Wed, 25 Oct 2023 15:52:19 +0000 (17:52 +0200)]
tpm2-setup: terminate the option array
Otherwise bad things happen:
$ build/systemd-tpm2-setup --foo
Segmentation fault (core dumped)
Frantisek Sumsal [Wed, 25 Oct 2023 15:42:07 +0000 (17:42 +0200)]
test: add a couple more tests for systemd-pcrextend
Frantisek Sumsal [Wed, 25 Oct 2023 15:40:05 +0000 (17:40 +0200)]
test: make the TPM event log checking a bit more robust
Don't hardcode the event number, so the test works correctly even if
someone wrote to the event log before us. Also, explicitly pick the
sha256 bank when checking digests, as the indexing may vary depending on
current TPM's capabilities.
Daan De Meyer [Wed, 25 Oct 2023 14:48:35 +0000 (16:48 +0200)]
meson: Always build systemd-measure
Same idea as with bootctl, we might be doing image builds from a
system that doesn't boot with UEFI but we still might want to measure
stuff for the image we're building so let's not gate this behind
ENABLE_BOOTLOADER.
Daan De Meyer [Wed, 25 Oct 2023 14:45:06 +0000 (16:45 +0200)]
meson: Always build bootctl
bootctl is rather useful to have, even if on a system without UEFI,
as it has a number of verbs that are unrelated to UEFI (e.g kernel-identify),
and more importantly, it supports --root to operate on directory trees
(which could be intended to be deployed on UEFI) so let's make sure we
always build it.
Raul Cheleguini [Wed, 4 Oct 2023 02:06:38 +0000 (23:06 -0300)]
nspawn: allow user-specified MAC address on container side
Introduce the environment variable SYSTEMD_NSPAWN_NETWORK_MAC to allow
user-specified MAC address on container side.
Frantisek Sumsal [Wed, 25 Oct 2023 12:48:30 +0000 (14:48 +0200)]
test: split TEST-70-TPM2 into subtests
Luca Boccassi [Wed, 25 Oct 2023 12:42:21 +0000 (13:42 +0100)]
Merge pull request #29704 from mrc0mmand/cocci
Another round of Coccinelle tweaks
Luca Boccassi [Wed, 25 Oct 2023 12:18:38 +0000 (13:18 +0100)]
Merge pull request #29695 from poettering/repart-reduce-global-vars
repart,cryptenroll: three smaller tweaks
Lennart Poettering [Tue, 24 Oct 2023 16:15:36 +0000 (18:15 +0200)]
cryptsetup: remove redundant check
The immediately preceeding check already covered that.
This removes and addition made back in
aae6eb96117acd54ce5ac572aac6a11b34c4ad99.
cc @williamcroberts
Luca Boccassi [Wed, 25 Oct 2023 12:18:03 +0000 (13:18 +0100)]
Merge pull request #29698 from poettering/tpm2-no-best-pcr
tpm2: minor tweaks
Frantisek Sumsal [Wed, 25 Oct 2023 09:29:20 +0000 (11:29 +0200)]
udev: strdupa() → strdupa_safe()
Frantisek Sumsal [Wed, 25 Oct 2023 09:28:12 +0000 (11:28 +0200)]
network: use timestamp_is_set() in one more place
Frantisek Sumsal [Wed, 25 Oct 2023 09:26:19 +0000 (11:26 +0200)]
network: ENOTSUP → EOPNOTSUPP
Frantisek Sumsal [Wed, 25 Oct 2023 09:21:40 +0000 (11:21 +0200)]
core,journal: drop unnecessary !! casts
Frantisek Sumsal [Wed, 25 Oct 2023 09:16:37 +0000 (11:16 +0200)]
coccinelle: don't run iovec-make on iovec_done{,_erase}
As the result is a bit funky (but still valid), i.e.:
static inline void iovec_done_erase(struct iovec *iovec) {
assert(iovec);
- iovec->iov_base = erase_and_free(iovec->iov_base);
- iovec->iov_len = 0;
+ *iovec = IOVEC_MAKE(erase_and_free(iovec->iov_base), 0);
}
Luca Boccassi [Wed, 25 Oct 2023 08:53:19 +0000 (09:53 +0100)]
Merge pull request #29553 from keszybz/analyze-cat-config-tldr
analyze/cat-config: add switch to print only "interesting" parts of conffiles
Lennart Poettering [Tue, 24 Oct 2023 21:14:23 +0000 (23:14 +0200)]
tpm2-util: add line breaks in compound struct init, like we usually do
Frantisek Sumsal [Wed, 25 Oct 2023 08:29:58 +0000 (08:29 +0000)]
Merge pull request #29687 from yuwata/network-state-file-sync
network: several fixlets for state file
Lennart Poettering [Tue, 24 Oct 2023 20:54:39 +0000 (22:54 +0200)]
cryptenroll: validate positional arguments before looking at detail parameters
Let's switch the order in which we process positional arguments and
analyze/tweak detail parameters. Let's look at the positional arguments
first (i.e. the "big picture") and then look at the switches (i.e.
"little details").
THis doesn't matter much, but makes for better error messages I think.
At least I was very confused that a completely borked cmdline I passed
to cryptenrolled complained about some detail and let the major fuckup
pass...
Lennart Poettering [Tue, 24 Oct 2023 20:41:26 +0000 (22:41 +0200)]
cryptenroll: add section headers to --help text
Lennart Poettering [Tue, 24 Oct 2023 20:41:57 +0000 (22:41 +0200)]
cryptenroll: add addition asserts
Lennart Poettering [Tue, 24 Oct 2023 20:42:21 +0000 (22:42 +0200)]
repart: reduce scope of two variables
This replicates what
475c473d328c12f5e9fd43cee959154a0d0c78a4 did for
cryptenroll for repart, which has very similar code for this.
Lennart Poettering [Tue, 24 Oct 2023 21:14:23 +0000 (23:14 +0200)]
tpm2-util: add line breaks in compound struct init, like we usually do
Lennart Poettering [Tue, 24 Oct 2023 20:19:48 +0000 (22:19 +0200)]
tpm2-util: dont't find best PCR bank if no PCRs are selected whatsoever
This will otherwise just yield weird log message, complaining that PCRs
were not initialized. But which PCRs if we have none selected?
Lennart Poettering [Tue, 24 Oct 2023 14:45:32 +0000 (16:45 +0200)]
execute: log about failures when opening a terminal to reset
Lennart Poettering [Tue, 24 Oct 2023 16:18:18 +0000 (18:18 +0200)]
mount-util: add one more const
Lennart Poettering [Tue, 24 Oct 2023 14:45:06 +0000 (16:45 +0200)]
update TODO
Luca Boccassi [Tue, 24 Oct 2023 19:39:34 +0000 (20:39 +0100)]
Merge pull request #29689 from mrc0mmand/test-shutdown
test: shorten service stop/abort timeouts for TEST-69-SHUTDOWN
Luca Boccassi [Tue, 24 Oct 2023 18:41:02 +0000 (19:41 +0100)]
Merge pull request #29677 from keszybz/rewinddir-alternative-fix
Rewind dir fd before using it for cleanup
Mike Yuan [Tue, 24 Oct 2023 10:10:21 +0000 (18:10 +0800)]
sleep-config: make hybrid sleep always use 'suspend' disk mode
If user requests hybrid sleep, we should always use 'suspend'
disk mode. If that's not supported, let's correctly report it
so they can choose plain hibernation instead. HybridSleepMode=
serves no purpose in this case and should be removed.
Addresses https://github.com/systemd/systemd/pull/29681#discussion_r1369812785
Zbigniew Jędrzejewski-Szmek [Tue, 17 Oct 2023 17:11:44 +0000 (19:11 +0200)]
shared/pretty-print: skip redundant section headers with --tldr
If the same section appears consecutively in a given file, subsequent
occurenced are not printed.
[Slice]
Foo=bar
[Slice] # this is not printed
Bar=bar
Requested in
https://github.com/systemd/systemd/pull/29553#pullrequestreview-
1677310352.
Zbigniew Jędrzejewski-Szmek [Sun, 15 Oct 2023 16:34:54 +0000 (18:34 +0200)]
binfmt: add --tldr
Zbigniew Jędrzejewski-Szmek [Sun, 15 Oct 2023 16:34:38 +0000 (18:34 +0200)]
sysctl: add --tldr
Zbigniew Jędrzejewski-Szmek [Sun, 15 Oct 2023 16:34:05 +0000 (18:34 +0200)]
sysusers: add --tldr
Zbigniew Jędrzejewski-Szmek [Sun, 15 Oct 2023 16:33:10 +0000 (18:33 +0200)]
tmpfiles: add --tldr
This is like --cat-config, but omits the comments and empty lines.
The name is incoungrous with --cat-config, but I don't see a nice way to
call it that wouldn't be annoyingly long.
pager_open() is moved to cat_config() to remove some lines from run().
Zbigniew Jędrzejewski-Szmek [Sat, 14 Oct 2023 16:49:35 +0000 (18:49 +0200)]
shared/pretty-print: add highlighting
Yu Watanabe [Tue, 24 Oct 2023 09:38:30 +0000 (18:38 +0900)]
test-network: wait for the state file being updated
Also, sync state files before read.
Addresses the first issue in #29678.
Zbigniew Jędrzejewski-Szmek [Thu, 12 Oct 2023 14:33:01 +0000 (16:33 +0200)]
analyze/cat-config: add switch to print only "interesting" parts of config files
When looking at configuration, often a user wants to suppress the comments and
just look at the parts that actually configure something, roughly equivalent to
systemd-analyze cat-config … | rg -v '^(#|;|$)
This switch implements this natively, skipping lines that start with a comment
character or only contain whitespace.
For formats that have section headers, section headers are skipped, if only
followed by stuff that would be skipped. (The last section header is printed
when we're about to print some actual output.)
Note that the caller doesn't know if the format has headers or not. We do format
type detection in pretty-print.c. So the caller only specifies tldr=true|false, and
conf_files_cat() figures out if the format has headers and whether those should
be handled specially.
The comments that show the file name are always printed, even if all of the file
is suppressed.
This is a partial answer to the discussions in
https://github.com/systemd/systemd/pull/28919,
https://github.com/systemd/systemd/pull/29248. If the default config is shown in
config files, the user can conveniently use '--tldr' to show the relevant parts.
Zbigniew Jędrzejewski-Szmek [Mon, 23 Oct 2023 12:06:32 +0000 (14:06 +0200)]
shared/copy: rewind dir fd before using it for cleanup
This seems to be the only place where rm_rf_children() is called with a
possibly used fd, which is then passed through to rm_rf_children_impl().
This also fixes #29606.
(Tested on Fedora rawhide with kernel 6.5.6-300.fc39.x86_64.)
Luca Boccassi [Tue, 24 Oct 2023 11:20:04 +0000 (12:20 +0100)]
Merge pull request #29601 from yuwata/mmap-check-overflow
mmap: check offset and size more carefully
Frantisek Sumsal [Tue, 24 Oct 2023 10:41:54 +0000 (12:41 +0200)]
test: shorten service stop/abort timeouts for TEST-69-SHUTDOWN
In several Ubuntu CI jobs I noticed timeouts in TEST-69, which are
apparently caused by a very stubborn bash/login process:
$ journalctl -o short-monotonic --no-hostname --file artifacts/TEST-69-SHUTDOWN.journal
[ 2011.698430] systemd[1]: shutdown.target: starting held back, waiting for: veritysetup.target
[ 2011.698473] systemd[1]: sysinit.target: stopping held back, waiting for: user@0.service
[ 2045.884982] systemd[1]: systemd-oomd.service: Got notification message from PID 54 (WATCHDOG=1)
[ 2071.576424] systemd[1]: Received SIGCHLD from PID 65 (bash).
[ 2071.576941] systemd[1]: Child 65 (bash) died (code=killed, status=1/HUP)
[ 2071.577026] systemd[1]: session-13.scope: Child 65 belongs to session-13.scope.
[ 2071.577100] systemd[1]: session-13.scope: cgroup is empty
[ 2071.577249] systemd[1]: session-13.scope: Deactivated successfully.
$ journalctl -o short-monotonic --no-hostname --file artifacts/TEST-69-SHUTDOWN.journal _PID=65
[ 3038.661488] login[65]: ROOT LOGIN on '/dev/pts/0'
Since, in this case, we really care only about the actual shutdown,
let's shorten the service stop/abort timeouts to let systemd SIGKILL all
remaining processes in the 60s `expect` window.
Frantisek Sumsal [Tue, 24 Oct 2023 10:35:03 +0000 (12:35 +0200)]
test: introduce $TEST_SKIP_SHUTDOWN
To get rid of some boilerplate.
Luca Boccassi [Tue, 24 Oct 2023 09:49:37 +0000 (10:49 +0100)]
Merge pull request #29685 from poettering/cryptenroll-reduce-scope
cryptenroll: two minor simplifications
Yu Watanabe [Tue, 24 Oct 2023 09:33:45 +0000 (18:33 +0900)]
network: also synchronously update manager state file
Yu Watanabe [Tue, 24 Oct 2023 09:25:47 +0000 (18:25 +0900)]
network: make link_save() static
Yu Watanabe [Tue, 24 Oct 2023 09:13:08 +0000 (18:13 +0900)]
network: do not try to save link state file twice on boot
On enumeration, (that is, before manager_start() is called), enumerated
links may already have the dirty flag. In that case, saving the state
file in manager_start() should clear the flag.
Mike Yuan [Tue, 24 Oct 2023 09:03:54 +0000 (17:03 +0800)]
Merge pull request #29681 from YHNdnzj/sleep-round-three
sleep-config: cleanup round three
Yu Watanabe [Tue, 24 Oct 2023 08:05:45 +0000 (17:05 +0900)]
Merge pull request #29679 from keszybz/drop-iovec-null
Drop IOVEC_NULL
Zbigniew Jędrzejewski-Szmek [Mon, 23 Oct 2023 20:30:28 +0000 (22:30 +0200)]
basic/iovec-util: use FOREACH_ARRAY in one more place
Zbigniew Jędrzejewski-Szmek [Mon, 23 Oct 2023 20:23:07 +0000 (22:23 +0200)]
basic/iovec-util: drop TAKE_IOVEC
As suggested in
https://github.com/systemd/systemd/pull/29679#discussion_r1368678932.
Lennart Poettering [Mon, 23 Oct 2023 20:17:46 +0000 (22:17 +0200)]
cryptenroll: merge two if checks with same condition
This removes a duplicate condition check by adding a common surrounding
if block.
This also change a confusing if check: "(X && Y) && Z" to simply "X && Y && Z"
Lennart Poettering [Mon, 23 Oct 2023 20:12:46 +0000 (22:12 +0200)]
cryptenroll: reduce scope of two global variables
No change in behaviour
Luca Boccassi [Mon, 23 Oct 2023 15:43:33 +0000 (16:43 +0100)]
systemctl: fallback if logind doesn't support new flag
Follow-up for
665a3d6d15c09428
Luca Boccassi [Mon, 23 Oct 2023 17:39:10 +0000 (18:39 +0100)]
Merge pull request #29633 from yuwata/dhcp-ipv6-only-mode-follow-ups
dhcp: several follow-ups for IPv6 only mode
Mike Yuan [Mon, 23 Oct 2023 13:19:29 +0000 (21:19 +0800)]
sleep-config: check sleep mode only when hibernation
With the previous change, this should only be used when
doing hibernation.
Mike Yuan [Fri, 20 Oct 2023 16:21:20 +0000 (00:21 +0800)]
sleep-config: remove HibernateState= & HybridSleepState=, restrict
SuspendState= not to include "disk"
I don't know why these existed in the first place, but as I
justified in the comments, it's simply not sensible to allow
HibernateState= or HybridSleepState= to take values other than
'disk'. So let's just remove those options. Also, SuspendState=
should not contain 'disk'.