Commit Graph
75550 Commits
Author SHA1 Message Date
Michal Sekletar 68511cebe5 coredump: generate properly symbolized stacktrace for containerized processes 2024-08-06 18:32:42 +02:00
Nick Rosbrook 18a8f03e51 sysusers: check if requested group name matches user name in queue
When creating a user, check if the requested group name matches a user
name in the queue. If that matched user name is also going to be a group
name, then use it for the new user too. In other words, allow the
following:

 u foo -
 u bar -:foo

when both foo and bar are new users.

Fixes #33547
2024-08-06 13:02:58 +02:00
Daan De Meyer 92d885d870 Merge pull request #33942 from yuwata/udevadm-info-attribute-walk-json
udevadm-info: support json output for --attribute-walk
2024-08-06 10:23:45 +02:00
Yu Watanabe 5a5a7093b8 Merge pull request #33933 from yuwata/systemctl-bus-transport-and-runtime-scope
systemctl: fix bus transport and runtime scope handling
2024-08-06 09:12:28 +09:00
Yu Watanabe c243302ee0 Merge pull request #33941 from yuwata/network-dhcp-pd-route-type
network/dhcp-pd: introduce UnassignedSubnetPolicy= to customize type of 'catch-all' route
2024-08-06 09:11:54 +09:00
Yu Watanabe 1056457d11 systemctl: gracefully adjust bus transport and runtime scope when --boot-loader-entry=help
This fixes the following assertion:
===
SYSTEMD_LOG_LEVEL=debug systemctl --user -H foo --boot-loader-entry=help
Assertion 'transport != BUS_TRANSPORT_REMOTE || runtime_scope == RUNTIME_SCOPE_SYSTEM' failed at src/shared/bus-util.c:284, function bus_connect_transport(). Ignoring.
Failed to connect to bus: Operation not supported
===

Fixes a bug introduced by 97af80c5a7.
Fixes #33661.
Fixes oss-fuzz#70153.
2024-08-06 05:33:25 +09:00
Yu Watanabe d133508493 test-network: add test case for UnassignedSubnetPolicy= 2024-08-06 05:24:20 +09:00
Yu Watanabe a61869d4a5 network/dhcp-pd: allow to customize route type for delegated prefix
Closes #33929.
2024-08-06 05:24:16 +09:00
Yu Watanabe 67ea8a4c0e udevadm-info: support json output for --attribute-walk
Closes #33852.
2024-08-06 05:22:10 +09:00
Arnaud Patard e7a93e7521 src/pcrlock/pcrlock.c: Handle empty pcrlock.d directories
Running the following commands:

  # mkdir -p /var/lib/pcrlock.d/123-empty.pcrlock.d
  # /usr/lib/systemd/systemd-pcrlock predict --pcr=1+2+3+4+5+16

Will result in:

...
Floating point exception

Running the following commands:
  # mkdir -p /var/lib/pcrlock.d/123-empty.pcrlock.d
  # /usr/lib/systemd/systemd-pcrlock make-policy --pcr=1+2+3+4+5+16

Will result to this (partial) log:
...
Predicted future PCRs in 133us.
[]
...
Written policy digest 0000000000000000000000000000000000000000000000000000000000000000 to NV index 0x1921da6
...

So, add missing checks to handle gracefully cases where there's no variant
inside the component.

Signed-off-by: Arnaud Patard <arnaud.patard@collabora.com>
2024-08-05 18:32:26 +01:00
Luca Boccassi 1e0ef01439 logind: add PreparingForShutdownWithMetadata property
The PrepareForShutdownWithMetadata signal was added via
e4aab5cf1a but a corresponding property
was not. A property has to be a single type, so the bool needs to be
one of the key/value pairs as 'ba{sv}' is not a valid property.
2024-08-05 19:30:15 +02:00
Daan De Meyer bec6b53f3c Merge pull request #33912 from DaanDeMeyer/mkosi
test: Add a way to quickly iterate on an integration test
2024-08-05 16:21:48 +02:00
Daan De Meyer 857e4528f5 mkosi: Prevent busybox from getting pulled into opensuse images
OpenSUSE's busybox has a bunch of Provides for basic tools that cause
it to get pulled into images unless the corresponding tool is explicitly
installed so let's add explicit tools to make sure we don't get busybox.
2024-08-05 16:20:55 +02:00
rajmohan r 1592d2f900 systemd-analyze: Add svg scaling options
+ Scale the x-axis of the resulting plot by a factor (default 1.0)
+ Add activation timestamps to each bar

