1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00
Commit Graph

41081 Commits

Author SHA1 Message Date
Yu Watanabe
0ec8777e18
Merge pull request #25726 from dtardon/cleanups
Several small cleanups
2022-12-14 20:17:56 +09:00
Yu Watanabe
863b620a4a resolve: fix NULL-pointer dereference
Fixes a bug introduced by 16a6bc5a7a.
Fixes CID#1501514.
2022-12-14 19:10:19 +09:00
David Tardon
246caacbb4 btrfs-util: shorten a bit 2022-12-14 09:57:35 +01:00
David Tardon
359e8d76e8 machine: propagate error from machine_new 2022-12-14 09:57:35 +01:00
David Tardon
38f514409a machine: use _cleanup_ in machine_new 2022-12-14 09:57:35 +01:00
David Tardon
d2b6485385 localed-util: use _cleanup_ harder 2022-12-14 09:57:35 +01:00
David Tardon
6323bd1094 busctl-introspect: use _cleanup_ 2022-12-14 09:56:33 +01:00
Zbigniew Jędrzejewski-Szmek
357f5ccbf6
Merge pull request #25689 from YHNdnzj/systemctl-exit-code
systemctl: make is-* return EXIT_PROGRAM_OR_SERVICES_STATUS_UNKNOWN(4) when no unit file is found
2022-12-14 08:37:16 +01:00
Daan De Meyer
8275334bec repart: Rename --skip-partitions to --defer-partitions
Defer is better because it indicates that we still intend to
populate these partitions later.
2022-12-14 13:20:32 +09:00
Luca Boccassi
71f7cc6a9e
Merge pull request #25725 from keszybz/oom-policy-fixup
Add missing integration of OOMPolicy in scope units
2022-12-14 01:38:11 +01:00
Luca Boccassi
856bfaeb05 manager: add option to rate limit daemon-reload
Reloading is a heavy-weight operation, and currently it is not
possible to stop an orchestrator from spamming reload requests.
Add configuration options to allow rate-limiting.
2022-12-13 18:13:10 +00:00
Luca Boccassi
9524c2fd43 manager: log unit/pid of sender when Reload() is called
Reloading is a heavy-weight operation, and currently it is not
possible to figure out who/what requested it, even at debug level
logging.
Check the sender of the D-Bus message and print it out at info level.
2022-12-13 18:13:10 +00:00
Mike Yuan
43e48a4738
systemctl: is-*: return correct code when no unit is found
According to systemctl(1), we should use LSB return code 4
(EXIT_PROGRAM_OR_SERVICES_STATUS_UNKNOWN) when the state
is "no such unit" for is-{active,failed,enabled} verbs.

Fixes #25680
2022-12-14 01:43:25 +08:00
Yu Watanabe
ab84b9efb8
Merge pull request #25658 from yuwata/fuzz-etc-hosts
resolve: dedup entries in /etc/hosts
2022-12-14 01:44:12 +09:00
Zbigniew Jędrzejewski-Szmek
c5966ab5bf coredump: cescape invalid json data before logging
In both cases, the json string is short, so we can print it, which is useful
for diagnosing invalid data in packages. But we need escape non-printable
characters.

https://bugzilla.redhat.com/show_bug.cgi?id=2152685

