]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 months agomkosi: Update to latest 36114/head
Daan De Meyer [Wed, 22 Jan 2025 14:58:13 +0000 (15:58 +0100)] 
mkosi: Update to latest

With the latest mkosi, mkosi takes care of making sure it is
available within mkosi sandbox so we get rid of all the --preserve-env=
options when we invoke mkosi sandbox with sudo as these are not
required anymore. It also doesn't matter anymore if mkosi is installed
in /usr on the host so we get rid of the documentation around that as
well.

9 months agomkosi: Run two more mkosi commands with sudo
Daan De Meyer [Wed, 22 Jan 2025 21:24:36 +0000 (22:24 +0100)] 
mkosi: Run two more mkosi commands with sudo

Running some mkosi commands as root and other not can lead to cache
invalidations with the latest version, so make sure we run everything
as root after we've built the tools tree.

9 months agonetworkd-test: unconditionally stop previous invocation of networkd before starting...
Yu Watanabe [Tue, 21 Jan 2025 18:45:11 +0000 (03:45 +0900)] 
networkd-test: unconditionally stop previous invocation of networkd before starting new one

When networkd is already running, creating some .network files and
friends and starting networkd does not take any effect. Let's always
restart networkd when we want to start a new invocation.

9 months agomountpoint-util: several tweaks for fd_is_mount_point(), drop support for kernels...
Lennart Poettering [Wed, 22 Jan 2025 08:37:25 +0000 (09:37 +0100)] 
mountpoint-util: several tweaks for fd_is_mount_point(), drop support for kernels without /proc/pid/fdinfo/ (#36093)

9 months agomountpoint-util: port path_is_mount_point() to chase_and_open_parent() 36093/head
Mike Yuan [Mon, 20 Jan 2025 22:02:00 +0000 (23:02 +0100)] 
mountpoint-util: port path_is_mount_point() to chase_and_open_parent()

9 months agomountpoint-util: rename fd_is_mount_point() to is_mount_point_at()
Mike Yuan [Mon, 20 Jan 2025 20:53:43 +0000 (21:53 +0100)] 
mountpoint-util: rename fd_is_mount_point() to is_mount_point_at()

fd_* functions in our codebase usually mean fd-specific operations,
while this one actually takes openat()-style params. Rename it
accordingly hence.

9 months agomountpoint-util: some tweaks for fd_is_mount_point()
Mike Yuan [Mon, 20 Jan 2025 20:48:27 +0000 (21:48 +0100)] 
mountpoint-util: some tweaks for fd_is_mount_point()

- Drop fstat() fallback path now that we assume fdinfo
  is available
- Use at_flags_normalize_nofollow()
- Accept empty path the same way as NULL
- Accept fd being AT_FDCWD and filename being "."

9 months agomountpoint-util: our baseline includes fdinfo and mnt_id now
Mike Yuan [Mon, 11 Nov 2024 17:55:10 +0000 (18:55 +0100)] 
mountpoint-util: our baseline includes fdinfo and mnt_id now

9 months agomountpoint-util: check >= 0 for success
Mike Yuan [Mon, 20 Jan 2025 20:43:39 +0000 (21:43 +0100)] 
mountpoint-util: check >= 0 for success

9 months agomountpoint-util: update comment in is_name_to_handle_at_fatal_error()
Mike Yuan [Mon, 20 Jan 2025 21:26:47 +0000 (22:26 +0100)] 
mountpoint-util: update comment in is_name_to_handle_at_fatal_error()

We can now assume name_to_handle_at() syscall is available,
however the underlying fs can still lack support for it.

9 months agofs-util: introduce at_flags_normalize_nofollow() helper
Mike Yuan [Mon, 20 Jan 2025 20:15:46 +0000 (21:15 +0100)] 
fs-util: introduce at_flags_normalize_nofollow() helper

9 months agoupdate TODO
Lennart Poettering [Tue, 21 Jan 2025 11:42:37 +0000 (12:42 +0100)] 
update TODO

9 months agovarlink: fix error name
Lennart Poettering [Tue, 21 Jan 2025 17:34:21 +0000 (18:34 +0100)] 
varlink: fix error name

The documentation and code agree on the same name, since always, but
when I put together the IDL I made a mistake and insert a "Not" that
wasn't supposed to be there.

Let's correct that.

9 months agotree-wide: always include our own headers with "" rather than <>
Lennart Poettering [Tue, 21 Jan 2025 15:08:47 +0000 (16:08 +0100)] 
tree-wide: always include our own headers with "" rather than <>

We got this almost always right. Fix this for a few outliers.

9 months agomkosi: Various tools tree fixes (#36059)
Daan De Meyer [Tue, 21 Jan 2025 14:17:36 +0000 (15:17 +0100)] 
mkosi: Various tools tree fixes (#36059)

9 months agoTEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM 36059/head
Daan De Meyer [Tue, 21 Jan 2025 12:48:13 +0000 (13:48 +0100)] 
TEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM

On CentOS Stream 9/10 booting mkosi qemu with --firmware=linux doesn't
add the virtual TPM to the virtual machine which means TEST-74-AUX-UTILS.run.sh
fails because it requires a TPM.

Let's move the systemd-pcrlock logic that requires a TPM to
TEST-70-TPM.pcrlock to avoid the problem.

9 months agouser-record/home: add concept of alias names for accounts (#36041)
Lennart Poettering [Tue, 21 Jan 2025 11:57:52 +0000 (12:57 +0100)] 
user-record/home: add concept of alias names for accounts (#36041)

9 months agotest: Look for qemu in /usr/libexec/qemu-kvm as well
Daan De Meyer [Tue, 21 Jan 2025 11:29:56 +0000 (12:29 +0100)] 
test: Look for qemu in /usr/libexec/qemu-kvm as well

On CentOS Stream, the qemu binary is /usr/libexec/qemu-kvm so use
that if it's available.

9 months agomkosi: Run more commands as root
Daan De Meyer [Mon, 20 Jan 2025 12:57:02 +0000 (13:57 +0100)] 
mkosi: Run more commands as root

zypper has some new rather questionable userspace level permission
checking that blows ups completely when operating as root on an
cache directory owned by a non-root user, so let's build the tools
tree and set up meson as root to avoid the issue.

(https://github.com/openSUSE/libzypp/issues/603)

Also drop a leftover debug message from coverage.yml while we're at
it.

9 months agomkosi: Don't set -O ^orphan_file in centos stream 9 tools tree
Daan De Meyer [Fri, 17 Jan 2025 15:39:09 +0000 (16:39 +0100)] 
mkosi: Don't set -O ^orphan_file in centos stream 9 tools tree

9 months agomkosi: lcov and shellcheck are not in EPEL 10
Daan De Meyer [Fri, 17 Jan 2025 14:35:37 +0000 (15:35 +0100)] 
mkosi: lcov and shellcheck are not in EPEL 10

Let's drop these from CentOS Stream tools trees as they are not in
EPEL 10 yet.

9 months agomkosi: Use a bigger variety of tools tree distributions
Daan De Meyer [Fri, 17 Jan 2025 12:28:47 +0000 (13:28 +0100)] 
mkosi: Use a bigger variety of tools tree distributions

Let's add more coverage for building with tools trees by building
each image with a tools tree of the same distribution and release.

Because not every tools tree distribution has a newer meson yet, we
only use --max-lines= when meson actually knows the option.

9 months agomkosi: Update to latest
Daan De Meyer [Fri, 17 Jan 2025 14:12:46 +0000 (15:12 +0100)] 
mkosi: Update to latest

9 months agoupdate TODO 36041/head
Lennart Poettering [Thu, 16 Jan 2025 12:58:14 +0000 (13:58 +0100)] 
update TODO

9 months agotest: add test for homed alias and realm user resolution
Lennart Poettering [Thu, 16 Jan 2025 14:18:45 +0000 (15:18 +0100)] 
test: add test for homed alias and realm user resolution

9 months agohomectl: add support for creating users with alias names
Lennart Poettering [Thu, 16 Jan 2025 13:01:15 +0000 (14:01 +0100)] 
homectl: add support for creating users with alias names

9 months agohomed: support user record aliases
Lennart Poettering [Thu, 16 Jan 2025 13:08:51 +0000 (14:08 +0100)] 
homed: support user record aliases

9 months agopam_systemd_home: support login with alias names + user names with realms
Lennart Poettering [Thu, 16 Jan 2025 13:15:03 +0000 (14:15 +0100)] 
pam_systemd_home: support login with alias names + user names with realms

This in particular makes sure that we normalize the user name and update
it in the PAM session, once we acquire it. This means that if you have a
user with name "a" and alias "b", and the user logs in as "b" they end
up properly with "a" as user name set, as intended by the PAM gods.

Moreover, if you have a user "c" in a ralm "d", they may log in by
specifying "c" or "c@d", with equivalent results.

9 months agopam_systemd_home: use right field name in error message
Lennart Poettering [Thu, 16 Jan 2025 13:14:08 +0000 (14:14 +0100)] 
pam_systemd_home: use right field name in error message

9 months agouser-record: add support for alias user names to user record
Lennart Poettering [Thu, 16 Jan 2025 13:15:52 +0000 (14:15 +0100)] 
user-record: add support for alias user names to user record

9 months agouser-record: add helper that checks if a provided user name matches a record
Lennart Poettering [Fri, 3 Jan 2025 16:53:33 +0000 (17:53 +0100)] 
user-record: add helper that checks if a provided user name matches a record

This ensures that user names can be specified either in the regular
short syntax or with a realm appended, and both are accepted. (The
latter of course only if the record actually defines a realm)

9 months agopam: minor coding style tweaks
Lennart Poettering [Thu, 16 Jan 2025 13:15:26 +0000 (14:15 +0100)] 
pam: minor coding style tweaks

9 months agostrv: add strv_equal_ignore_order() helper
Lennart Poettering [Mon, 20 Jan 2025 09:31:09 +0000 (10:31 +0100)] 
strv: add strv_equal_ignore_order() helper

9 months agonetworkd-test.py: generate debugging logs of networkd
Yu Watanabe [Tue, 21 Jan 2025 00:43:43 +0000 (09:43 +0900)] 
networkd-test.py: generate debugging logs of networkd

9 months agoukify: add --policy-digest option
Luca Boccassi [Mon, 20 Jan 2025 00:30:48 +0000 (00:30 +0000)] 
ukify: add --policy-digest option

Uses the newly added policy-digest verb of systemd-measure, for the same
purpose: build a UKI and get digests for the .pcrsig section out, so
that they can be offline signed and reattached

9 months agomeasure: add policy-digest verb
Luca Boccassi [Sun, 19 Jan 2025 22:50:53 +0000 (22:50 +0000)] 
measure: add policy-digest verb

When doing offline signing we need to know the exact payload
to sign, and the 'calculate' verb doesn't really show that, it
shows the PCR values. But what we sign is the hash of the policy.
So add a new verb that outputs the json payload that goes in the
.pcrsig section, without the .sig object, so that we can take them
and give the .pol object to an offline and asynchronous signing
service, such as SUSE's Open Build Service, and then add the .sig
object to the json and attach it to a UKI.

9 months agopidfd: cache our own pidfd inode id, and use it at various places (#36060)
Mike Yuan [Mon, 20 Jan 2025 23:16:12 +0000 (00:16 +0100)] 
pidfd: cache our own pidfd inode id, and use it at various places (#36060)

This is split out of and preparation for #35224, but makes a ton of
sense on its own

9 months agoukify: print debug/progress messages to stderr and pass through --json to systemd...
Luca Boccassi [Mon, 20 Jan 2025 21:34:59 +0000 (21:34 +0000)] 
ukify: print debug/progress messages to stderr and pass through --json to systemd-measure (#36081)

9 months agoudev: allow to enable trace logging in systemd-udevd (#36070)
Lennart Poettering [Mon, 20 Jan 2025 21:02:13 +0000 (22:02 +0100)] 
udev: allow to enable trace logging in systemd-udevd (#36070)

split out of #35968.

9 months agoupdate TODO 36060/head
Lennart Poettering [Fri, 17 Jan 2025 13:54:24 +0000 (14:54 +0100)] 
update TODO

9 months agonotify: add support for MANAGERPIDFDID
Lennart Poettering [Sun, 19 Jan 2025 20:43:43 +0000 (21:43 +0100)] 
notify: add support for MANAGERPIDFDID

9 months agopid1: pass pidfdids to invoked services in $MAINPIDFDID and $MANAGERPIDFDID
Lennart Poettering [Fri, 17 Jan 2025 13:09:53 +0000 (14:09 +0100)] 
pid1: pass pidfdids to invoked services in $MAINPIDFDID and $MANAGERPIDFDID

9 months agorandom-util: include pidfdid in fallback RNG buffer
Lennart Poettering [Mon, 18 Nov 2024 10:23:26 +0000 (11:23 +0100)] 
random-util: include pidfdid in fallback RNG buffer

This doesn't make the RNG cryptographic strength, but if we have it
easily accessible, why not include the pidfd id. It is after all not
vulnerable to reuse.

9 months agopidref: now that we have the cached pidfdid of our own process, use it
Lennart Poettering [Fri, 17 Jan 2025 13:02:08 +0000 (14:02 +0100)] 
pidref: now that we have the cached pidfdid of our own process, use it

Note that this drops a lot of "const" qualifiers on PidRef arguments.
That's because pidref_is_self() suddenly might end changing the PidRef
because it acquires the pidfd ID.

We had this previously already with pidfd_equal(), but this amplifies
the problem.

I guess we C's "const" doesn't really work for stuff that contains
caches, that is just conceptually constant, but not actually.

9 months agopidfd-util: add helper for getting our own pidfdid
Lennart Poettering [Mon, 18 Nov 2024 10:23:07 +0000 (11:23 +0100)] 
pidfd-util: add helper for getting our own pidfdid

let's start caching our own pidfd id, since it's somewhat involved to
get but a much better identifier for things than the classic PID is.

9 months agopidfd-util: dont open a new pidfd unnecessarily in pidfd_check_pidfs()
Lennart Poettering [Fri, 17 Jan 2025 13:01:30 +0000 (14:01 +0100)] 
pidfd-util: dont open a new pidfd unnecessarily in pidfd_check_pidfs()

9 months agobuild: fail the build if we accidentally drop a "const" qualifier on a parameter
Lennart Poettering [Fri, 17 Jan 2025 13:47:34 +0000 (14:47 +0100)] 
build: fail the build if we accidentally drop a "const" qualifier on a parameter

let's be strict here, our codebase allows it.

9 months agomachine-id-setup: move code to use chase() (#35979)
Lennart Poettering [Mon, 20 Jan 2025 20:18:24 +0000 (21:18 +0100)] 
machine-id-setup: move code to use chase() (#35979)

I just wanted to switch the machine id setup code to use chase() or its
changes, given it supports --root=/--image= operation. That turned out
to be a rabbit hole, and became much bigger...

9 months agocryptsetup and friends: use dispatch_verb() (#36072)
Lennart Poettering [Mon, 20 Jan 2025 20:17:01 +0000 (21:17 +0100)] 
cryptsetup and friends: use dispatch_verb() (#36072)

9 months agonspawn: downgrade log message about usrquota to debug
Luca Boccassi [Mon, 20 Jan 2025 19:05:11 +0000 (19:05 +0000)] 
nspawn: downgrade log message about usrquota to debug

This is shown every time nspawn is started, which is annoying
and there's nothing a user can do about it, since it depends on
an extremely new kernel. Downgrade to debug.

Follow-up for 611ae598889471830b2f1d7251c271b79884b1c4

9 months agoudevadm-control: allow to enable/disable trace logging in systemd-udevd 36070/head
Yu Watanabe [Sat, 11 Jan 2025 17:05:43 +0000 (02:05 +0900)] 
udevadm-control: allow to enable/disable trace logging in systemd-udevd

Should be useful for debugging udev rules.

9 months agoudev-varlink: allow to enable/disable trace logging through varlink
Yu Watanabe [Sat, 11 Jan 2025 16:43:12 +0000 (01:43 +0900)] 
udev-varlink: allow to enable/disable trace logging through varlink

This introduces io.systemd.Udev.SetTrace varlink method. With the
method, trace logging by udev worker can be dynamically controlled.

9 months agoudev-config: allow to enable trace logging through kernel command line
Yu Watanabe [Sat, 11 Jan 2025 16:35:48 +0000 (01:35 +0900)] 
udev-config: allow to enable trace logging through kernel command line

This adds udev.trace[=BOOL] kernel command line option to control trace
logging.

9 months agoudev-control: move setting of log level to manager_adjust_config()
Yu Watanabe [Mon, 20 Jan 2025 19:03:05 +0000 (04:03 +0900)] 
udev-control: move setting of log level to manager_adjust_config()

No functional change, just refactoring.

9 months agoresolved: empty "ipv4hint" and "ipv6hint" SvcParams are invalid
Tommi Rantala [Mon, 20 Jan 2025 11:05:49 +0000 (13:05 +0200)] 
resolved: empty "ipv4hint" and "ipv6hint" SvcParams are invalid

According to RFC 9460 "An empty list of addresses is invalid."

https://www.rfc-editor.org/rfc/rfc9460.html#section-7.3

9 months agointegritysetup: use dispatch_verb() 36072/head
Yu Watanabe [Sat, 18 Jan 2025 20:17:14 +0000 (05:17 +0900)] 
integritysetup: use dispatch_verb()

9 months agoveritysetup: use dispatch_verb()
Yu Watanabe [Sat, 18 Jan 2025 20:10:04 +0000 (05:10 +0900)] 
veritysetup: use dispatch_verb()

9 months agocryptsetup: use dispatch_verb()
Yu Watanabe [Sat, 18 Jan 2025 19:58:54 +0000 (04:58 +0900)] 
cryptsetup: use dispatch_verb()

9 months agocryptsetup: drop doubled space
Yu Watanabe [Sat, 18 Jan 2025 19:42:31 +0000 (04:42 +0900)] 
cryptsetup: drop doubled space

9 months agocryptsetup: use mangle_none() at one more place
Yu Watanabe [Sat, 18 Jan 2025 19:42:20 +0000 (04:42 +0900)] 
cryptsetup: use mangle_none() at one more place

9 months agotree-wide: drop merely used _cleanup_ macros, and introduce several new ones (#36071)
Yu Watanabe [Mon, 20 Jan 2025 18:41:27 +0000 (03:41 +0900)] 
tree-wide: drop merely used _cleanup_ macros, and introduce several new ones (#36071)

9 months agoudev: cleanups around sd_listen_fds() (#36030)
Lennart Poettering [Mon, 20 Jan 2025 17:06:56 +0000 (18:06 +0100)] 
udev: cleanups around sd_listen_fds() (#36030)

Fixes a bug introduced by 2f0aa9a80445ef18086260a60fad71920ad9486c.

In the offending commit, `sd_varlink_server_listen_auto()` is used. That
may add file descriptors of netlink socket for uevent and legacy control
socket varlink server. Then, udevd may fail to receive uevents.

9 months agotree-wide: several follow-ups for varlink methods (#36080)
Lennart Poettering [Mon, 20 Jan 2025 17:00:21 +0000 (18:00 +0100)] 
tree-wide: several follow-ups for varlink methods (#36080)

Follow-ups for #35914.

9 months agoudev-rules: introduce OPTIONS="dump" (#36069)
Lennart Poettering [Mon, 20 Jan 2025 16:59:40 +0000 (17:59 +0100)] 
udev-rules: introduce OPTIONS="dump" (#36069)

split out of #35968.

9 months agomkosi: Don't set ToolsTreeRepositories= for CentOS Stream tools
Daan De Meyer [Fri, 17 Jan 2025 14:29:14 +0000 (15:29 +0100)] 
mkosi: Don't set ToolsTreeRepositories= for CentOS Stream tools

mkosi does this itself so no need to do it in systemd.

9 months agosbsign: Make sure output file respects umask (#36083)
Daan De Meyer [Mon, 20 Jan 2025 13:02:29 +0000 (14:02 +0100)] 
sbsign: Make sure output file respects umask (#36083)

9 months agoupdate TODO 35979/head
Lennart Poettering [Mon, 20 Jan 2025 10:30:32 +0000 (11:30 +0100)] 
update TODO

9 months agochase: move appending of trailing slash out of loop
Lennart Poettering [Mon, 13 Jan 2025 12:20:29 +0000 (13:20 +0100)] 
chase: move appending of trailing slash out of loop

let's move final processing of the filename out of the loop, and apply
it in all cases, uniformly, even if we are asked to only return the
final filename.

9 months agochase: introduce flags that verify that chased inode is regular file or dir
Lennart Poettering [Mon, 13 Jan 2025 12:12:23 +0000 (13:12 +0100)] 
chase: introduce flags that verify that chased inode is regular file or dir

This also implies the new CHASE_MUST_BE_DIRECTORY flag in case the
specified path ends in a slash. This makes the rules stricter, it means
we'll be closer to how this is handled in kernel: if a path ends in a
slash it can never refer to a non-directory.

9 months agomachine-id-setup: rework writing of /etc/machine-id around chase()
Lennart Poettering [Mon, 13 Jan 2025 11:09:03 +0000 (12:09 +0100)] 
machine-id-setup: rework writing of /etc/machine-id around chase()

Let's make sure we properly stay inside of the root fs if one is
provided, i.e. stop using prefix_roota() at one more place.

9 months agomachine-id-setup: remove unnecessary 'else'
Lennart Poettering [Mon, 13 Jan 2025 11:19:18 +0000 (12:19 +0100)] 
machine-id-setup: remove unnecessary 'else'

9 months agomachine-id-setup: rework --commit based on chase()
Lennart Poettering [Sat, 11 Jan 2025 23:17:03 +0000 (00:17 +0100)] 
machine-id-setup: rework --commit based on chase()

9 months agomachine-id-setup: do sync() stuff only when operating on the real rootfs
Lennart Poettering [Thu, 16 Jan 2025 09:22:39 +0000 (10:22 +0100)] 
machine-id-setup: do sync() stuff only when operating on the real rootfs

If we operate relative some explicit rootfs the reason for the sync()ing
is not really given, we are not really acting as a milestone at boot,
but "offline".

9 months agomachine-id-setup: rearrange --help to match how we do them these days
Lennart Poettering [Wed, 15 Jan 2025 20:58:31 +0000 (21:58 +0100)] 
machine-id-setup: rearrange --help to match how we do them these days

9 months agochase: use streq() not path_equal() to compare filenames
Lennart Poettering [Mon, 13 Jan 2025 11:56:57 +0000 (12:56 +0100)] 
chase: use streq() not path_equal() to compare filenames

9 months agochase: allow using chase() as mkdir_p() replacement
Lennart Poettering [Mon, 13 Jan 2025 11:53:54 +0000 (12:53 +0100)] 
chase: allow using chase() as mkdir_p() replacement

This allows using CHASE_MKDIR_0755 without CHASE_NONEXISTENT or
CHASE_PARENT, so that it will create the final component of the path
too should it be missing.

This is really useful as a mkdir_p() replacement that returns an fd to
the final component, and knows how to operate relative to a root fs.

Kinda reverts 4ea0bcb9229fe12e0c428659d76934351b821872 (which only
refused the flags combination which didn't work, instead of making it
work, which is what this commit does.)

This also corrects behaviour if CHASE_MKDIR_0755 is used in one more
way: we'll now always open the dir as O_PATH. This is generally the
better idea, but matters in particular once with allow using
CHASE_MKDIR_0755 to create the final component: we should uniformly
return an O_PATH dir that must be converted to a proper fd first before
using it.

9 months agomount-util: introduce umountat_detach_verbose()
Lennart Poettering [Thu, 16 Jan 2025 09:17:44 +0000 (10:17 +0100)] 
mount-util: introduce umountat_detach_verbose()

This new helper allows unmounting paths by fd.

9 months agosbsign: Make sure output file mode respects umask 36083/head
Daan De Meyer [Sun, 19 Jan 2025 21:48:21 +0000 (22:48 +0100)] 
sbsign: Make sure output file mode respects umask

9 months agosbsign: Make two debug logs into error logs
Daan De Meyer [Mon, 20 Jan 2025 08:01:37 +0000 (09:01 +0100)] 
sbsign: Make two debug logs into error logs

9 months agoukify: print debug/progress messages to stderr 36081/head
Luca Boccassi [Sun, 19 Jan 2025 15:42:47 +0000 (15:42 +0000)] 
ukify: print debug/progress messages to stderr

Otherwise json will be interleaved with plain text messages

9 months agoukify: pass through --json to systemd-measure
Luca Boccassi [Sun, 19 Jan 2025 15:43:14 +0000 (15:43 +0000)] 
ukify: pass through --json to systemd-measure

So that --measure --json prints usable json output

9 months agolinter: run ruff format --diff so that the needed changes are actually printed
Luca Boccassi [Sun, 19 Jan 2025 15:58:47 +0000 (15:58 +0000)] 
linter: run ruff format --diff so that the needed changes are actually printed

9 months agoudev-varlink: add io.systemd.service.GetEnvironment 36080/head
Yu Watanabe [Sun, 19 Jan 2025 15:08:07 +0000 (00:08 +0900)] 
udev-varlink: add io.systemd.service.GetEnvironment

There is no reason to not support the method in udevd.

Follow-up for c8127075ae22ad0f64d3072f400818f6e1a9ab48.

9 months agotree-wide: rely on sd_varlink_dispatch() for validating zero-argument method calls...
Yu Watanabe [Sun, 19 Jan 2025 15:04:01 +0000 (00:04 +0900)] 
tree-wide: rely on sd_varlink_dispatch() for validating zero-argument method calls, too

Follow-ups for a7cc7038ac06d2c02cbaa5a749aa47b4f7cbe786.

9 months agoudev,network: drop unnecessary check for result of sd_listen_fds_with_names() 36030/head
Yu Watanabe [Wed, 15 Jan 2025 20:27:34 +0000 (05:27 +0900)] 
udev,network: drop unnecessary check for result of sd_listen_fds_with_names()

9 months agoudev-manager: rework initialization of device monitor
Yu Watanabe [Wed, 15 Jan 2025 19:47:20 +0000 (04:47 +0900)] 
udev-manager: rework initialization of device monitor

Let's determine the socket for device monitor based on its name.

9 months agoudev-ctrl: use -EBADF for invalid file descriptor
Yu Watanabe [Wed, 15 Jan 2025 20:13:57 +0000 (05:13 +0900)] 
udev-ctrl: use -EBADF for invalid file descriptor

9 months agoudev: split out legacy control socket handling to udev-manager-ctrl.c
Yu Watanabe [Wed, 15 Jan 2025 20:07:41 +0000 (05:07 +0900)] 
udev: split out legacy control socket handling to udev-manager-ctrl.c

Mostly no functional change, except for that now the socket for device
monitor is determined by its name.

9 months agocapability-util: rename output argument of capability_gain_cap_setpcap()
Yu Watanabe [Sat, 18 Jan 2025 22:37:39 +0000 (07:37 +0900)] 
capability-util: rename output argument of capability_gain_cap_setpcap()

9 months agocore: use usec_add() at one more place
Yu Watanabe [Sun, 19 Jan 2025 02:55:54 +0000 (11:55 +0900)] 
core: use usec_add() at one more place

Follow-up for 8af1b296cb2cec8ddbb2cb47f4194269eb6cee2b.
Fixes CID#1590317.

9 months agoTweaks to generic "io.systemd.service" Varlink interface, and hook it up in all long...
Yu Watanabe [Sun, 19 Jan 2025 02:54:10 +0000 (11:54 +0900)] 
Tweaks to generic "io.systemd.service" Varlink interface, and hook it up in all long-running Varlink daemons (#35914)

9 months agopid1,nspawn: enable usrquota on /tmp/ + /dev/shm/ (#36036)
Yu Watanabe [Sun, 19 Jan 2025 02:51:54 +0000 (11:51 +0900)] 
pid1,nspawn: enable usrquota on /tmp/ + /dev/shm/ (#36036)

Split out of #36010.

This simply enables the "usrquota" mount option on the two dirs if they
are backed by tmpfs.

#36010 contains a test that actually verifies that the mount option does
its thing.

9 months agotree-wide: coding style fixlets done by coccinelle (#36074)
Yu Watanabe [Sun, 19 Jan 2025 02:51:12 +0000 (11:51 +0900)] 
tree-wide: coding style fixlets done by coccinelle (#36074)

9 months agoman/systemd.special: Add suspend-then-hibernate.target to sleep.target documentation
Hendrik Wolff [Fri, 17 Jan 2025 16:59:08 +0000 (17:59 +0100)] 
man/systemd.special: Add suspend-then-hibernate.target to sleep.target documentation

9 months agotree-wide: coding style fixlets done by coccinelle 36074/head
Yu Watanabe [Sat, 18 Jan 2025 23:28:14 +0000 (08:28 +0900)] 
tree-wide: coding style fixlets done by coccinelle

9 months agococcinelle: add .gitignore for cache files
Yu Watanabe [Sat, 18 Jan 2025 23:25:56 +0000 (08:25 +0900)] 
coccinelle: add .gitignore for cache files

9 months agotree-wide: use log_level_is_valid() more 35914/head
Lennart Poettering [Tue, 7 Jan 2025 22:44:41 +0000 (23:44 +0100)] 
tree-wide: use log_level_is_valid() more

9 months agotest: add superficial test for generic per-service varlink API
Lennart Poettering [Tue, 7 Jan 2025 22:37:31 +0000 (23:37 +0100)] 
test: add superficial test for generic per-service varlink API

9 months agotree-wide: implement generic io.systemd.service Varlink interface in all long-running...
Lennart Poettering [Tue, 7 Jan 2025 14:21:53 +0000 (15:21 +0100)] 
tree-wide: implement generic io.systemd.service Varlink interface in all long-running services

Given we have the generic interface, let's hook it up everywhere.

This doesnt bother with the Reload() call usually, since that's more
involved, but hooks up the other relevant functions where applicable.

9 months agovarlink: add generic GetEnvironment() call to the Varlink "service" interface
Lennart Poettering [Tue, 7 Jan 2025 14:23:28 +0000 (15:23 +0100)] 
varlink: add generic GetEnvironment() call to the Varlink "service" interface

It's just so useful being able to retrieve the current env block from
our services. Add a concept for that. It's really simple, and dumb.

In many ways it's like /proc/$PID/environ, but shows the actual
environ[] array visible to the app, not just some memory that was
originally used for the env block passed in, but might have been rearranged.