]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
15 months agoMerge pull request #28109 from mrc0mmand/more-journal-shenanigans
Luca Boccassi [Wed, 21 Jun 2023 23:46:06 +0000 (00:46 +0100)] 
Merge pull request #28109 from mrc0mmand/more-journal-shenanigans

test: cover a couple of missed code paths in journalctl/journald

15 months agosystemd-analyze: allow --quiet for condition checks
Ronan Pigott [Wed, 21 Jun 2023 02:47:47 +0000 (19:47 -0700)] 
systemd-analyze: allow --quiet for condition checks

I figure these messages are rather unnecessary, so let the user quiet
them with the existing --quiet flag if desired. Makes systemd-analyze
condition a little more ergonomic in scripts.

15 months agoelf-util: discard PT_LOAD segment early based on the start address.
Romain Geissler [Tue, 20 Jun 2023 16:06:31 +0000 (16:06 +0000)] 
elf-util: discard PT_LOAD segment early based on the start address.

Indeed when iterating over all the PT_LOAD segment of the core dump
while trying to look for the elf headers of a given module, we iterate
over them all and try to use the first one for which we can parse a
package metadata, but the start address is never taken into account,
so absolutely nothing guarantees we actually parse the right ELF header
of the right module we are currently iterating on.

This was tested like this:
 - Create a core dump using sleep on a fedora 37 container, with an
   explicit LD_PRELOAD of a library having a valid package metadata:

    podman run -t -i --rm -v $(pwd):$(pwd) -w $(pwd) fedora:37 bash -x -c \
        'LD_PRELOAD=libreadline.so.8 sleep 1000 & SLEEP_PID="$!" && sleep 1 && kill -11 "${SLEEP_PID}" && mv "core.${SLEEP_PID}" the-core'

 - Then from a fedora 38 container with systemd installed, the resulting
   core dump has been passed to systemd-coredump with and without this
   patch. Without this patch, we get:

       Module /usr/bin/sleep from rpm bash-5.2.15-3.fc38.x86_64
       Module /usr/lib64/libtinfo.so.6.3 from rpm coreutils-9.1-8.fc37.x86_64
       Module /usr/lib64/libc.so.6 from rpm coreutils-9.1-8.fc37.x86_64
       Module /usr/lib64/libreadline.so.8.2 from rpm coreutils-9.1-8.fc37.x86_64
       Module /usr/lib64/ld-linux-x86-64.so.2 from rpm coreutils-9.1-8.fc37.x86_64

   While with this patch we get:

       Module /usr/bin/sleep from rpm bash-5.2.15-3.fc38.x86_64
       Module /usr/lib64/libtinfo.so.6.3 from rpm ncurses-6.3-5.20220501.fc37.x86_64
       Module /usr/lib64/libreadline.so.8.2 from rpm readline-8.2-2.fc37.x86_64

So the parsed package metadata reported by systemd-coredump when the module
files are not found on the host (ie the case of crash inside a container) are
now correct. The inconsistency of the first module in the above example
(sleep is indeed not provided by the bash package) can be ignored as it
is a consequence of how this was tested.

In addition to this, this also fixes the performance issue of
systemd-coredump in case of the crashing process uses a large number of
shared libraries and having no package metadata, as reported in
https://sourceware.org/pipermail/elfutils-devel/2023q2/006225.html.

15 months agoMerge pull request #27942 from DaanDeMeyer/root-ephemeral
Daan De Meyer [Wed, 21 Jun 2023 15:24:39 +0000 (17:24 +0200)] 
Merge pull request #27942 from DaanDeMeyer/root-ephemeral

core: Add RootEphemeral= setting

15 months agotest: cover a couple of missed code paths in journalctl/journald 28109/head
Frantisek Sumsal [Wed, 21 Jun 2023 11:14:54 +0000 (13:14 +0200)] 
test: cover a couple of missed code paths in journalctl/journald

15 months agotest: Add RootEphemeral= integration test 27942/head
Daan De Meyer [Tue, 20 Jun 2023 11:54:07 +0000 (13:54 +0200)] 
test: Add RootEphemeral= integration test

15 months agotest: Add touch into minimal verity test image
Daan De Meyer [Tue, 20 Jun 2023 11:53:45 +0000 (13:53 +0200)] 
test: Add touch into minimal verity test image

15 months agocore: Add RootEphemeral= setting
Daan De Meyer [Tue, 6 Jun 2023 15:44:09 +0000 (17:44 +0200)] 
core: Add RootEphemeral= setting