I went over the rest of the codebase, and it seems that other calls to
json_parse() don't have this problem.
2022-12-14 01:37:19 +09:00
David Tardon
1dca43db12 ratelimit: drop use of goto 2022-12-13 16:03:37 +01:00
Christian Brauner
fefb7a6def
nspawn: remove cgroup socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 16:03:30 +01:00
Christian Brauner
bb1aa18569
nspawn: remove pty socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 16:03:30 +01:00
Christian Brauner
b07ee9035e
nspawn: remove rtnl socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 16:03:30 +01:00
David Tardon
229b008635 mountpoint-util: reduce variable scope 2022-12-13 15:47:52 +01:00
Zbigniew Jędrzejewski-Szmek
d5a1657d5a core,man: add missing integration of OOMPolicy= in scopes
Fixup for 5fa098357e.
2022-12-13 15:34:46 +01:00
Christian Brauner
5d9d3fcb18
nspawn: s/kmsg_socket_pair/fd_inner_socket_pair/g
Also stop stashing the kmsg fifo fd in the socket. Just retrieve it in
the parent and have the parent hold on to it.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:46 +01:00
Christian Brauner
af06cd3024
nspawn: s/fd_socket_pair/fd_outer_socket_pair/g
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:46 +01:00
Christian Brauner
525f4e59db
nspawn: remove uid socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:46 +01:00
Christian Brauner
1823d92d7b
nspawn: remove uuid socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:45 +01:00
Christian Brauner
b1e1d1fa48
nspawn: remove pid socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:45 +01:00
Christian Brauner
cc44af4f59
nspawn: s/notify_socket/fd_socket/g
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:45 +01:00
Zbigniew Jędrzejewski-Szmek
7c76e1812d core/namespace: indentation 2022-12-13 14:39:40 +01:00
Zbigniew Jędrzejewski-Szmek
2053593fcc treewide: drop "RUN_" from "RUN_WITH_UMASK"
RUN_WITH_UMASK was initially conceived for spawning externals progs with the
umask set. But nowadays we use it various syscalls and stuff that doesn't "run"
anything, so the "RUN_" prefix has outlived its usefulness.
2022-12-13 14:39:30 +01:00
Daan De Meyer
661e4251a5 execute: Pass AT_FDCWD instead of -1
Let's enforce that callers pass AT_FDCWD as read_dfd to load_credential()
to avoid an assert() in read_full_file_full() if read_dfd is -1.
2022-12-13 22:00:34 +09:00
Yu Watanabe
16a6bc5a7a resolve: dedup entries in /etc/hosts
This improves the performance of parsing the file and reduces memory pressure.

Running 'fuzz-etc-hosts timeout-strv' with valgrind,

Before:
total heap usage: 321,020 allocs, 321,020 frees, 15,820,387,193 bytes allocated
real    0m23.531s
user    0m21.458s
sys     0m1.961s

After:
total heap usage: 112,408 allocs, 112,408 frees, 7,297,480 bytes allocated
real    0m8.664s
user    0m8.545s
sys     0m0.065s

Hopefully fixes oss-fuzz#47708 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47708).
2022-12-13 20:37:48 +09:00
Yu Watanabe
59dad407a2 resolve: introduce more hash-ops and use them
No functional changes, just refactoring.
2022-12-13 20:37:48 +09:00
Yu Watanabe
232481a0e6 resolve: use dns_name_hash_ops_free
No functional changes, just refactoring.
2022-12-13 20:37:04 +09:00
Yu Watanabe
3deed83ae2 dns-domain: introduce dns_name_hash_ops_free
Preparation for later commits.
2022-12-13 20:32:44 +09:00
Yu Watanabe
4596c83658 in-addr-util: introduce in_addr_data_hash_ops_free and expose its compare and hash functions
Preparation for later commits.
2022-12-13 20:32:44 +09:00
Yu Watanabe
0f17886390 resolve: split manager_etc_hosts_lookup() into small parts
No functional changes, just refactoring.
2022-12-13 20:32:00 +09:00
Yu Watanabe
10b0c81802 resolve: adjust warning 2022-12-13 20:29:16 +09:00
Yu Watanabe
9f1a1f2047 resolve: merge two boolean variables
No functional changes, just refactoring.
2022-12-13 20:29:16 +09:00
Yu Watanabe
e4e340990f resolve: introduce cleanup functions for EtcHostsItemBy{Address,Name}
No functional change, just refactoring and preparation for later
commits.
2022-12-13 20:29:16 +09:00
Yu Watanabe
bb5c77305e resolve: make etc_hosts_item_by_{address,name}_free() accept NULL 2022-12-13 20:29:12 +09:00
Yu Watanabe
133eedad2b resolve: rename EtcHostsItem -> EtcHostsItemByAddress 2022-12-13 20:26:55 +09:00
Yu Watanabe
0f7bdf3503 resolve: rename etc_hosts_free() -> etc_hosts_clear() 2022-12-13 20:26:55 +09:00
Zbigniew Jędrzejewski-Szmek
d70eaf3067 nspawn: realign columns
Follow-up for b9e7f22c2d.
2022-12-13 11:36:11 +01:00
Yu Watanabe
10b89c59dc
Merge pull request #25713 from keszybz/hwdb-matching
Restore backwards compat in 60-evdev.rules
2022-12-13 18:13:27 +09:00
Peter Cai
e6319a102e cryptsetup-fido2: Try all FIDO2 key slots when opening LUKS volume
After #25268, it is now possible to check whether a credential
is present on a FIDO2 token without actually attempting to retrieve said
credential. However, when cryptsetup plugins are not enabled, the
fallback unlock routines are not able to make multiple attempts with
multiple different FIDO2 key slots.