Signed-off-by: rajmohan r <rajmohan.r@kpit.com>
2024-08-05 15:23:44 +02:00
Daan De Meyer af153e36ae test: Add a way to quickly iterate on an integration test
Rebuilding the integration test every time is very slow. Let's
introduce a way to iterate on an integration test without rebuilding
the image every time. By making a btrfs snapshot before we run the
integration test, we can then systemctl soft-reboot after running
the test to restore the rootfs to a pristine state before running
the test again.

As /run/nextroot will get nuked on reboot or soft-reboot, we introduce
a tmpfiles snippet to make sure it is recreated every (soft-)reboot
and adapt the existing tests to deal with this new symlink.
2024-08-05 15:13:38 +02:00
Daan De Meyer edc6592e53 mkosi: Switch back to btrfs
The next commit will introduce a way to iterate on integration
tests which depends on btrfs specific features.

We leave CentOS on ext4 as its kernel does not support btrfs.
2024-08-05 15:00:24 +02:00
Daan De Meyer ea696c5f53 mkosi: Enable Autologin= again on Debian
Debian uses /usr/bin/login from the shadow package instead of util-linux
which doesn't support credentials. Let's enable autologin the old
fashioned way for now.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833256
2024-08-05 15:00:24 +02:00
Daan De Meyer dd1c01b20f test: Implement TEST_SHELL for mkosi based test runner
TEST_SHELL can be used to get a shell in the integration test
environment without actually immediately starting the test.
2024-08-05 15:00:24 +02:00
Daan De Meyer 33f400a9e0 test: Rename INTERACTIVE_DEBUG to TEST_SHELL 2024-08-05 15:00:24 +02:00
Daan De Meyer 5f5b6fa901 docs: Update upgrade commands in HACKING.md
- Add the required options to make the package managers non interactive
- Use apt-get instead of apt
- Remove --reinstall from apt-get command so we only install newer packages
- Add --needed to pacman command so we only install newer packages
2024-08-05 15:00:24 +02:00
Daan De Meyer 63bafef12b mkosi: Drop locale tmpfiles snippet
Not required anymore as we don't do /usr only anymore and the symlink
will be created by the debian systemd package.
2024-08-05 15:00:24 +02:00
Luca Boccassi 526f767313 Merge pull request #33939 from yuwata/resolve-varlink
resolve: type field in result of ResolveService may be NULL
2024-08-05 11:37:39 +02:00
Luca Boccassi 2e59aa50da Merge pull request #33944 from yuwata/journal-max-retention-sec
journal: do not rotate journal when MaxRetentionSec= is set
2024-08-05 11:28:48 +02:00
Yu Watanabe b55027efe4 journal: set flushed flag even if we fail to open runtime journals
As at this stage, a persistent journal file has been already opened, and
saved seqnum has been reset, and any later journal entries will be stored
to the file. Hence we should not open the runtime journal file by
server_system_journal_open() again.
2024-08-05 11:27:20 +02:00
Yu Watanabe 0d113f8e70 journal: comment the default value in journald.conf 2024-08-05 15:33:32 +09:00
Yu Watanabe b63c18db03 journal: do not rotate journal when MaxRetentionSec= is set
The setting is about vacuuming archived journal files. It is not
necessary to rotate the current journal. Note, journal file rotation is
controlled by MaxFileSec=.

