Lennart Poettering
5ff7046e61
ask-password: add varlink IPC interface and various other additions and fixes ( #35074 )
2025-01-02 18:21:35 +01:00
Lennart Poettering
ed8e7e2393
core/socket: several fixlets ( #35637 )
...
Fixes https://github.com/systemd/systemd/issues/35635
2025-01-02 18:20:48 +01:00
Luca Boccassi
0182958047
test: update README's Ubuntu CI section for mkosi changes
2025-01-02 17:04:30 +00:00
Luca Boccassi
021b51a72b
Two doc updates ( #35810 )
2025-01-02 16:04:00 +00:00
Lennart Poettering
3fbca0e23a
test: add CI test validating the new varlink interface and more
2025-01-02 16:39:33 +01:00
Lennart Poettering
7fd0ea6cf6
ask-password: add comment with well-known errors from ask_password_auto()
2025-01-02 16:39:30 +01:00
Lennart Poettering
066f6bfb62
ask-password: add Varlink API for querying passwords from the user
...
This turns systemd-ask-password into a small Varlink service, so that
there's an standard IPC way to ask for a password. It mostly directly
exposes the functionality of the Varlink service.
2025-01-02 16:39:05 +01:00
Lennart Poettering
d66894a7a5
ask-password-api: add new "hup_fd" field to AskPasswordReq
...
This new field allows specification of an fd on which the password
prompt logic will look for POLLHUP events for, and if seen will abort
the query.
The usecase for this is that when we query for a pw on behalf of a
Varlink client we can abort the query automatically if the client dies.
2025-01-02 16:38:44 +01:00
Lennart Poettering
c4a02a526d
ask-password-api: move timeout into AskPasswordRequest structure too
2025-01-02 16:38:25 +01:00
Lennart Poettering
72068d9d25
ask-password-api: move tty_fd into AskPasswordRequest structure, too
2025-01-02 16:38:12 +01:00
Lennart Poettering
4ff3689ad2
ask-password-api: move 'flag_file' from function parameter into AskPasswordRequest structure
2025-01-02 16:38:00 +01:00
Lennart Poettering
254649d576
ask-password-agent: send READY=1 when we established inotify watch
2025-01-02 16:37:57 +01:00
Lennart Poettering
49187cfc34
ask-password-agent: optionally read pw to reply from env var
2025-01-02 16:37:54 +01:00
Lennart Poettering
1a2e4b614e
pcrextend: split out varlink server setup into its own function
2025-01-02 16:37:52 +01:00
Lennart Poettering
107986a33e
sd-varlink: expose api to get input/output fd separately
2025-01-02 16:35:42 +01:00
Daan De Meyer
722e0ccf0e
docs: Update code coverage documentation
2025-01-02 16:25:19 +01:00
Daan De Meyer
8a65263650
docs: Use mkosi sandbox in test documentation as well
...
Same change as in HACKING.md, but for running the integration tests.
2025-01-02 16:17:53 +01:00
Yu Watanabe
66f379b63d
systemctl: certainly ignore ENOENT in checking inhibitors
...
Fixes a bug caused by 804874d26a .
Follow-up for 084f361b50 and
a1417e5563 .
Note, ERRNO_IS_NEG_DISCONNECT() includes ENONET rather than ENOENT...
So, ENOENT needs to be handled explicitly.
Fixes #35757 and #35806 .
2025-01-02 14:15:09 +00:00
Daan De Meyer
76d80cc343
mkosi: Allow disabling vcs-tag via environment variable
2025-01-02 14:54:19 +01:00
Luca Boccassi
f1f0230cf0
bash-completion/journalctl: list user units when --user is already specified ( #35799 )
...
Also, escape the current input before matching listed user units.
Fixes #35794 .
2025-01-02 11:20:31 +00:00
Mike Yuan
03ccee1939
errno-list: prefer strerrorname_np() as errno_to_name() provider
2025-01-02 12:01:53 +01:00
Yu Watanabe
bbe1d1bcb0
bash-completion/journalctl: also escape the current input of user unit
...
Follow-up for cec82cb943 .
2025-01-02 11:50:44 +09:00
Yu Watanabe
0578c26bd6
bash-completion/journalctl: list user units when --user is already specified
...
Follow-up for 52051dd84c .
Fixes #35794 .
2025-01-02 11:48:58 +09:00
richfifeg
89c4fe6c21
60-sensor.hwdb: Loosen model mask to include entire series
...
This sensor is the same for Asus's entire Q5##L series, so match accordingly.
Tested with my Q502LAB.
2025-01-02 09:22:42 +09:00
Ettore Atalan
0d080e35bd
po: Translated using Weblate (German)
...
Currently translated at 96.8% (249 of 257 strings)
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com >
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main
2025-01-01 11:55:42 +09:00
Mike Yuan
7c194bb93c
TEST-07-PID1: add test case for #35635
2024-12-31 00:22:53 +01:00
Mike Yuan
d8a2ed33fd
test: move test for MaxConnectionsPerSource= to TEST-07-PID1
...
Follow-up for 3456c89ac2
2024-12-31 00:22:53 +01:00
Mike Yuan
58a86a1504
core/socket: introduce intermediate SOCKET_START_OPEN state
...
Prior to this commit, if no Exec*= is defined for socket,
and the unit was in SOCKET_FAILED state, failure of socket_open_fds()
would induce state transition SOCKET_FAILED -> SOCKET_FAILED,
and OnFailure= deps get unexpectedly skipped. Let's introduce
an intermediate state, so that during unit start we enter
UNIT_ACTIVATING at least once.
Fixes #35635
2024-12-31 00:22:52 +01:00
Mike Yuan
80706c3269
core/socket: clean up usbffs handling
...
- Log about errors in socket_open_fds()
- Open parent dir fd and operate under it, instead of constructing paths
everywhere
- Replace scandir() with readdir_all()
2024-12-31 00:22:52 +01:00
Mike Yuan
90761f7f68
basic/recurse-dir: modernize readdir_all()
2024-12-30 23:52:19 +01:00
Mike Yuan
d1e3536d6b
core/socket: close fds also on SOCKET_CLEAN state
...
Follow-up for c968d76a38
We'd only transition to SOCKET_CLEAN state if previously
inactive (see socket_clean()), hence no fds shall be persisted
in this state.
2024-12-30 21:43:52 +01:00
Mike Yuan
240457204b
core/socket: use correct kill operation for SOCKET_STOP_PRE_SIGTERM
...
Follow-up for a232ebcc2c
2024-12-30 21:43:52 +01:00
Mike Yuan
2fbdfe0b0d
core/socket: trivial coding style cleanups
2024-12-30 21:43:52 +01:00
Mike Yuan
6767b7b3af
sysusers.d/basic: fix alignment
...
Follow-up for a4c0528f14
2024-12-30 21:43:51 +01:00
Luca Boccassi
1737bc0c1e
mkosi: switch to github mirror of openSUSE sources from build.opensuse.org ( #35789 )
...
The commit history of
[src.opensuse.org](https://src.opensuse.org/pool/systemd/src/branch/devel )
has been reset again to 2015 (both branches, factory and devel)... this
is unusable for now. I'd suggest switching to the github mirror of
code.opensuse.org, maintained since 2019 (at least github is not down
that often and the commit history does not change).
2024-12-30 18:42:29 +00:00
Antonio Alvarez Feijoo
07638ce2a4
mkosi: switch to github mirror of openSUSE sources from build.opensuse.org
...
The current src.opensuse.org is very unstable and commit hashes are reset (or
even removed) every now and then. While the official repo is not fixed, let's
move to a more stable source, the github mirror of code.opensuse.org, maintained
since 2019.
2024-12-30 17:39:16 +01:00
Antonio Alvarez Feijoo
8a6ad7c837
mkosi: add libopenssl devel package to openSUSE tools tree
...
Otherwise, the build fails with:
```
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /mnt/work/src/systemd/upstream-fork/main/build-mkosi
ninja: Entering directory `/mnt/work/src/systemd/upstream-fork/main/build-mkosi'
[463/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
FAILED: src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
cc -Isrc/shared/libsystemd-shared-258.a.p -Isrc/shared -I../src/shared -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-json -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-path -I../src/libsystemd/sd-resolve -I../src/libsystemd/sd-varlink -I/usr/include/blkid -I/usr/include/libmount -I/usr/include/p11-kit-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays=3 --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fPIC -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -fvisibility=default -MD -MQ src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -MF src/shared/libsystemd-shared-258.a.p/openssl-util.c.o.d -o src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -c ../src/shared/openssl-util.c
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_read’:
../src/shared/openssl-util.c:1395:65: error: implicit declaration of function ‘UI_method_get_ex_data’; did you mean ‘UI_method_get_reader’? [-Wimplicit-function-declaration]
1395 | AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
| ^~~~~~~~~~~~~~~~~~~~~
| UI_method_get_reader
../src/shared/openssl-util.c:1395:65: warning: nested extern declaration of ‘UI_method_get_ex_data’ [-Wnested-externs]
../src/shared/openssl-util.c:1395:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1395 | AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
| ^
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_new’:
../src/shared/openssl-util.c:1479:13: error: implicit declaration of function ‘UI_method_set_ex_data’; did you mean ‘UI_method_set_reader’? [-Wimplicit-function-declaration]
1479 | if (UI_method_set_ex_data(ui->method, 0, &ui->request) == 0)
| ^~~~~~~~~~~~~~~~~~~~~
| UI_method_set_reader
../src/shared/openssl-util.c:1479:13: warning: nested extern declaration of ‘UI_method_set_ex_data’ [-Wnested-externs]
[480/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/pkcs11-util.c.o
ninja: build stopped: subcommand failed.
```
2024-12-30 17:38:36 +01:00
Mike Yuan
25a306f6c4
Follow-ups for recent PRs plus modernizations prompted thereby ( #35760 )
...
Please backport the first commit to stable.
2024-12-30 16:35:59 +01:00
Antonio Alvarez Feijoo
37c2be73e7
mkosi: update openSUSE commit reference
...
Force-pushed as usual, now HEAD is v257.1.
2024-12-30 11:31:38 +00:00
Antonio Alvarez Feijoo
84624d8c99
ukify: fix typos
2024-12-30 10:50:25 +00:00
cvlc12
2cc58b6c8a
man: change "secureboot-private-key.pem" filename for consistency
2024-12-30 09:14:29 +09:00
Michal Sekletar
f1a0f311e6
man: adjust description of PrivateUsers= so it is in line with reality
...
When the option is not available unit will not even start so there is
no security risk.
Fixes #34983
2024-12-29 14:38:00 +09:00
Mike Yuan
1e4e557262
tree-wide: replace FLAGS_SET(..., 1 << v) with BIT_SET(..., v)
2024-12-28 15:08:00 +01:00
Mike Yuan
382f3438d9
shared/condition: use BIT_SET where appropriate
2024-12-28 15:08:00 +01:00
Mike Yuan
6f3854fd63
capability-util: make CAPABILITY_QUINTET_NULL const, introduce capability_quintet_is_fully_set() helper
...
Follow-up for 1184626a26
See 9bb64f1b8d for rationale
of the first change.
2024-12-28 15:08:00 +01:00
Mike Yuan
d5e12dc75e
capability-util: minor modernizations
2024-12-28 15:08:00 +01:00
Mike Yuan
3217fd5915
sd-varlink: add missing error check in sd_varlink_listen_auto()
...
Follow-up for 50994b2f91
2024-12-28 14:49:22 +01:00
Mike Yuan
5ce8d7d839
core/unit-serialize: fix serialization of markers
...
Follow-up for ff68472a20
2024-12-28 14:49:17 +01:00
Yu Watanabe
80797bbb91
locale-setup: do not load locale from environemnt when /etc/locale.conf is unchanged
...
Previously, when /etc/locale.conf is unchanged, locales were loaded from
possibly outdated environment variable.
Fixes a bug introduced by 018befcff6 (v253).
Fixes #35717 .
2024-12-28 12:04:01 +00:00
Yu Watanabe
51a0a3b049
machine: GC machine when no leader PID is set
...
After d8854ff1ac , if a serialized
leader PID of a machine is already dead when deserialized, then the
leader PID and PIDFD are unset for the machine, and subsequent
machine_start() -> machine_watch_pidfd() will trigger an assertion.
This makes a Machine object without leader PID GCed.
Fixes a bug introduced by the combination of
d8854ff1ac (v255) and
1762c2c045 (v257).
Fixes #35602 .
2024-12-28 12:03:20 +00:00