Instead of looking for one FIDO2 key slot when trying to unlock, we now
attempt to use all key slots applicable.

Fixes #19208.
2022-12-12 21:48:39 +01:00
Luca Boccassi
d41789edc5
Merge pull request #25375 from PeterCxy/fido2-fixups
Fixups for FIDO2 pre-flight checks
2022-12-12 21:48:09 +01:00
Zbigniew Jędrzejewski-Szmek
f8717d2a72 udevadm: emit deprecation notice in udevadm hwdb
This tool was "deprecated" back in 65eb4378c3,
but only by removing documentation. This is somewhat surprising, but udevadm
hwdb --update and systemd-hwdb update generate different databases. udevadm
runs in compat mode and (as far as I have been able to figure out from a quick
look), it omits filename information and does some other changes to the
datastructures. The consuming code (udev) is the same in both cases, so this
"compatibility mode" seems very strange. But I don't think it's worth trying to
figure out why things were done this way. Let's just push people towards the
new code.

Inspired by https://github.com/systemd/systemd/issues/25698#issuecomment-1346298094.
2022-12-12 21:45:28 +01:00
Will Fancher
01fdfbb82c sysroot: Support x-systemd.makefs 2022-12-12 21:45:06 +01:00
Luca Boccassi
b8b84c6e5e
Merge pull request #25646 from yuwata/sd-id128-enomedium
sd-id128: make sd_id128_get_machine() return -ENOMEDIUM when not initialized
2022-12-12 21:42:36 +01:00
Luca Boccassi
97ad3e6a2c
Merge pull request #25692 from yuwata/resolve-rr-txt
resolve: drop recurstion from TXT field handling
2022-12-12 14:13:16 +01:00
Yu Watanabe
b40c8ebdc8 sd-id128: fold do_sync flag into Id128FormatFlag 2022-12-12 22:07:48 +09:00
Yu Watanabe
e2720340e9 sd-id128: make sd_id128_get_boot() and friend return -ENOSYS when /proc/ is not mounted 2022-12-12 22:04:53 +09:00
Yu Watanabe
9be90c401e sd-id128: make sd_id128_get_boot() and friend return -ENOMEDIUM 2022-12-12 22:04:53 +09:00
Yu Watanabe
66c7949e08 test: add tests for "uninitialized" string handling by id128_read_fd() 2022-12-12 21:57:31 +09:00
Yu Watanabe
057bf780e9 sd-id128: make id128_read() or friends return -ENOPKG when the file contents is "uninitialized"
Then, this drops ID128_PLAIN_OR_UNINIT. Also, this renames
Id128Format -> Id128FormatFlag, and make it bitfield.

Fixes #25634.
2022-12-12 21:57:31 +09:00
Yu Watanabe
28bf2de201 sd-id128: several cleanups
- use SD_ID128_STRING_MAX or friend,
- use sizeof(sd_id128_t),
- use newly introduced ascii_ishex().
2022-12-12 21:48:47 +09:00
Yu Watanabe
0ce8870f19 string-util: introduce ascii_ishex() 2022-12-12 21:47:22 +09:00
Zbigniew Jędrzejewski-Szmek
ae3506ab92 udev-builtin-keyboard: update description 2022-12-12 13:44:33 +01:00
Yu Watanabe
733529d812 test: name_assign_type sysattr never exists for enumerated devices
As we filtered out network devices in the test.
2022-12-12 15:04:39 +09:00
Yu Watanabe
eb18e7b782 sd-device: fix double-free
If an attribute is read but the value is not used (i.e. ret_value is NULL),
then sd_device_get_sysattr_value() mistakenly frees the read data even though
it is cached internally.