Fixes #31315.
2024-08-05 15:33:32 +09:00
Yu Watanabe ce12bd19a0 udevadm-info: trival cleanups
- drop trailing an empty line,
- use FOREACH_ARRAY() macro,
- add short comment for boolean argument.
2024-08-05 12:27:10 +09:00
Yu Watanabe b48ab08732 resolve: refuse invalid service without type field
Fixes Fixes #33935.
2024-08-05 10:47:11 +09:00
Yu Watanabe cc194dddc2 resolve: voidify unused result of function call 2024-08-05 10:47:11 +09:00
Yu Watanabe 0c7bb54238 network: split out core logic route_type_is_reject()
Preparation for later change.
2024-08-05 09:15:15 +09:00
Marc Reisner 2d00f4c306 sleep: add HibernateOnACPower= option (#33846)
* Add HibernateOnACPower= systemd-sleep configuration option
2024-08-05 00:01:34 +01:00
Luca Boccassi bd5b586ad0 Merge pull request #33918 from YHNdnzj/exec-cred-cleanup
core/exec-credential: several cleanups
2024-08-04 14:20:27 +02:00
Luca Boccassi fcfec5b28b Merge pull request #33930 from yuwata/update-syscall-tables-and-linux-headers
Update syscall tables and linux headers
2024-08-04 13:31:47 +02:00
Yu Watanabe ab9af70edb sd-event: change error code -EINVAL -> -EIO
EINVAL should be used when a function is called with an invalid
argument. Here, the signal is not a function argument.

Follow-up for 7a64c5f23e.
2024-08-04 11:33:23 +02:00
Yu Watanabe 2e308032f4 basic/linux: update kernel headers from v6.11-rc1 2024-08-04 14:55:32 +09:00
Yu Watanabe d361ea5f30 seccomp: list fstatat, newfstat, and llseek 2024-08-04 14:55:23 +09:00
Yu Watanabe da24dacf34 syscall-list: update syscall tables
This adds fstatat (and its friends), llseek, and uretprobe.
2024-08-04 14:47:30 +09:00
Yu Watanabe bcf982223c systemctl: refuse --capsule=foo with --system
Fixes the following assertion:
===
systemctl --capsule=hoge --system reboot
Assertion 'runtime_scope == RUNTIME_SCOPE_USER' failed at src/shared/bus-util.c:479, function bus_connect_transport(). Aborting.
Aborted (core dumped)
===

Follow-up for 56cb74c3cd.
2024-08-04 14:21:32 +09:00
Mike Yuan 09001a2c64 core/exec-credential: do not use unlink_and_free for relative path under dfd 2024-08-04 06:51:52 +02:00
Mike Yuan 4c00458e99 core/exec-credential: emit correct error on invalid cred source
The (!source && !search_path) branch is effectively not reached,
but rather confusing. Let's return -EINVAL properly.
2024-08-04 06:51:28 +02:00
Mike Yuan 85b265c964 core/exec-credential: use struct load_cred_args everywhere
We currently duplicate the same set of params for every funcs.
Let's unify this, and make things more manageable.
2024-08-04 06:51:28 +02:00
Mike Yuan 43705cceb8 core/exec-credential: use maybe_decrypt_and_write_credential() for SetCred= too 2024-08-04 06:51:28 +02:00
Mike Yuan ef0d7b0ec9 core/exec-credential: drop misleading comment regarding EEXIST
Follow-up for 2c2ed3272b

As explained in the referenced commit, we shall never get EEXIST
in the first place.
2024-08-04 06:51:28 +02:00
Mike Yuan 6a6e8b79cc core/exec-credential: trivial coding style cleanup 2024-08-04 06:51:28 +02:00
Mike Yuan 9db676d6bf core/dbus-execute: normalize "rename" arg properly
Follow-up for 40dd2a1c24

Addresses https://github.com/systemd/systemd/pull/33916#discussion_r1702616229
2024-08-04 06:51:25 +02:00
Marin Kresic f4911e6bda po: Translated using Weblate (Croatian)
Currently translated at 82.8% (193 of 233 strings)

Co-authored-by: Marin Kresic <marinjurekresic@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/hr/
Translation: systemd/main
2024-08-04 13:28:56 +09:00
Dimitrys Meliates f4e5d6a050 po: Translated using Weblate (Greek)
Currently translated at 37.7% (88 of 233 strings)

Co-authored-by: Dimitrys Meliates <demetresmeliates+fedora@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/el/
Translation: systemd/main
2024-08-04 13:28:56 +09:00
Luca Boccassi b75c13731e base-filesystem: do not attempt to create a /lib64 -> /usr/lib/<tuple> symlink
In multi-arch distributions (debian and derivatives) multiarch tuples under
/usr/lib are used, such as /usr/lib/x86_64-linux-gnu/ but the /lib64 symlink
should never point there, it should always point to /usr/lib64, as that's
how they are set up by distribution-specific tools.

https://packages.debian.org/bookworm/amd64/libc6-i386/filelist
https://packages.debian.org/bookworm/mipsel/libc6-mips64/filelist
https://salsa.debian.org/md/usrmerge/-/blob/master/convert-usrmerge?ref_type=heads#L295
https://salsa.debian.org/md/usrmerge/-/blob/master/convert-usrmerge?ref_type=heads#L517
http://bugs.debian.org/1076491

Fixes https://github.com/systemd/systemd/issues/33919
2024-08-04 10:03:55 +09:00
Daan De Meyer ad723ca3e5 meson: Use -fstrict-flex-arrays=3
Let's explicitly pass the value to -fstrict-flex-arrays. This does
not change behavior but it does (selfishly) make my error not bug
out with an error saying -fstrict-flex-arrays does not exist.
2024-08-04 09:55:45 +09:00
Nova840 1392b9fad2 hwdb: fix auto rotate on Asus Q551LB (#33921) 2024-08-04 09:38:40 +09:00