1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00
Commit Graph

74815 Commits

Author SHA1 Message Date
Lennart Poettering
fb974ac485 efi: introduce PeSectionVector structure, and use it for referencing PE sections 2024-06-26 17:09:44 +02:00
Lennart Poettering
9e63e28aa6 pe: use more correct section name comparison function
we should only compare up to 8 chars
2024-06-26 17:09:44 +02:00
Lennart Poettering
bacc2ed0d5 pe: tighten validity checks of DOS and PE headers
Let's make sure we validate that the DOS/PE header offsets are actually
reasonable, and do not cause overflows when added to the base addresses.

(This shouldn're really be a problem URL, since the DOS header offset is
16bit only, but let's be extra careful with this)
2024-06-26 17:09:44 +02:00
Lennart Poettering
4a47959721 pe: be more careful when loading PE section list into memory
Let's put a limit on how much memory we'll allocate for the section. And
let's add a safety overflow check.

(This is more a theoretic than a real problem, since on all PE archs
NumberOfSections is 16bit only.)
2024-06-26 17:09:44 +02:00
Lennart Poettering
9573ab8f5a util: make file_read() 64bit offset safe
File offsets in UEFI are 64bit on all archs, hence let's use that typo
too, and not create artificial confusion around types.
2024-06-26 17:09:44 +02:00
Luca Boccassi
582718d959 mkosi: switch opensuse to devel branch
The factory branch seems to have been reset to 9 years ago, switch
to devel
2024-06-26 16:02:13 +01:00
Luca Boccassi
efd5314c50 mkosi: use new standalone-shutdown package for debian's exitrd 2024-06-26 16:02:13 +01:00
Mike Yuan
6343d2ea50
man/capsule@.service: the capsule user is prefixed with "c-" rather than "p_" 2024-06-26 16:47:48 +02:00
Luca Boccassi
ea6376d17f mkosi: bump to latest commit 2024-06-26 15:47:13 +01:00
Carlo Teubner
6733d691bb man/capsule@.service.xml: fix typo 2024-06-26 16:45:42 +02:00
Lennart Poettering
ba694646ea iovec-util: make "struct iovec" and some helpers also available in EFI mode
The construct is a POSIX invention, but it's just so useful, let's also
define it in EFI mode, so that we can use similar constructs in EFI mode
and userspace.
2024-06-26 16:01:35 +02:00
Lennart Poettering
515e1e6d35 macro: move PTR_TO_SIZE() macros to fundamental 2024-06-26 16:01:20 +02:00
Lennart Poettering
ba81c365f8 macro: also move FOREACH_ARRAY()/FOREACH_ELEMENT() to fundamental
This is also very useful in EFI code.
2024-06-26 16:01:06 +02:00
Lennart Poettering
72b1809bbc macro: move sizeof_field() macro into src/fundamental/
Let's make this macro available for our EFI code too.
2024-06-26 16:00:43 +02:00
Daan De Meyer
17ef81a764 docs: Add section to HACKING.md on distribution packages 2024-06-26 15:56:41 +02:00
Zbigniew Jędrzejewski-Szmek
2e4596a017 polkit: allow non-local users to block sleep and shutdown
We already had 'auth_admin_keep' for org.freedesktop.login1.reboot and similar
actions. If a user is allowed to perform an action, I think they should be
allowed to _block_ the same action. Guarding this by auth_admin follows the
general principle of not allowing fully unprivileged users to have too much say
over the machine.
2024-06-26 15:04:06 +02:00
Zbigniew Jędrzejewski-Szmek
a87b7aa1a1 inhibit: add --no-ask-password option and allow interactive polkit auth
It seems entirely reasonable to make a policy which e.g. allows block operations
for interactive users after authentication. The tool should support this, so that
more complicated local policies can be used.

Related to https://github.com/systemd/systemd/pull/30307.
2024-06-26 15:04:06 +02:00
Zbigniew Jędrzejewski-Szmek
a8c3ed5f13 Rename spawn-ask-password-agent.c to just ask-password-agent.c
The functions in the file were *not* using the spawn prefix,
and the prefix seems completely unnecessary.
2024-06-26 15:04:06 +02:00
Zbigniew Jędrzejewski-Szmek
1b919ca4db Rename spawn-polkit-agent.c to just polkit-agent.c
The functions in the file were *not* using the spawn prefix,
and the prefix seems completely unnecessary.
2024-06-26 15:04:06 +02:00
Matthias Lisin
999a661d1e
man: Add %q specifier to repart.d, sysusers.d 2024-06-26 04:18:14 +02:00
Matthias Lisin
282bda46f1
tmpfiles: use common macro for a set of specifiers
This adds %q, %A and %M specifiers to tmpfiles:
- %A and %M were previously added to tmpfiles.d man page, but not to specifier_table
- %q is added via COMMON_SYSTEM_SPECIFIERS
2024-06-26 04:18:14 +02:00
Mike Yuan
6320946411 import-generator: open up NotifyAccess for varlinkctl
So that it can report errors through VARLINKERROR=.
2024-06-25 23:00:26 +02:00
Daan De Meyer
b6a9ad2c62 mkosi: update fedora commit reference
* 8153d9b0f9 Revert "Remove tmpfiles snippet for /home and /srv"
* a76669ee22 Remove tmpfiles snippet for /home and /srv
* b3e1d52cb4 Soft-disable tmpfiles --purge until a good use case comes up
* 4a29ab3f3b Version 256.1
* ebf352d292 disable auto-features when bootstrapping
* 1ae0516ae7 Version 256
* b32641170e Restore patch to drop varlink method call
* 421f0041b3 Version 256~rc4
* 65d9b49791 Fix typo
* c56891fb68 Drop sysusers.d/basic.conf
* 69472997b9 Renumber sources and make order more consistent
2024-06-25 18:31:59 +02:00
Daan De Meyer
0d40269e5a mkosi: update debian commit reference
* 3b4368d4b8 d/not-installed: fix shutdown.standalone path
* 2de05155e8 Update changelog for 256.1-2 release
* cd98bcef06 autopkgtest: add dependency on libcryptsetup-dev in unit-tests suite
* e220ce22f1 Bump breaks/replaces to conflicts for DEP17
2024-06-25 18:30:41 +02:00
Luca Boccassi
4d2a86936a
Merge pull request #33451 from yuwata/core-exec-use-write
core: use write() instead of send()
2024-06-25 14:44:21 +02:00
Luca Boccassi
a016c8b67f
Merge pull request #33450 from yuwata/network-ndisc-do-not-override-static-routes
network/NDisc: do not override static routes
2024-06-25 14:40:06 +02:00
Lennart Poettering
7f1c31829b
Merge pull request #33003 from poettering/repart-progress
repart: draw progress bar during CopyBlocks= operation and other tweaks
2024-06-25 14:08:04 +02:00
Lennart Poettering
a34930cee2
Merge pull request #33078 from poettering/import-generator
importd: add import generator
2024-06-25 14:07:46 +02:00
Yu Watanabe
a0b7cae551 network/ndisc: fix spurious log messages
- Fix swapped arguments:

Before:
veth99: Prefix 'in deny list' is 2002:da8:1::/64, ignoring
After:
veth99: Prefix '2002:da8:1::/64' is in deny list, ignoring.

- Drop unnecessary DEBUG_LOGGING.
2024-06-25 12:20:19 +02:00
Luca Boccassi
59d4970a55 mkosi: add support for TEST_SAVE_JOURNAL to integration test wrapper
Same variable and values as supported by the shell suite
2024-06-25 12:16:59 +02:00
Lennart Poettering
9a9cc27761 ci: add small test case for /dev/urandom as source for CopyBlocks= 2024-06-25 10:24:47 +02:00
Lennart Poettering
add090ea82 repart: show progress bar when initializing partition via CopyBlocks=
This might take a while, hence make it pretty.
2024-06-25 10:05:07 +02:00
Lennart Poettering
468d09c319 repart: allow reading from char device for CopyBlocks=
Sometimes it is useful to allow initializing a partition with randomized
data, hence allow reading from a char device as source for CopyBlocks=
2024-06-25 10:05:07 +02:00
Lennart Poettering
ad25ede488 repart: make prefix argument to clear_progress_bar() optional
In this case, let's try to override the whole line, not just the first
few chars.
2024-06-25 10:05:07 +02:00
Lennart Poettering
eac0cbed8c update TODO 2024-06-25 09:57:42 +02:00
Lennart Poettering
d7afdf36ae ci: add test for importd varlink interface + import generator 2024-06-25 09:57:42 +02:00
Lennart Poettering
5f87b035fa import: add generator that synthesizes download jobs from kernel cmdline 2024-06-25 09:57:42 +02:00
Lennart Poettering
f596658811 importd: allow activation in early boot, and make it socket activatable
Previously, importd was only accessible via D-Bus, which required it to
be a late boot service. Now that we have Varlink we can rearrange things
to become early-boot activated, just after the image directories are
mounted.

This will later allow us to have generator that auto-downloads images on
boot.
2024-06-25 09:57:42 +02:00
Lennart Poettering
17a6043a14 importd: add simple varlink API
For now, let's just support Pull() and ListTransfers(), but this is just
a start.
2024-06-25 09:57:42 +02:00
Lennart Poettering
71613cd59a import: add generic enum for choosing between tar + raw downloads 2024-06-25 09:49:26 +02:00
Lennart Poettering
05f47839e1 varlink: add varlink_many_*() helpers that send messages to a set of connections at once
If we have a Varlink interface that allows man subscribers to the same
source of events we typically want to notify all of them at once with
the same message.

Let's add some helpers for this purpose: varlink_many_*() can be used to
send messages, similar to the corresponding varlink_*() calls, but they
take a Set of Varlink objects and we issue the operation on every
connection once.

This ports over one existing case where this is beneficial, but the main
user for this is supposed to be importd later.
2024-06-25 09:49:26 +02:00
Lennart Poettering
953bddee2f
Merge pull request #33461 from poettering/boot-measured-flag-rework
stub: rework how we combine the "measured" flags in sd-stub
2024-06-25 09:48:38 +02:00
Mantas Mikulėnas
86295cb60e run: move condition inside set_window_title() 2024-06-25 10:39:15 +03:00
Mantas Mikulėnas
0bdaa99827 nspawn, vmspawn: honor the new window title switch 2024-06-25 10:39:15 +03:00
Mantas Mikulėnas
27a2513013 run: add environment variable to prevent the setting of terminal title
This goes together with the existing SYSTEMD_TINT_BACKGROUND.

Closes https://github.com/systemd/systemd/issues/33301
2024-06-25 10:39:15 +03:00
Luca Boccassi
11a66a95ec
Merge pull request #33454 from YHNdnzj/user-service-working-dir-relax
core: verify WorkingDirectory= is outside of API VFS only under mount namespacing
2024-06-25 00:48:37 +02:00
Lennart Poettering
2cadbc21ae stub: fix reporting of dtb measurement
Let's properly return the measurement flag tristate, rather than a
boolean. Otherwise we'll mistake "nothing to measure" as "not measured",
which are two different things, and means we'll miscombine the flag
later, claiming to userspace that we measured no dtb data even if there
was.
2024-06-24 22:43:45 +02:00
Lennart Poettering
d0c441f99e stub: unify how we combine 'measured' flags
We have the same non-trivial ternary op expression at various places,
let's unify it in one call, to make this easier to read and remove
duplication.
2024-06-24 22:43:45 +02:00
Lennart Poettering
ff8d08ab4e uefi: drop redundant local variable 2024-06-24 22:43:45 +02:00
Lennart Poettering
95340b33a4 uefi: drop ill-placed empty line
Let's not place empty lines between function calls and their immediate
error handling.
2024-06-24 22:38:24 +02:00