Commit Graph

64136 Commits

Author SHA1 Message Date
Yu Watanabe
22148897cf udev: use version()
Fixes #27382.
2023-04-26 07:44:39 +02:00
Luca Boccassi
fa84c1ce00 portablectl: add --extension to bash completion 2023-04-26 08:35:20 +09:00
Yu Watanabe
ff2da67b9a Merge pull request #27409 from mrc0mmand/more-tests
test: add a couple of sanity tests for systemd-creds
2023-04-26 08:24:52 +09:00
Frantisek Sumsal
ad2875af9e test: add a couple of sanity tests for systemd-creds 2023-04-25 18:34:49 +02:00
Frantisek Sumsal
c74e13a5c3 creds: make --pretty behave in a slightly more expected manner 2023-04-25 18:34:49 +02:00
Frantisek Sumsal
ee46e4d982 test: cover missed stuff from securebits-util.h 2023-04-25 18:34:49 +02:00
Eric Curtin
b9dac41837 Support /etc/system-update for OSTree systems
This is required when / is immutable and cannot be written at runtime.

Co-authored-by: Richard Hughes <richard@hughsie.com>
2023-04-25 17:40:41 +02:00
Lennart Poettering
d30d5a0374 Merge pull request #27347 from bluca/sd_bus_nonce
sd: avoid closing sd-bus in a fork, store module-global id for sd-bus/sd-session/sd-journal
2023-04-25 17:40:15 +02:00
Lennart Poettering
17b798d915 mount-util: split remount_idmap() in two
This will make things a bit longer for now, but more powerful as we can
reuse the userns fd between calls to remount_idmap() if we need to
adjust multiple mounts.

No change in behaviour, just some minor refactoring.
2023-04-25 17:39:16 +02:00
Lennart Poettering
4054d76151 sd-daemon: add sd_pid_notifyf_with_fds()
I guess it was only a question of time until we need to add the final
frontier of notification functions: one that combines the features of
all the others:

1. specifiying a source PID
2. taking a list of fds to send along
3. accepting a format string for the status string

Hence, let's add it.
2023-04-25 17:38:57 +02:00
Luca Boccassi
4a75704b16 pam: do not attempt to close sd-bus after fork in pam_end()
When pam_end() is called after a fork, and it cleans up caches, it sets
PAM_DATA_SILENT in error_status. FDs will be shared with the parent, so
we do not want to attempt to close them from a child process, or we'll
hit assertions. Complain loudly and skip.
2023-04-25 17:19:57 +02:00
Vitaly Kuznetsov
b4e5c103be man: /usr/lib/systemd/random-seed -> /usr/lib/systemd/systemd-random-seed
/usr/lib/systemd/random-seed is not a thing.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2023-04-25 17:05:28 +02:00
Lennart Poettering
973527648b logind: always use 64bit session IDs
it's a bit confusing that on 32bit systems we'd risk session IDs
overruns like this. Let's expose the same behaviour everywhere and stick
to 64bit ids.

Since we format the ids as strings anyway this doesn't really change
anything performance-wise, it just pushes out collisions by overrun to
basically never happen.
2023-04-25 15:52:19 +01:00
Lawrence Thorpe
08b61b40ed docs: fix LoadCredentialEncrypted example (#27387)
Embedded credential name 'ciphertext.cred' does not match filename 'foobar', refusing.
2023-04-25 15:41:01 +02:00
Thorsten Kukuk
092e6cd19a sd-login: add SetTTY session object #26611 2023-04-25 14:33:09 +02:00
Lennart Poettering
4d26b2277a doc: say in CODING_STYLE that AT_EMPTY_PATH should be implied on openat() style APIs (and NULL path is OK)
As discussed here:

https://github.com/systemd/systemd/pull/27397#issuecomment-1521630044
2023-04-25 14:05:08 +02:00
Lennart Poettering
eb3641fc3c user-record-nss: make return values optional
If we only want to know if some user ID/user name is already allocated,
we don't care for the returned data.
2023-04-25 14:00:57 +02:00
Lennart Poettering
c8ab89e569 mountpoint-util: make path_get_mnt_id_at() work with a NULL path 2023-04-25 14:00:38 +02:00
Luca Boccassi
2eeff0f4f1 sd-event: store and compare per-module static origin id
sd-event objects use hashmaps, which use module-global state, so it is not safe
to pass a sd-event object created by a module instance to another module instance
(e.g.: when two libraries static linking sd-event are pulled in a single process).
Initialize a random per-module origin id and store it in the object, and compare
it when entering a public API, and error out if they don't match, together with
the PID.
2023-04-25 12:24:25 +01:00
Luca Boccassi
e046719b74 sd-journal: store and compare per-module static origin id
sd-journal objects use hashmaps, which use module-global state, so it is not safe
to pass a sd-journal object created by a module instance to another module instance
(e.g.: when two libraries static linking sd-journal are pulled in a single process).
Initialize a random per-module origin id and store it in the object, and compare
it when entering a public API, and error out if they don't match, together with
the PID.
2023-04-25 12:24:25 +01:00
Luca Boccassi
bf876e3f3e sd-bus: store and compare per-module static origin id
sd-bus objects use hashmaps, which use module-global state, so it is not safe
to pass a sd-bus object created by a module instance to another module instance
(e.g.: when two libraries static linking sd-bus are pulled in a single process).
Initialize a random per-module origin id and store it in the object, and compare
it when entering a public API, and error out if they don't match, together with
the PID.
2023-04-25 12:24:25 +01:00
Luca Boccassi
bf2d930fa1 macro: add helper for module origin id
These need to be redefined in every module that we need to guard, so add
a macro
2023-04-25 11:34:39 +01:00
Frantisek Sumsal
9203abf79f Merge pull request #27261 from keszybz/test-cleanup
Cleanup syntax and use idiomatic bash in test scripts
2023-04-25 11:41:27 +02:00
Lennart Poettering
797f6cc514 fs-util: make sure open_mkdir_at() does something roughly sensible when invoked with '/' 2023-04-25 18:38:00 +09:00
Yu Watanabe
3d008416d6 Merge pull request #27380 from poettering/bpf-meson-tweaks
two bpf build system changes
2023-04-25 18:37:36 +09:00