This setting allows services to run in an ephemeral copy of the root
directory or root image. To make sure the ephemeral copies are always
cleaned up, we add a tmpfiles snippet to unconditionally clean up
/var/lib/systemd/ephemeral. To prevent in use ephemeral copies from
being cleaned up by tmpfiles, we use the newly added COPY_LOCK_BSD
and BTRFS_SNAPSHOT_LOCK_BSD flags to take a BSD lock on the ephemeral
copies which instruct tmpfiles to not touch those ephemeral copies as
long as the BSD lock is held.

15 months agojournal-remote: fix typo in an error message
Frantisek Sumsal [Wed, 21 Jun 2023 09:09:12 +0000 (11:09 +0200)] 
journal-remote: fix typo in an error message

15 months agomeson: update man rules
Zbigniew Jędrzejewski-Szmek [Tue, 20 Jun 2023 23:46:45 +0000 (17:46 -0600)] 
meson: update man rules

Fixup for 403082602d4230c224529c46e2d8a392f3a50e49.

15 months agoMerge pull request #28079 from Geass-LL/comment
Zbigniew Jędrzejewski-Szmek [Tue, 20 Jun 2023 23:40:36 +0000 (01:40 +0200)] 
Merge pull request #28079 from Geass-LL/comment

basic/env-file: also change to state PRE_KEY if we see NEWLINE in sta…

15 months agoMerge pull request #28082 from mrc0mmand/more-journal-remote-tests
Luca Boccassi [Tue, 20 Jun 2023 22:38:24 +0000 (23:38 +0100)] 
Merge pull request #28082 from mrc0mmand/more-journal-remote-tests

test: add a couple of tests for systemd-journal-{remote,upload}

15 months agoMerge pull request #28095 from poettering/generic-valid-version
Lennart Poettering [Tue, 20 Jun 2023 19:37:46 +0000 (21:37 +0200)] 
Merge pull request #28095 from poettering/generic-valid-version

make version_is_valid() generic

15 months agostat-util: add missing S_IFLNK entry in inode_type_to_string()
Lennart Poettering [Tue, 20 Jun 2023 15:03:47 +0000 (17:03 +0200)] 
stat-util: add missing S_IFLNK entry in inode_type_to_string()

No idea what happened here, but it's a glaring omission.

15 months agoanalyze: also check for version string validity 28095/head
Lennart Poettering [Tue, 20 Jun 2023 16:30:40 +0000 (18:30 +0200)] 
analyze: also check for version string validity

It's highly interesting to see if tools such as systemd-sysupdate
consider a version valid, hence let's output that too (though
gracefully, not fatally)

15 months agostring-util: move version_is_valid() into generic code
Lennart Poettering [Thu, 2 Mar 2023 10:09:42 +0000 (11:09 +0100)] 
string-util: move version_is_valid() into generic code

While we are at it, replace the sloppy use of filename_is_valid() by the
less sloppy filename_part_is_valid() (as added by the preceeding
commit), since we don#t want to be too restrictive here. (After all,
version strings invalid as standalone filenames might be valid as part
of filenames, and hence we should allow them).

15 months agopath-util: split filename_is_valid() in two
Lennart Poettering [Fri, 3 Mar 2023 17:15:39 +0000 (18:15 +0100)] 
path-util: split filename_is_valid() in two

Add a helper filename_part_is_valid() which does half of what
filename_is_valid() does: it checks for valid chars and length, but does
not filter out ".", ".." and "", as these are OK as parts of filenames,
just not alone.

