Commit Graph

81819 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
acf3bdf813 man/systemd.network: reword description of MulticastIGMPVersion= 2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek
f56d9b82b1 man/systemd.timer: change to positive wording 2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek
de8d2894b8 man: reword descriptions of numerical fields
A "string" is a concept in C. In a text-based API, this is implicit, especially
if we say that something was "formatted". So change occurences of "decimal
string" to just "decimal". Similarly, "numerics" is unclear, say "digits".

Also, a "timestamp is in a clock" just sounds wrong. Reword those sentences.
2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek
948369983c man/systemd-resolved: update description of routing 2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek
8bfdba3cb1 man/systemd-analyze: rewrite "Exit status" section 2025-05-28 15:34:47 +02:00
Zbigniew Jędrzejewski-Szmek
3a23e96b67 man/pam_systemd: use <constant> consistently
For some reason, <constant> and <literal> were used interchangeably.
2025-05-28 15:33:39 +02:00
Zbigniew Jędrzejewski-Szmek
001ae86a73 man: introduce openssl as man page provider and use it for ukify.1 2025-05-28 15:33:39 +02:00
Yu Watanabe
d117687ab3 sd-bus: rename internal structs and enums
This renames e.g. struct bus_body_part -> BusMessageBodyPart to
follow our usual coding style. Also, several struct and enum
declarations are moved to relevant headers.
Also, this introduces bus-forward.h.
2025-05-28 09:52:28 +02:00
Eisuke Kawashima
39c3638445 zsh-completion: improve systemd-run
- add missed options
- improve completion for property
2025-05-28 09:50:53 +02:00
Yu Watanabe
4e36b79a84 cgroup-util: drop CGROUP_MASK_EXTEND_JOINED; move CGROUP_CPU_SHARES/BLKIO* to nspawn-oci (#37639) 2025-05-28 09:50:05 +09:00
Yu Watanabe
816a852324 core/exec-invoke: don't set $TMPDIR if sandboxing is disabled (#37637)
Follow-ups for #37271.
2025-05-28 09:46:06 +09:00
Mike Yuan
cd3435fc0b cgroup-util: drop CGROUP_MASK_EXTEND_JOINED
Also kill the "compat pair invalidation" logic in unit_invalidate_cgroup()
2025-05-28 00:53:24 +02:00
Mike Yuan
9e73d37512 cgroup-util: move CGROUP_CPU_SHARES/BLKIO* to nspawn-oci
These are only used for translation from OCI metadata
to cgroup v2 values.
2025-05-28 00:21:37 +02:00
Mike Yuan
d87f943596 bus-print-properties: drop *CPUShares formatter 2025-05-28 00:19:26 +02:00
Mike Yuan
c4f79e098b test-execute: add test case for PrivateTmp=disconnected + DefaultDependencies=no + sandboxing disabled via '+' prefix 2025-05-27 23:18:00 +02:00
Mike Yuan
8b0a0298b7 core/exec-invoke: don't set $TMPDIR if sandboxing is disabled
Follow-up for 6156bec7a4
2025-05-27 22:35:03 +02:00
Nick Rosbrook
c6b4f1c8f8 timedate: print better errors when systemd-timesyncd.service unavailable
If the error is a common bus error indicating the service is not
available, print a more user-friendly message indicating so.
2025-05-28 04:40:08 +09:00
Nick Rosbrook
906145d53f shared: add optional error parameter in bus_print_all_properties()
While here, remove the unused found_properties parameter.

This is preparation for another commit.
2025-05-28 04:40:08 +09:00
Yu Watanabe
ae6420c923 cgroup-util: minor cleanups (#37630) 2025-05-28 02:19:21 +09:00
Daan De Meyer
3366807bf2 mkosi: update mkosi commit reference to 5e739ef1ed02a4f3b6ae64e50a8ee186cbcb21c2 (#37632)
* 5e739ef1ed mkosi-initrd: Optionally match t64 suffix for tss2
libraries
*   ec70393077 Merge pull request https://github.com/systemd/mkosi/pull/3742 from DaanDeMeyer/man
|\
| * 94cc136fbe mkosi-tools: Install man tool and pages as part of misc
profile
| * eda2ed533d Enforce C.UTF-8 locale for all commands we run
* | 9821e9a3e3 sandbox: Support using mkosi-sandbox as a library
* | 4145382edf Serialize pid in state and check if still exists on load
* |   3d119cba07 Merge pull request https://github.com/systemd/mkosi/pull/3736 from DaanDeMeyer/rpm-gpgkey
|\ \
| |/
|/|
| * 0a5d87b7bb Only pick up /etc/pki/tls and /etc/pki/ca-trust as
certificate dirs
| * c30eee187f Look for rpm gpg keys from inside the sandbox
|/
* ef2842dfea Fix version bump check if image version was passed on CLI
* 12b6251153 apt: Install apt sources if apt was installed via base tree
* a0b4e1af9a Make sure git doesn't fail when running as root
* 585a47705d repart: use --append-fstab=auto if available
* cec6ae1dda sandbox: handle case where dev node for tty doesn't exist
* a60dade823 initrd: shadow-utils removal is only necessary on old
Fedora
* ca11acbd5b Use SPDX identifier instead of file path for license in
pyproject.toml
* 4d031bc57d Revert license-files property
*   c80dd09008 Merge pull request https://github.com/systemd/mkosi/pull/3722 from behrmann/versiontweaks
|\
| * c76e5dc4bc make version test more readable
| * 90ba99dde1 version: add __repr__ to GenericVersion
|/
* dd794ec832 Fix licenses path in pyproject.toml
*   7eeb749840 Merge pull request https://github.com/systemd/mkosi/pull/3702 from aafeijoo-suse/initrd-kmp
|\
| * 565b905aa1 mkosi-initrd: handle symlinks under weak-updates
| * a83ccc10c7 mkosi-initrd: perform basic checks on the kernel dir
before calling mkosi
| * 73cad79c9e mkosi-initrd: --kernel-modules-include ->
--kernel-modules
* bac76904c3 build(deps): bump github/codeql-action from 3.28.13 to
3.28.16
* 44161624a2 Supress ssh unit generation if sshd is not present
* b8758dac28 Partially revert 640000a861e9cd9a3807e4158e110a098c74d078
* 6f11937dc6 Don't use default value if optional settings are set to
none
* 640000a861 Use a default tools tree by default if mkosi.tools.conf
exists
* 63d91cc285 mkosi: Override misconfigured gitconfig HTTP/HTTPS proxy
with ProxyUrl
* a859b5eb13 Make sure we create the default workspace directory as well
2025-05-27 17:31:48 +01:00
Luca Boccassi
f9a85b7490 test: fix test_qdisc_tbf regex with iproute2 v6.15
iproute2 v6.15 fixed some rounding errors in the reported stats:

https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=d947f365602b30657d1b797e7464000d0ab88d5a

so the current regex doesn't work anymore. Fix it to check for both
old and new values.

systemd-networkd-tests.py[523]: FAIL: test_qdisc_tbf (__main__.NetworkdTCTests.test_qdisc_tbf)
systemd-networkd-tests.py[523]: ----------------------------------------------------------------------
systemd-networkd-tests.py[523]: Traceback (most recent call last):
systemd-networkd-tests.py[523]:   File "/usr/lib/systemd/tests/testdata/test-network/systemd-networkd-tests.py", line 5402, in test_qdisc_tbf
systemd-networkd-tests.py[523]:     self.assertRegex(output, 'rate 1Gbit burst 5000b peakrate 100Gbit minburst 987500b lat 70(.0)?ms')
systemd-networkd-tests.py[523]:     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
systemd-networkd-tests.py[523]: AssertionError: Regex didn't match: 'rate 1Gbit burst 5000b peakrate 100Gbit minburst 987500b lat 70(.0)?ms' not found in 'qdisc tbf 35: root refcnt 2 rate 1Gbit burst 5000b peakrate 100Gbit minburst 999200b lat 70ms \nqdisc pfifo 37: parent 35: limit 100000p'
2025-05-27 17:24:47 +01:00
Yu Watanabe
b6278c1937 bpf-program: check if a trivial BPF program can be created and loaded
Re-introduce the check dropped by
ec3c5cfac7,
ad446c8ceb.

For some reasons, if we are running on LXC, even if bpf_program_supported()
returned true, but bpf_program_load_kernel() failed:
```
Attaching device control BPF program to cgroup /system.slice/test-bpf-devices-875b406d56ac7bc3.scope/186c411f6e991777 failed: Operation not permitted
src/test/test-bpf-devices.c:31: Assertion failed: Expected "r" to succeed, but got error: Operation not permitted
```
2025-05-27 17:24:33 +01:00
Jan Vaclav
a8a39e23bb in-addr-util: use s6_addr* macros everywhere
Currently, the code in in-addr-util.c uses a mix of accessing the
in6_u members directly, as well as using the s6_addr* macros.
Let's unify it so that the s6_addr macros are used everwhere.
2025-05-27 22:33:57 +09:00
Mike Yuan
a941822d1c cgroup-util: assert on attribute for cg_{get,set}_attribute()
It makes zero sense to ever perform IO operations on cgroup dirs.
2025-05-27 14:31:06 +02:00
Mike Yuan
606ef91a40 cgroup-util: make cg_get_attribute_as_bool() return 0/1 directly
As with getenv_bool() and getxattr_at_bool(), to match
our usual style.
2025-05-27 14:28:08 +02:00
Mike Yuan
7b4022bdb0 cgroup-util: rename cg_get_xattr_malloc -> cg_get_xattr
This is not a trivial wrapper around user-created-buffer-based
syscall, so do not use _malloc suffix. Most of our functions
return an internally allocated buffer and this one's not special.
2025-05-27 14:28:08 +02:00
Daan De Meyer
c5d7a2d000 basic,shared: mark eligible functions with _pure_/_const_ (#37623) 2025-05-27 14:24:30 +02:00
Zbigniew Jędrzejewski-Szmek
976295bf8b repart: Copy fs-verity status for CopyFiles= (#35401)
When populating a filesytem with CopyFiles=, we first copy the files to
a temporary directory. Make sure we use the (new) COPY_FS_VERITY flag
when doing that copy so that the `mkfs` that we invoke can see the files
with fs-verity enabled.

Closes #35352
2025-05-27 14:01:05 +02:00
Daan De Meyer
4793dbc56e core: introduce io.systemd.Unit.List (first PR) (#37432) 2025-05-27 12:42:11 +02:00
Lennart Poettering
5c5934c62d mountfsd: add ability to create dir owned by foreign UID range in unpriv $HOME (#37616) 2025-05-27 12:20:05 +02:00
Lennart Poettering
aa62b1ba58 Assorted systemd-machined fixes (#37622) 2025-05-27 12:19:46 +02:00
Lennart Poettering
8215935180 ci: add test case for io.systemd.MountFileSystem.MakeDirectory() and varlinkctl --push-fd= 2025-05-27 10:41:52 +02:00
Lennart Poettering
b4c2e2b970 varlinkctl: optionally push fds to server 2025-05-27 10:41:52 +02:00
Lennart Poettering
0261fe571b mountfsd: add call for creating a foreign UID owned dir in dir owned by caller
In order to fully support unpriv containers placed in directories owned
by the foreign UID range, below some unpriv user $HOME, we need to away
to actually create these hierarchies in the first place.

Let's add a method call for that. It takes a dir fd, then validates that
its ownership matches the client's identity, and then creates a subdir,
chown()ing it to the foreign UID range. It then returns an fd to the
result.

The result could then be passed to MountDirectory() in order to get a
mount which can then be populated by some code running in a dynamic
userns.
2025-05-27 10:41:52 +02:00
Lennart Poettering
cb062410ec sd-json: add json_dispatch_const_filename()
json_dispatch_const_filename() is to json_dispatch_filename() what json_dispatch_const_path() is to json_dispatch_path().
2025-05-27 10:37:11 +02:00
Lennart Poettering
48764e2e58 machine: fix log message, doesn't have to be scope unit, can by any 2025-05-27 10:27:37 +02:00
Lennart Poettering
ca02f658e0 machine: rework machine_gc()
Let's check the leader alive state, and let's log about dbus errors.
This mimics (but is not quite identical to) what we do these days in
logind for GC'ing user sessions.
2025-05-27 10:27:37 +02:00
Lennart Poettering
0c38bc6227 machine: shorten code 2025-05-27 10:23:36 +02:00
Lennart Poettering
ee5622f9f0 machine: as safety precaution also check parsed machine name 2025-05-27 10:23:36 +02:00
Lennart Poettering
6981e465a7 machine: also save/restore vsock CID properly 2025-05-27 10:23:36 +02:00
Lennart Poettering
320b370ab3 machine: modernizations of serializing/deserializing netif data 2025-05-27 10:23:36 +02:00
Lennart Poettering
20babd6038 machine: save/restore machine leader pidfdid 2025-05-27 10:23:36 +02:00
Lennart Poettering
4b9c918431 machine: use the correct escaping calls for machine metadata 2025-05-27 10:23:36 +02:00
Lennart Poettering
b8396f1102 machine: properly remove unit name symlink on removal 2025-05-27 10:23:36 +02:00
Lennart Poettering
a4dc3b16d9 machine: port machined state files to fopen_tmpfile_linkable()
Similar to the erlier commit for logind, switch to a more modern way to
write the state files.
2025-05-27 10:23:36 +02:00
Lennart Poettering
0c18c0deee machine: insist in a valid root directory 2025-05-27 10:23:36 +02:00
Lennart Poettering
98fc46f2a6 logind,machined: expose bus properties for leader PID fd ids, too 2025-05-27 10:23:36 +02:00
Ivan Kruglov
e3fee4519f core: break line after sd_json_buildo( in varlink-manager.c 2025-05-27 01:16:56 -07:00
Ivan Kruglov
dd14c3eab1 test: simple tests for io.systemd.Unit varlink interface 2025-05-27 01:16:56 -07:00
Ivan Kruglov
92fa38c99d test: quote entire path to socket in io.systemd.Manager tests 2025-05-27 01:16:56 -07:00