Fixes a bug introduced by acfc2a1d15.

Fixes #25702.
2022-12-12 14:20:47 +09:00
Peter Cai
2a469016e3 libfido2-util: Refactor pre-flight failure handling
`fido2_is_cred_in_specific_token()` should simply not return error codes
for non-fatal errors. For example, `-ENODEV` can be safely translated to
a `false` return value. When the pre-flight request is not supported, we
should simply return true to instruct the caller to attempt to use the
device anyway.

All error codes returned by the funtion should now be fatal and logged
at error level. Non-fatal errors should only appear in debug logs.
2022-12-10 15:28:49 -05:00
Peter Cai
5d2c1ce4e4 libfido2-util: Perform pre-flight checks as well when a specific device path is given
This prevents unnecessary user interactions when `fido2-device` is set to
something other than `auto` -- a case overlooked in the original PR #23577
(and later #25268).

We do not move pre-flight checks to `fido2_use_hmac_hash_specific_token`
because the behaviors are different between different cases: when the
device path is NULL, we try to automatically choose the correct device,
in which case pre-flight errors should be "soft" errors, without
spamming the tty with error outputs; but when a specific device path is
given, a pre-flight request that determined the non-existence of the
credential should be treated the same as a failed assertion request.
2022-12-10 15:28:49 -05:00
Peter Cai
53c1ef9ce0 libfido2-util: Disable pre-flight checks for credentials with UV
According to the FIDO2 spec, tokens may not support pre-flight checks
for credentials requiring UV, at least not without at least
`pinUvAuthParam` or `uv = true`. Originally, in #25268, this was
handled by passing a PIN to satisfy `pinUvAuthParams`, but this is not
ideal, since `pinUvAuthParam` can be obtained from either a PIN
or a UV verification. Forcing the user to enter the PIN here (which is
often just the fallback option on UV devices) is no better than just
trying out each device with the actual assertion request.

As a result, this commit disables pre-flight checks when the credential
requires UV, and instead reverts to the old behavior (trying out each
device and each key slot, requiring multiple user interactions) for this
type of credentials.
2022-12-10 15:28:49 -05:00
Lennart Poettering
09e917ea4d repart: support erofs
So, i think "erofs" is probably the better, more modern alternative to
"squashfs". Many of the benefits don't matter too much to us I guess,
but there's one thing that stands out: erofs has a UUID in the
superblock, squashfs has not. Having an UUID in the superblock matters
if the file systems are used in an overlayfs stack, as overlayfs uses
the UUIDs to robustly and persistently reference inodes on layers in
case of metadata copy-up.

Since we probably want to allow such uses in overlayfs as emplyoed by
sysext (and the future syscfg) we probably should ramp up our erofs game
early on. Hence let's natively support erofs, test it, and in fact
mention it in the docs before squashfs even.
2022-12-10 11:26:36 +01:00
jcg
5e5fce3e91 mount-setup: don't need to mount /sys/fs/pstore if there is no ENABLE_PSTORE 2022-12-10 12:02:25 +09:00
Yu Watanabe
068ef623bd resolve: add missing assertion 2022-12-10 10:32:29 +09:00
Yu Watanabe
14822ede9f resolve: shorten code a bit 2022-12-10 10:32:29 +09:00
Yu Watanabe
494ef16743 resolve: drop recursion in TXT field handling
Fixes #25683.
2022-12-10 10:32:09 +09:00
Zbigniew Jędrzejewski-Szmek
7aebbdcfa9
Merge pull request #25636 from thom311/th/wcast-align-fixes
all: avoid various "-Wcast-align=strict" warnings
2022-12-09 15:03:45 +01:00
Thomas Haller
6759b62720
all: avoid various "-Wcast-align=strict" warnings 2022-12-09 08:58:07 +01:00
Yu Watanabe
b9152f2d63 resolve: optimize conversion of TXT fields to json
Fixes oss-fuzz#54080 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54080).

Fixes #25654.
2022-12-09 04:59:49 +09:00
Yu Watanabe
7d34567444 hexdecoct: fix NULL pointer dereferences in hexmem()
Fixes oss-fuzz#54090 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54090).

Fixes #25655.
2022-12-09 04:55:47 +09:00
Yu Watanabe
45655e776f hexdecoct: add missing NULL check
Fixes oss-fuzz#54065 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54065).

Fixes #25650.
2022-12-09 04:54:43 +09:00
Yu Watanabe
6b0df52e58 test: add tests for base64_append() 2022-12-09 04:53:50 +09:00
Yu Watanabe
c21b316964 hexdecoct: several cleanups for base64_append()
- add missing assertions,
- use size_t for buffser size or memory index,
- handle empty input more gracefully,
- return the length or the result string,
- fix off-by-one issue when the prefix is already long enough.
2022-12-09 04:53:50 +09:00
Franck Bui
c8966e812e localed: reload PID1 configuration after modifying /etc/locale.conf
Since commit 1ad6e8b302, unsetting an environment
variable means restoring it to its default value.

However this doesn't work well when localed updates locale.conf. Indeed when a
variable is removed from that file, localed calls "UnsetAndSetEnvironment"
method which restores the default values of the unset variables obtained by
PID1 when it first read locale.conf. But since locale.conf has been updated,
these default values might be outdated and localed needs to instruct PID1 to
read locale.conf again.

Reloading PID1 configuration is quite an heavy operation for this purpose but
there's no other way unless we change again the meaning of "UnsetEnvironment"
or we introduce a new method that really unset an env variable.

That said given the fact that localed modifies locale.conf, it should have an
effect on PID1 default environment rather than on the environment explicitly
set by the user (m->client_manager).
2022-12-08 18:35:51 +01:00
Lennart Poettering
b6256af75e socket-util: add CMSG_TYPED_DATA() as type-safe wrapper around CMSG_DATA() 2022-12-08 17:48:34 +01:00
Thomas Haller
86bdf11714 fundamental: add CAST_ALIGN_PTR() macro 2022-12-08 17:34:20 +01:00
Lennart Poettering
d20ea2c515
Merge pull request #25662 from msizanoen1/s2h-nosuspend-user-proc
sleep: always thaw user.slice even if freezing failed
2022-12-08 17:24:52 +01:00
Lennart Poettering
93c1baa0c8
Merge pull request #25667 from poettering/sha256-align-fix
sha256 alignment fixes/rework
2022-12-08 17:24:17 +01:00
Lennart Poettering
39a72c13b8
Merge pull request #25665 from poettering/dissect-memory
dissect: add a mode for operating on an in-memory copy of a DDI, inst…
2022-12-08 17:23:15 +01:00
Yu Watanabe
340bc268c8 fs-util: make chmod_and_chown_at() work with empty path and AT_FDCWD
Follow-up for 7d000133c2.

Fixes CID#1500608.
2022-12-08 15:57:33 +01:00
Lennart Poettering
a0ccc18e89 sha256: port to new generic IS_ALIGNED32() macro
This drops the special casing for s390 and other archs, which was
cargo-culted from glibc. Given it's not obvious why it exists, and is at
best an optimization let's simply avoid it, in particular as the archs
are relatively non-mainstream.

Inspired by: #25636
2022-12-08 15:30:41 +01:00
Lennart Poettering
4f07388360 macro: add generic IS_ALIGNED32() anf friends
Let's generalize (and invert) the UNALIGNED32_P() macro from the sha256
code, and let's add a test for it.
2022-12-08 15:30:31 +01:00
Lennart Poettering
22e339761b sha256: move to unaligned_write_ne32() 2022-12-08 15:18:47 +01:00
Lennart Poettering
d8007e7aac fundamental: split out unaligned_{read|write}_ne{16,32,64}() helpers into unaligned-fundamental.h
Let's allow using this in code shared between userspace and EFI mode.

Also, don't implement these functions via endianness conversions given
we don't actually want to convert endianess here.
2022-12-08 15:18:47 +01:00
Lennart Poettering
17b296a118 sha256: external headers should be included with <> 2022-12-08 15:18:46 +01:00
Lennart Poettering
a579990277
Merge pull request #25180 from keszybz/ukify
ukify: add helper to create UKIs
2022-12-08 15:11:18 +01:00
msizanoen1
af1e336589 core: pending_freezer_{message => invocation}
Rename the field to reflect the new semantics.
2022-12-08 12:58:00 +01:00
msizanoen1
432a321175 core/sleep: set timeout for freeze/thaw operation to 1.5 seconds
A FreezeUnit operation can hang due to the presence of kernel threads
(see last 2 commits). Keeping the default configuration will mean the
system will hang for 25 seconds in suspend waiting for the response. 1.5
seconds should be sufficient for most cases.
2022-12-08 12:58:00 +01:00
msizanoen1
7fcd269784 core/cgroup: ignore kernel cgroup.events when thawing
The `frozen` state can be `0` while the processes are indeed frozen (see
last commit). Therefore do not respect cgroup.events when checking
whether thawing is necessary.
2022-12-08 12:58:00 +01:00
Lennart Poettering
6c07d57075 dissect: add a mode for operating on an in-memory copy of a DDI, instead of directly on it
This is useful for operating in ephemeral, writable mode on any image,
including read-only ones. It also has the benefit of not keeping the
image file's filesystem busy.

Inspired by the discussions in #25648
2022-12-08 12:48:06 +01:00
Lennart Poettering
fcd8a19da8 loop-util: add new loop_device_make_by_path_memory() helper
This uses the new memfd_clone_fd() call to make an in-memory copy of
some file before setting up a loopback block device on it.
2022-12-08 12:47:28 +01:00
Lennart Poettering
6bea3d8e0f data-fd-util: add new memfd_clone_fd() helper
This adds a new helper for cloning any file's contents (or block device contents) into a new memfd.
2022-12-08 12:47:01 +01:00
Antonio Alvarez Feijoo
0254e4d66a cryptsetup: retry TPM2 unseal operation if it fails with TPM2_RC_PCR_CHANGED
Quoting "Trusted Platform Module Library - Part 3: Commands (Rev. 01.59)":

"pcrUpdateCounter – this parameter is updated by TPM2_PolicyPCR(). This value
may only be set once during a policy. Each time TPM2_PolicyPCR() executes, it
checks to see if policySession->pcrUpdateCounter has its default state,
indicating that this is the first TPM2_PolicyPCR(). If it has its default value,
then policySession->pcrUpdateCounter is set to the current value of
pcrUpdateCounter. If policySession->pcrUpdateCounter does not have its default
value and its value is not the same as pcrUpdateCounter, the TPM shall return
TPM_RC_PCR_CHANGED.

If this parameter and pcrUpdateCounter are not the same, it indicates that PCR
have changed since checked by the previous TPM2_PolicyPCR(). Since they have
changed, the previous PCR validation is no longer valid."

The TPM will return TPM_RC_PCR_CHANGED if any PCR value changes (no matter
which) between validating the PCRs binded to the enrollment and unsealing the
HMAC key, so this patch adds a retry mechanism in this case.

Fixes #24906
2022-12-08 10:37:28 +01:00
Yu Watanabe
2e83783030
Merge pull request #25672 from jelly/FirwmwareName
Extend hostnamed DMI firmware properties
2022-12-08 16:04:36 +09:00
Yu Watanabe
daff9d5460
Merge pull request #25564 from poettering/dissect-discover
systemd-dissect: add simple "--discover" command
2022-12-08 12:29:07 +09:00
Yu Watanabe
cc488e9ba8
Merge pull request #25666 from poettering/selinux-getconf-fixup
selinux getXYZcon() NULL return fixes
2022-12-08 12:23:29 +09:00
Jade Lovelace
3b703840d9 oomd: print dry run output at INFO level
Otherwise, the dry run isn't much use since it would be logged at debug
and not seen.
2022-12-08 09:26:57 +09:00
Space Meyer
ff868eaade journald: prevent segfault on empty attr/current
getpidcon() might set con to NULL, even when it returned a 0 return
code[0]. The subsequent strlen(con) will then cause a segfault.

Alternatively the behaviour could also be changed in getpidcon. I
don't know whether the libselinux folks are comitted to the current
behaviour, but the getpidcon man page doesn't really make it obvious
this case could happen.

[0] fb7f35495f/libselinux/src/procattr.c (L155-L158)
2022-12-08 01:00:25 +01:00