15 months agohwdb: add support for Jun Tab2/Dere T11 to 60-sensor.hwdb (#28092)
Juno Computers [Tue, 20 Jun 2023 16:41:47 +0000 (12:41 -0400)] 
hwdb: add support for Jun Tab2/Dere T11 to 60-sensor.hwdb (#28092)

15 months agohostnamectl: show age of firmware as time span, too
Lennart Poettering [Tue, 20 Jun 2023 13:26:19 +0000 (15:26 +0200)] 
hostnamectl: show age of firmware as time span, too

This converts the date into a relative timespan from the current time
on, and outputs it. It marks it yellow if older than two years, since
old firmware is probably a security risk. We don't make it red, since we
don't know though.

15 months agoMerge pull request #28080 from poettering/dmi-fixes
Lennart Poettering [Tue, 20 Jun 2023 16:40:08 +0000 (18:40 +0200)] 
Merge pull request #28080 from poettering/dmi-fixes

fix udev DMI rules – make sure hostnamectl shows correct hw info even after device trigger

15 months agoMerge pull request #28089 from poettering/sleep-cleanups
Lennart Poettering [Tue, 20 Jun 2023 16:39:49 +0000 (18:39 +0200)] 
Merge pull request #28089 from poettering/sleep-cleanups

sleep-config: various clean-ups

15 months agoMerge pull request #28087 from poettering/transaction-flags
Lennart Poettering [Tue, 20 Jun 2023 14:21:05 +0000 (16:21 +0200)] 
Merge pull request #28087 from poettering/transaction-flags

transaction: change four boolean funciton parameters into a single flags parameter

15 months agotest: add a couple of tests for systemd-journal-{remote,upload} 28082/head
Frantisek Sumsal [Mon, 19 Jun 2023 15:12:39 +0000 (17:12 +0200)] 
test: add a couple of tests for systemd-journal-{remote,upload}

15 months agotmpfiles: Add note to man page about guaranteed cleanup for files/directories
Daan De Meyer [Tue, 20 Jun 2023 10:59:24 +0000 (12:59 +0200)] 
tmpfiles: Add note to man page about guaranteed cleanup for files/directories

15 months agotmpfiles: Don't log about harmless errors when trying to lock file
Daan De Meyer [Tue, 6 Jun 2023 15:23:10 +0000 (17:23 +0200)] 
tmpfiles: Don't log about harmless errors when trying to lock file

Let's make sure we don't log if the file is a symlink or does not
exist.

15 months agotmpfiles: Fix BSD lock logging messages
Daan De Meyer [Tue, 6 Jun 2023 14:55:14 +0000 (16:55 +0200)] 
tmpfiles: Fix BSD lock logging messages

15 months agodissect-image: Log if verity signature partition is too large
Daan De Meyer [Tue, 6 Jun 2023 14:54:24 +0000 (16:54 +0200)] 
dissect-image: Log if verity signature partition is too large

15 months agonamespace: Load sidecar verity settings in apply_mount_namespace()
Daan De Meyer [Thu, 23 Mar 2023 12:48:42 +0000 (13:48 +0100)] 
namespace: Load sidecar verity settings in apply_mount_namespace()

Let's reduce the argument count of setup_namespace() a bit by loading
the sidecar verity settings in apply_mount_namespace(). This will also
make it possible to pass file descriptors to the root image/directory
into setup_namespace() as before this wasn't possible because the
verity settings logic looks for sidecar files next to the
root image which requires the path to be available.

15 months agoMerge pull request #27863 from DaanDeMeyer/copy-lock
Daan De Meyer [Tue, 20 Jun 2023 13:22:24 +0000 (15:22 +0200)] 
Merge pull request #27863 from DaanDeMeyer/copy-lock

Add helpers to lock a directory before copying into it

15 months agohostnamed: when parsing day/month of firmware date, force decimal parsing 28080/head
Lennart Poettering [Tue, 20 Jun 2023 13:00:07 +0000 (15:00 +0200)] 
hostnamed: when parsing day/month of firmware date, force decimal parsing

safe_atou() by default determines the base from the prefix 0x, 0b, 0o
and for compat with just 0 for octal. This is not what we want here,
since the date components are padded with zeroes yet still decimal.
Hence force decimal parsing (and while we are at it, prohibit a couple
of unexpected decorations).

WIthout this we'd fail to parse any the 8th and 9th day of each months, as
well aus aug and september of every year, because these look like octal
numbers but cannot actually parsed as such.

Let's change the testcase to check for a date that exposes this
bheaviour.

15 months agorules: drop weird spaces
Lennart Poettering [Mon, 19 Jun 2023 16:49:05 +0000 (18:49 +0200)] 
rules: drop weird spaces

15 months agohostnamed: don't read DMI data within a container
Lennart Poettering [Mon, 19 Jun 2023 16:46:36 +0000 (18:46 +0200)] 
hostnamed: don't read DMI data within a container

If we run in a container we should show info about the container, not
the host.

15 months agorules: split out DMI related rules from udev-default.rules
Lennart Poettering [Mon, 19 Jun 2023 16:44:54 +0000 (18:44 +0200)] 
rules: split out DMI related rules from udev-default.rules

The DMI rules where so far guarded by an ACTION=="add" rule, but that
doesn't really make sense for setting properties (only for setting
access modes/ownership of nodes).

Hence let's move this into its own file, that guards properly on
ACTION!="remove".

Before this change the hardware vendor/model info would be dropped
whenever the device was retriggered.

15 months agoupdate TODO
Lennart Poettering [Tue, 20 Jun 2023 12:41:08 +0000 (14:41 +0200)] 
update TODO

15 months agosleep: rename sleep-config.[ch] → sleep-util.[ch] 28089/head
Lennart Poettering [Tue, 20 Jun 2023 12:18:52 +0000 (14:18 +0200)] 
sleep: rename sleep-config.[ch] → sleep-util.[ch]

The file long ceased to be exclusively about configuration of the sleep
operation. It contains many many calls for other purposes, hence give it
a more generic name.

15 months agosleep-config: reduce scope of DMI object path a bit
Lennart Poettering [Tue, 20 Jun 2023 12:15:42 +0000 (14:15 +0200)] 
sleep-config: reduce scope of DMI object path a bit

We need this in a single function only, hence move it there, and make it
a static field so that it has local scope.

While we are at it, rename s/readsize to buf/bufsize, to make
relationship clear. In particular as the data read is actually binary
and "s" hence a misnomer, since it suggests it was a string.

15 months agobtrfs-util: Add BTRFS_SNAPSHOT_LOCK_BSD 27863/head
Daan De Meyer [Tue, 28 Mar 2023 10:32:51 +0000 (12:32 +0200)] 
btrfs-util: Add BTRFS_SNAPSHOT_LOCK_BSD

When making ephemeral snapshots of subvolumes whose cleanup depends on
whether they're locked or not, it's necessary to have the lock from the
very beginning, so let's support that with a new BTRFS_SNAPSHOT_LOCK_BSD
flag.

15 months agosleep-config: rename .device field to .path
Lennart Poettering [Tue, 20 Jun 2023 11:21:28 +0000 (13:21 +0200)] 
sleep-config: rename .device field to .path

This has been badly named given the path doesn't refer to a device quite
likely, but to a path to a regular file. Hence let's be more precise
with naming.

(.device kinda suggests this was an sd_device object of sorts, but it
really isn't.)

15 months agosleep-config: don't use 'device_id' moniker for a dev_t entity
Lennart Poettering [Tue, 20 Jun 2023 10:34:09 +0000 (12:34 +0200)] 
sleep-config: don't use 'device_id' moniker for a dev_t entity

We usually call dev_t entities "devnum" or "devno". That's redundant
enough, let's not call this "device_id". In particular as that's
something else (in udev context).

15 months agosleep-config: pin swap device while operating via O_PATH
Lennart Poettering [Tue, 20 Jun 2023 10:32:21 +0000 (12:32 +0200)] 
sleep-config: pin swap device while operating via O_PATH

15 months agosleep-config: replace SwapEntry's .type field with a proper enum
Lennart Poettering [Tue, 20 Jun 2023 10:31:10 +0000 (12:31 +0200)] 
sleep-config: replace SwapEntry's .type field with a proper enum

Following our usual rule: let's parse this early into internal
representation, and stick to that. don't pass unparsed strings around
needlessly.

15 months agosleep-config: check if we operate on regular file in swap_device_to_device_id() in...
Lennart Poettering [Tue, 20 Jun 2023 10:26:46 +0000 (12:26 +0200)] 
sleep-config: check if we operate on regular file in swap_device_to_device_id() in swap file code path

Similar to the previous commit: before we continue doing swap file
operations let's ensure this actually is a swap file.

15 months agosleep-config: replace useless fstat() by useful fd_verify_regular()
Lennart Poettering [Tue, 20 Jun 2023 10:23:58 +0000 (12:23 +0200)] 
sleep-config: replace useless fstat() by useful fd_verify_regular()

For some reason there was an fstat() call here whose results was
entirely ignored. Let's remove it. Let's add a call to
fd_verify_regular() instead, because this is a code path for swap files,
hence let's make sure we actually operate on a file, and nothing else.

15 months agosleep-config: rename can_sleep_state() parameter
Lennart Poettering [Tue, 20 Jun 2023 10:22:28 +0000 (12:22 +0200)] 
sleep-config: rename can_sleep_state() parameter

Just some trivial renaming, to indicate that these are not the supported
but the requested sleep states.

15 months agotransaction: drop bus error arg from transaction_add_propagate_reload_jobs() 28087/head
Lennart Poettering [Tue, 20 Jun 2023 11:07:53 +0000 (13:07 +0200)] 
transaction: drop bus error arg from transaction_add_propagate_reload_jobs()

We erase the error anyway always, hence no point in even passing
anything in from callers.

15 months agotransaction: rebreak comments to match current coding style
Lennart Poettering [Tue, 20 Jun 2023 10:19:29 +0000 (12:19 +0200)] 
transaction: rebreak comments to match current coding style

15 months agotransaction: use more verbose dbus error data in log message where available
Lennart Poettering [Tue, 20 Jun 2023 10:20:38 +0000 (12:20 +0200)] 
transaction: use more verbose dbus error data in log message where available

15 months agotransaction: turn four bool parameters into a proper flags parameters
Lennart Poettering [Tue, 20 Jun 2023 10:19:03 +0000 (12:19 +0200)] 
transaction: turn four bool parameters into a proper flags parameters

15 months agogpt-auto: expand the loader partition UUID check to include XBOOTLDR
Mike Yuan [Fri, 10 Feb 2023 18:50:41 +0000 (02:50 +0800)] 
gpt-auto: expand the loader partition UUID check to include XBOOTLDR

Before this commit, we only accept the case when LoaderDevicePartUUID
points to the ESP, while XBOOTLDR is mounted unconditionally.

After this commit, we check if LoaderDevicePartUUID points to either
ESP or XBOOTLDR. If it does, mount both, else nothing gets mounted.

15 months agoNEWS: note the incompatible change of EnvironmentFile 28079/head
licunlong [Tue, 20 Jun 2023 03:11:02 +0000 (11:11 +0800)] 
NEWS: note the incompatible change of EnvironmentFile

15 months agobasic/env-file: also change to state PRE_KEY if we see NEWLINE in state COMMENT_ESCAPE
licunlong [Mon, 19 Jun 2023 13:56:33 +0000 (21:56 +0800)] 
basic/env-file: also change to state PRE_KEY if we see NEWLINE in state COMMENT_ESCAPE

When we see a "\" in COMMENT state, we change the state to COMMENT_ESCAPE. When we got
a new character, we reset the state to COMMENT, but this character is not dispatched.
Usually the character is NEWLINE, if so we will stay in COMMENT state until we find
the next NEWLINE.

fix: https://github.com/systemd/systemd/issues/27975

15 months agoFix quoting
cvlc12 [Mon, 19 Jun 2023 19:08:21 +0000 (21:08 +0200)] 
Fix quoting

15 months agosysusers.d: create the user for systemd-journal-upload.service
Frantisek Sumsal [Mon, 19 Jun 2023 16:38:47 +0000 (18:38 +0200)] 
sysusers.d: create the user for systemd-journal-upload.service

15 months agojournal-upload: capitalize all error messages
Frantisek Sumsal [Mon, 19 Jun 2023 15:12:39 +0000 (17:12 +0200)] 
journal-upload: capitalize all error messages

To make them consistent throughout the file.

15 months agojournal-remote: capitalize all error messages
Frantisek Sumsal [Mon, 19 Jun 2023 15:12:38 +0000 (17:12 +0200)] 
journal-remote: capitalize all error messages

To make them consistent throughout the file.

15 months agojournal-remote: sync TrustedCertificateFile= parsing with journal-upload
Frantisek Sumsal [Mon, 19 Jun 2023 15:12:38 +0000 (17:12 +0200)] 
journal-remote: sync TrustedCertificateFile= parsing with journal-upload

So we can use TrustedCertificateFile=- to disable certificate checking
for both utilities.

15 months agojournal-remote: make MHD_OPTION_EXTERNAL_LOGGER the first option
Frantisek Sumsal [Mon, 19 Jun 2023 15:12:37 +0000 (17:12 +0200)] 
journal-remote: make MHD_OPTION_EXTERNAL_LOGGER the first option

To suppress a warning on journal-remote startup:
        systemd-journal-remote[691]: microhttpd:
        MHD_OPTION_EXTERNAL_LOGGER is not the first option specified for
        the daemon. Some messages may be printed by the standard MHD
        logger.

15 months agojournal-remote: minor cleanups
Frantisek Sumsal [Mon, 19 Jun 2023 15:12:37 +0000 (17:12 +0200)] 
journal-remote: minor cleanups

15 months agojournal-remote: simplify error handling a bit
Frantisek Sumsal [Mon, 19 Jun 2023 15:12:30 +0000 (17:12 +0200)] 
journal-remote: simplify error handling a bit

15 months agotest: cover systemd-journal-remote --url=...
Frantisek Sumsal [Mon, 19 Jun 2023 15:12:23 +0000 (17:12 +0200)] 
test: cover systemd-journal-remote --url=...

15 months agoMerge pull request #27941 from cvlc12/early_cpio
Zbigniew Jędrzejewski-Szmek [Mon, 19 Jun 2023 16:49:31 +0000 (18:49 +0200)] 
Merge pull request #27941 from cvlc12/early_cpio

Define 'microcode' file type for the kernel-install staging area.

15 months agoRevert "core/service: when resetting PID also reset known flag"
msizanoen [Mon, 12 Jun 2023 03:30:12 +0000 (10:30 +0700)] 
Revert "core/service: when resetting PID also reset known flag"

This reverts commit ff32060f2ed37b68dc26256b05e2e69013b0ecfe.

This change is incorrect as we don't want to mark the PID as invalid but
only mark it as dead.

The change in question also breaks user level socket activation for
`podman.service` as the termination of the main `podman system service`
process is not properly handled, causing any application accessing the
socket to hang.

This is because the user-level `podman.service` unit also hosts two
non-main processes: `rootlessport` and `rootlessport-child` which causes
the `cgroup_good` check to still succeed.

The original submitter of this commit is recommended to find another
more correct way to fix the cgroupsv1 issue on CentOS 8.

15 months agoAdd docs, improve log comments. 27941/head
cvlc12 [Mon, 19 Jun 2023 15:31:58 +0000 (17:31 +0200)] 
Add docs, improve log comments.

15 months agoMerge pull request #28078 from keszybz/trivial-syntax-and-wording-fixes
Frantisek Sumsal [Mon, 19 Jun 2023 14:41:16 +0000 (16:41 +0200)] 
Merge pull request #28078 from keszybz/trivial-syntax-and-wording-fixes

Trivial syntax and wording fixes

15 months agoMerge pull request #28056 from dtardon/polkit-cleanup
Lennart Poettering [Mon, 19 Jun 2023 13:50:35 +0000 (15:50 +0200)] 
Merge pull request #28056 from dtardon/polkit-cleanup

Some bus-polkit cleanup

15 months agoman: place options in a some limited form of subsections
Lennart Poettering [Mon, 19 Jun 2023 11:00:29 +0000 (13:00 +0200)] 
man: place options in a some limited form of subsections

Let's visually separate the options associated with cpu, io, memory, …
in subsections

This patch tries to be minimal. It just adds the section titles, and
does minimal reordering to make sure the options on the same kind of
resource are placed close to each other.

15 months agomachinectl: fix message 28078/head
Zbigniew Jędrzejewski-Szmek [Mon, 19 Jun 2023 11:35:22 +0000 (13:35 +0200)] 
machinectl: fix message

bus_wait_for_jobs_new() can fail for various reasons.

15 months agoshared: improve messages about switch root operations
Zbigniew Jędrzejewski-Szmek [Mon, 19 Jun 2023 11:35:00 +0000 (13:35 +0200)] 
shared: improve messages about switch root operations

"change" is not clear without context.

15 months agoman/systemd-nspawn: fix indentation and parenthesis location
Zbigniew Jędrzejewski-Szmek [Fri, 16 Jun 2023 07:43:46 +0000 (09:43 +0200)] 
man/systemd-nspawn: fix indentation and parenthesis location

15 months agodocs/CREDENTIALS: fix confusion of i.e. and e.g.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Jun 2023 09:03:39 +0000 (11:03 +0200)] 
docs/CREDENTIALS: fix confusion of i.e. and e.g.

15 months agoman: missing/misplaced periods
Zbigniew Jędrzejewski-Szmek [Mon, 19 Jun 2023 11:35:45 +0000 (13:35 +0200)] 
man: missing/misplaced periods

15 months agoResource control manpage fixup (#28046)
Sam Morris [Mon, 19 Jun 2023 11:30:43 +0000 (12:30 +0100)] 
Resource control manpage fixup (#28046)

The order of the description of each item should match the order that they are declared. Un-document effect of deprecated non-unified CGroup hierarchy on
DefaultCPUAccounting=. Mention that the default value for DefaultCPUAccouting= is
affected by the kernel version.

15 months agoMerge pull request #28074 from mrc0mmand/journal-gatewayd-followups
Luca Boccassi [Mon, 19 Jun 2023 11:14:28 +0000 (12:14 +0100)] 
Merge pull request #28074 from mrc0mmand/journal-gatewayd-followups

A couple of follow-ups for systemd-journal-gatewayd tests

15 months agobus-polkit: put function params to a single line 28056/head
David Tardon [Fri, 26 May 2023 13:42:02 +0000 (15:42 +0200)] 
bus-polkit: put function params to a single line

15 months agobus-polkit: drop unnecessary else
David Tardon [Mon, 19 Jun 2023 10:35:05 +0000 (12:35 +0200)] 
bus-polkit: drop unnecessary else

15 months agobus-polkit: merge variable declarations
David Tardon [Mon, 19 Jun 2023 10:34:27 +0000 (12:34 +0200)] 
bus-polkit: merge variable declarations

15 months agobus-polkit: decrease indentation
David Tardon [Fri, 26 May 2023 13:15:34 +0000 (15:15 +0200)] 
bus-polkit: decrease indentation

15 months agobus-polkit: extract creation of polkit call to a function
David Tardon [Fri, 26 May 2023 13:07:10 +0000 (15:07 +0200)] 
bus-polkit: extract creation of polkit call to a function

15 months agobus-polkit: move verification to a separate function
David Tardon [Fri, 3 Feb 2023 13:05:46 +0000 (14:05 +0100)] 
bus-polkit: move verification to a separate function

15 months agohomework: resize to maximum disk space if disk size is not specified
Gibeom Gwon [Wed, 19 Oct 2022 09:12:29 +0000 (18:12 +0900)] 
homework: resize to maximum disk space if disk size is not specified

If the backing storage is LUKS2 on a block device, auto resize mode
is enabled, and disk size is not specified, resize the partition to
the maximum expandable size.

Fixes: #22255, #23967
15 months agoupdate TODO
Lennart Poettering [Mon, 19 Jun 2023 08:36:42 +0000 (10:36 +0200)] 
update TODO

15 months agomkosi: Update to latest
Daan De Meyer [Thu, 15 Jun 2023 15:31:23 +0000 (17:31 +0200)] 
mkosi: Update to latest

We now run repart before starting systemd-nspawn to make sure that
the root partition is also generated when we boot the image in a
container instead of a VM.

To make sure we start from scratch for both the container boot and
the VM boot, we also enable Ephemeral to make sure all changes to
the image are ephemeral.

15 months agotest: wrap curl when running with ASan 28074/head
Frantisek Sumsal [Mon, 19 Jun 2023 07:21:00 +0000 (09:21 +0200)] 
test: wrap curl when running with ASan

Necessary (unfortunately) for curl on C8S.

15 months agojournal-gatewayd: handle SIGTERM
Frantisek Sumsal [Sun, 18 Jun 2023 21:26:01 +0000 (23:26 +0200)] 
journal-gatewayd: handle SIGTERM

To allow gatewayd to exit cleanly.

15 months agocore/dbus-manager: also show DefaultIOAccounting and DefaultIPAccounting
licunlong [Mon, 19 Jun 2023 02:24:13 +0000 (10:24 +0800)] 
core/dbus-manager: also show DefaultIOAccounting and DefaultIPAccounting

fix: https://github.com/systemd/systemd/issues/28045

15 months agotest: extend the DynamicUser=yes coverage workaround to a couple more services
Frantisek Sumsal [Sun, 18 Jun 2023 21:08:24 +0000 (23:08 +0200)] 
test: extend the DynamicUser=yes coverage workaround to a couple more services

15 months agoDefine 'microcode' type of initrd for the kernel-install staging area.
cvlc12 [Tue, 6 Jun 2023 15:14:57 +0000 (17:14 +0200)] 
Define 'microcode' type of initrd for the kernel-install staging area.

This allows microcode to be referenced first for UKIs and loader entries.

15 months agoMerge pull request #28069 from medhefgo/boot-dp
Luca Boccassi [Sun, 18 Jun 2023 14:11:49 +0000 (15:11 +0100)] 
Merge pull request #28069 from medhefgo/boot-dp

boot: device_path_to_str improvements

15 months agojournal: avoid infinite recursion when closing bad journal FD
Luca Boccassi [Fri, 16 Jun 2023 21:31:04 +0000 (22:31 +0100)] 
journal: avoid infinite recursion when closing bad journal FD

When trying to log, if we fail we try to close the journal FD. If
it is bad, safe_close() will fail and assert, which will try to log,
which will fail, which will try to close the journal FD...
Infinite recursion looks very pretty live in gdb, but let's avoid
that by immediately invalidating the journal FD before closing it.

15 months agoboot: Improve device_path_to_str_internal() 28069/head
Jan Janssen [Sun, 18 Jun 2023 08:54:20 +0000 (10:54 +0200)] 
boot: Improve device_path_to_str_internal()

The UEFI spec has a generic `Path` node representation that can be used
for device path nodes that are unknown. So we can use that instead of
giving up when we see a node other than FilePath.

This also simplifies the FilePath case by just using xasprintf(). The
code is really just a fallback for silly firmware that does not
implement EFI_DEVICE_PATH_TO_TEXT_PROTOCOL (looking at you, Apple).

The correctness of this was tested by round-tripping it through
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL, which yielded an identical device
compared to our input path.

15 months agoboot: Split log_hexdump()
Jan Janssen [Sun, 18 Jun 2023 08:44:39 +0000 (10:44 +0200)] 
boot: Split log_hexdump()

15 months agoboot: Move custom device path string creating into its own function
Jan Janssen [Sun, 18 Jun 2023 07:42:22 +0000 (09:42 +0200)] 
boot: Move custom device path string creating into its own function

15 months agoMerge pull request #28060 from mrc0mmand/remote-journal-tests
Luca Boccassi [Sat, 17 Jun 2023 10:34:50 +0000 (11:34 +0100)] 
Merge pull request #28060 from mrc0mmand/remote-journal-tests

test: add a couple of tests for systemd-journal-gatewayd

15 months agoMerge pull request #28063 from bluca/test_oomd_fixlets
Yu Watanabe [Sat, 17 Jun 2023 05:37:53 +0000 (14:37 +0900)] 
Merge pull request #28063 from bluca/test_oomd_fixlets

Readability fixes for TEST-55-OOMD

15 months agoTEST-55-OOMD: improve ephemeral configuration readability 28063/head
Luca Boccassi [Fri, 16 Jun 2023 23:06:38 +0000 (00:06 +0100)] 
TEST-55-OOMD: improve ephemeral configuration readability

15 months agoTEST-55-OOMD: use /run/ for configuration instead of /etc/
Luca Boccassi [Fri, 16 Jun 2023 23:01:24 +0000 (00:01 +0100)] 
TEST-55-OOMD: use /run/ for configuration instead of /etc/

Make sure configuration is ephemeral if the image is reused

15 months agosocket-activate: make a copy of the command name and arguments 28060/head
Frantisek Sumsal [Fri, 16 Jun 2023 17:05:57 +0000 (19:05 +0200)] 
socket-activate: make a copy of the command name and arguments

When we call safe_fork() with the first argument set (process name), we
call rename_process() that zeroes out saved argv (that was saved by
save_argc_argv() in the main func defined by DEFINE_MAIN_FUNC()). In this
case this means that with --accept both the target executable name and
its arguments will be empty strings:

```
$ systemd-socket-activate --accept --listen 1111 cat &
Listening on [::]:1111 as 3.
$ curl localhost:1111
Communication attempt on fd 3.
Connection from 127.0.0.1:52948 to [::ffff:127.0.0.1]:1111
Spawned cat (cat) as PID 10576.
Execing  ()
Failed to execp  (): No such file or directory
Child 10576 died with code 1
curl: (56) Recv failure: Connection reset by peer
```

Let's make a copy of the necessary arguments beforehand and use it
instead to fix this.

15 months agotest: add a couple of tests for systemd-journal-gatewayd
Frantisek Sumsal [Fri, 16 Jun 2023 16:50:08 +0000 (18:50 +0200)] 
test: add a couple of tests for systemd-journal-gatewayd

15 months agoresolved: Initialize until_valid while storing negative/NXDOMAIN response in the...
Kiran Vemula [Fri, 16 Jun 2023 12:04:37 +0000 (17:34 +0530)] 
resolved: Initialize until_valid while storing negative/NXDOMAIN  response in the cache

Initialize until_valid is properly for negative response, the cached negative responses can be used to answer the queries before contacting upstream server.

15 months agoMerge pull request #28049 from bluca/portablectl_flags
Luca Boccassi [Fri, 16 Jun 2023 16:44:34 +0000 (17:44 +0100)] 
Merge pull request #28049 from bluca/portablectl_flags

portable: fix silly typo in D-Bus interface name, use only new(er) methods from portablectl