Yu Watanabe
8d8d4b092a
Merge pull request #25787 from msekletar/rename-process-cap
...
units: allow systemd-userdbd to change process name
2022-12-20 09:58:47 +09:00
noodlejetski
53a568f327
hwdb: Fn+F5 fix for MSI Bravo 15-B5DX ( #25788 )
...
Closes #25782 .
2022-12-20 09:57:54 +09:00
Michal Sekletar
d5e5bc2fe9
units: allow systemd-userdbd to change process name
...
rename_process() requires CAP_SYS_RESOURCE so let's make sure it is in
our permitted set after execve() by adding in to the bounding set.
Previously,
systemd-userdbd.service - User Database Manager
Loaded: loaded (/usr/lib/systemd/system/systemd-userdbd.service; indirect; preset: disabled)
Active: active (running) since Mon 2022-12-19 17:07:21 CET; 17min ago
TriggeredBy: ● systemd-userdbd.socket
Docs: man:systemd-userdbd.service(8)
Main PID: 1880 (systemd-userdbd)
Status: "Processing requests..."
Tasks: 4 (limit: 2272)
Memory: 5.2M
CPU: 244ms
CGroup: /system.slice/systemd-userdbd.service
├─1880 /usr/lib/systemd/systemd-userdbd
├─2270 systemd-userwork
├─2271 systemd-userwork
└─2272 systemd-userwork
Now,
Loaded: loaded (/usr/lib/systemd/system/systemd-userdbd.service; indirect; preset: disabled)
Active: active (running) since Mon 2022-12-19 17:27:02 CET; 15s ago
TriggeredBy: ● systemd-userdbd.socket
Docs: man:systemd-userdbd.service(8)
Main PID: 2404 (systemd-userdbd)
Status: "Processing requests..."
Tasks: 4 (limit: 2272)
Memory: 5.5M
CPU: 89ms
CGroup: /system.slice/systemd-userdbd.service
├─2404 /usr/lib/systemd/systemd-userdbd
├─2407 "systemd-userwork: waiting..."
├─2408 "systemd-userwork: waiting..."
└─2409 "systemd-userwork: waiting..."
2022-12-19 18:33:24 +01:00
Michal Sekletar
03ee26168f
argv-util: do proper permission check while when changing process name
...
Process renaming happens very seldomly so we are able to afford proper
permission check, i.e. actually check for CAP_SYS_RESOURCE capability
instead of euid.
2022-12-19 17:29:40 +01:00
Lennart Poettering
34eebf08fa
Merge pull request #25783 from keszybz/trivial-cleanups
...
Trivial cleanups
2022-12-19 17:01:51 +01:00
Lennart Poettering
93965d3325
Merge pull request #25771 from bluca/pkcs11_dlopen
...
p11kit: switch to dlopen()
2022-12-19 17:01:02 +01:00
Zbigniew Jędrzejewski-Szmek
e8d2cb0f34
basic/hashmap: add comment
...
Coverity complains that the check is suspicious. Add a comment to help
the reader.
2022-12-19 15:16:41 +01:00
Zbigniew Jędrzejewski-Szmek
a0e475ce6a
efi: do not use 'r' as pointer name
...
'r' should only be used as in 'int r'.
2022-12-19 15:16:33 +01:00
Zbigniew Jędrzejewski-Szmek
98775ae0f7
userdb: fix typo
2022-12-19 15:16:24 +01:00
Zbigniew Jędrzejewski-Szmek
ac2300f735
shared/dns-domain: reduce scope of variable declarations
2022-12-19 15:16:09 +01:00
Luca Boccassi
e5f48108cb
Update TODO
2022-12-19 14:49:01 +01:00
Luca Boccassi
da035a3a24
p11kit: switch to dlopen()
2022-12-19 14:49:01 +01:00
Lennart Poettering
5ac1e0eff3
Merge pull request #25784 from poettering/bootctl-split
...
bootctl: split up bootctl.c into multiple files
2022-12-19 14:37:52 +01:00
Yu Watanabe
8f1359bf85
unit: use underbar for module name
...
For consistency with src/core/unit.c.
2022-12-19 12:12:02 +01:00
Lennart Poettering
baafb202f8
bootctl: split out "install" verb too
2022-12-19 12:08:02 +01:00
Lennart Poettering
da36788f65
bootctl: split out "status" verb too
2022-12-19 12:08:02 +01:00
Lennart Poettering
6d8ca25766
bootctl: split out "set-efivar" verbs, too
2022-12-19 12:06:33 +01:00
Lennart Poettering
6e975890a6
bootctl: also split out 'systemd-efi-options' verb
2022-12-19 11:52:09 +01:00
Lennart Poettering
85f875357b
bootctl: split out random seed verb, too
2022-12-19 11:43:19 +01:00
Lennart Poettering
34ea7e0232
bootctl: let's start splitting up bootctl like we did for systemctl and others
2022-12-19 11:43:19 +01:00
Yu Watanabe
cc3254c446
Merge pull request #25779 from bluca/journa_remote_vacuum
...
journal-remote: follow-ups for #25076
2022-12-19 09:44:04 +09:00
Luca Boccassi
4bf277caa5
journal-remote: fix memory leak on initialization error
...
Follow-up for f12b399dd6
from
https://github.com/systemd/systemd/pull/25076
CID#1501550
2022-12-18 10:58:47 +00:00
Luca Boccassi
a4f82d2cd7
journal-remote: fix initialization of vacuum metrics
...
Follow-up for f12b399dd6
from
https://github.com/systemd/systemd/pull/25076
CID#1501551
2022-12-18 10:57:59 +00:00
asavah
2736a0c64e
meson: fix cross-compilation of LONG_MAX
...
https://github.com/systemd/systemd/pull/25618#issuecomment-1355019553
2022-12-18 10:24:14 +01:00
berenddeschouwer
f12b399dd6
vacuum journal remote ( #25076 )
...
* Support vacuuming for journal-remote
Co-authored-by: Berend De Schouwer <berend@deschouwer.co.za>
2022-12-17 13:54:16 +00:00
Luca Boccassi
2c99e8c6e0
Merge pull request #25221 from enr0n/nic-rename-fallback
...
udev: set link alternative name if link is already up during rename
2022-12-17 14:51:39 +01:00
Luca Boccassi
896785a7d9
Merge pull request #25387 from yuwata/core-fix-gc-logic
...
core: fix logic of merging units
2022-12-17 14:49:21 +01:00
наб
209d355c70
Add basic systemctl edit test
2022-12-17 14:47:38 +01:00
Lennart Poettering
a1ad873d2f
TODO
2022-12-16 15:03:06 +01:00
Yu Watanabe
ea4b8f4cbf
test: systemd-mount --list and systemd-umount requires the device is initialized by udevd
...
Fixes #25674 .
2022-12-16 15:14:42 +09:00
Jade Lovelace
2740521fa3
man/systemd-oomd.service: Document command line options
...
Previously these were not written down. This PR depends on #25670 , since
`--dry-run` prints at debug level in `main`, which is surprising
behaviour.
2022-12-16 11:32:25 +09:00
Lennart Poettering
4b22c9f19d
Merge pull request #25487 from poettering/systemctl-edit-newline-fix
...
systemctl: simplify trim_edit_markers()
2022-12-15 22:22:32 +01:00
Aidan Dang
8f30c00c50
Implement SYSTEMD_HOME_MKFS_OPTIONS_* envvars to configure mkfs options for homed LUKS directories
2022-12-15 22:22:10 +01:00
Daan De Meyer
15cad3a2ab
repart: Always derive fs/luks UUIDs from generated partition UUID
...
When generating verity partitions, we only know the partition UUID
of the verity data and hash partition after doing the verity
formatting. This means we can't use the verity partition UUID as
input for deriving the filesystem/luks UUIDs. Currently, we derive
the filesystem/luks UUID from the null UUID instead, which isn't
ideal. Instead, let's always generate a partition UUID and use it
to derive the fs/luks UUIDs, but only use it as the actual partition
UUID if we're not doing verity for the partition.
2022-12-15 22:21:17 +01:00
Lennart Poettering
0318d54539
pcrphase: gracefully exit if TPM2 support is incomplete
...
If everything points to the fact that TPM2 should work, but then the
driver fails to initialize we should handle this gracefully and not
cause failing services all over the place.
Fixes : #25700
2022-12-15 22:20:54 +01:00
Yu Watanabe
ad48ff12bd
test: show and check almost all journal entries since the relevant command being invoked
...
For some reasons, journal timestamps from other sources sometimes
inconsistent. For example,
```
$ journalctl --file system.journal -o short-monotonic -u resmontest.service
[ 1112.168109] ns1.unsigned.test resolvectl[419]: → Q: ns1.unsigned.test IN AAAA
[ 1112.168109] ns1.unsigned.test resolvectl[419]: ← S: success
[ 1112.168109] ns1.unsigned.test resolvectl[419]: → Q: ns1.unsigned.test IN A
[ 1112.168109] ns1.unsigned.test resolvectl[419]: ← S: success
[ 1112.168109] ns1.unsigned.test resolvectl[419]: ← A: ns1.unsigned.test IN A 10.0.0.1
[ 1112.171961] ns1.unsigned.test systemd[1]: resmontest.service: Failed to load configuration: No such file or directory
[ 1112.172223] ns1.unsigned.test systemd[1]: resmontest.service: Trying to enqueue job resmontest.service/start/fail
[ 1112.179866] ns1.unsigned.test systemd[1]: resmontest.service: Installed new job resmontest.service/start as 312
[ 1112.179894] ns1.unsigned.test systemd[1]: resmontest.service: Enqueued job resmontest.service/start as 312
[ 1112.180389] ns1.unsigned.test systemd[1]: resmontest.service: Will spawn child (service_enter_start): /usr/bin/resolvectl
[ 1112.180418] ns1.unsigned.test systemd[1]: resmontest.service: Passing 0 fds to service
[ 1112.180447] ns1.unsigned.test systemd[1]: resmontest.service: About to execute /usr/bin/resolvectl monitor
[ 1112.180477] ns1.unsigned.test systemd[1]: resmontest.service: Forked /usr/bin/resolvectl as 419
[ 1112.180619] ns1.unsigned.test systemd[1]: resmontest.service: Changed dead -> start
[ 1112.180651] ns1.unsigned.test systemd[1]: Starting resmontest.service...
[ 1112.180799] ns1.unsigned.test systemd[419]: resmontest.service: Kernel keyring access prohibited, ignoring.
[ 1112.180895] ns1.unsigned.test systemd[419]: resmontest.service: Executing: /usr/bin/resolvectl monitor
[ 1112.181383] ns1.unsigned.test systemd[1]: resmontest.service: Got notification message from PID 419 (READY=1)
[ 1112.181413] ns1.unsigned.test systemd[1]: resmontest.service: Changed start -> running
[ 1112.181441] ns1.unsigned.test systemd[1]: resmontest.service: Job 312 resmontest.service/start finished, result=done
[ 1112.181469] ns1.unsigned.test systemd[1]: Started resmontest.service.
```
In such case, `journalctl -f` may not show the entries what we are interested in.
Fixes #25749 . (At least, workarond for the issue.)
2022-12-16 03:43:38 +09:00
Alvin Šipraga
986b2514cc
network: wifi: check SSID when AP interfaces go up
...
When an AP goes up, the kernel may emit a netlink event indicating that
the interface has gained carrier. In that event, we should check if the
SSID has changed before attempting to reconfigure. Not doing so means
that the link->ssid member is not updated, leading to a potential
mismatch if some of the .network configurations match on SSID=.
There are however scenarios where the above heuristic is not enough.
Specifically, if the interface carrier state flip-flops within a short
enough interval, the internal throttling of netlink events inside the
kernel may suppress intermediate linkdown+linkup events (cf. Linux
net/core/link_watch.c). So there is no linkup event to react on.
To improve on the latter scenario, it is proposed to make newer kernels
emit an NL80211_CMD_START_AP multicast event when an AP goes up. This
event will not be dropped by link_watch. systemd-networkd can then react
to such events as well, and optionally reconfigure the link if the SSID
has changed. This will only work with newer kernels though.
2022-12-16 03:38:10 +09:00
Yu Watanabe
ed9911630e
core/unit: fix log message
...
As you can see in the below, the dropped dependency Before=issue-24990.service
is not logged, but the dependency Before=test1.service which is not owned by
the units generated by the TEST-26 is logged.
Before:
systemd[1]: issue-24990.service: Dependency After=test1.service dropped, merged into issue-24990.service
systemd[1]: issue-24990.service: Dependency Before=test1.service dropped, merged into issue-24990.service
After:
systemd[1]: issue-24990.service: Dependency After=test1.service is dropped, as test1.service is merged into issue-24990.service.
systemd[1]: issue-24990.service: Dependency Before=issue-24990.service in test1.service is dropped, as test1.service is merged into issue-24990.service.
2022-12-16 03:15:51 +09:00
Lennart Poettering
7eb51b8e3e
man: add two signature key example to systemd-measure
...
@keszybz asked for an example with --append= used in the systemd-measure
man page. Here it is.
As requested: https://github.com/systemd/systemd/pull/25224#pullrequestreview-1190709772
2022-12-15 18:39:00 +01:00
Lennart Poettering
557bde331b
systemctl: don't unlink non-existing temporary files
2022-12-15 17:54:27 +01:00
Lennart Poettering
1ae886fe28
systemctl: if we edit a single file only, jump to the right line
2022-12-15 17:53:49 +01:00
Lennart Poettering
d88e1e484a
systemctl: stop using basename() at one more place
2022-12-15 17:53:07 +01:00
Lennart Poettering
0ce6f0a35a
systemctl: line break string where the newlines are
2022-12-15 17:52:26 +01:00
Lennart Poettering
2865507008
systemctl: minor modernizations/simplifications
2022-12-15 17:51:45 +01:00
Lennart Poettering
8eda5560b0
systemctl: simplify trim_edit_markers()
...
This is not performance sensitive, don#t try to be smart with realloc()
Follow-up for: #25305
Fixes : #25303
2022-12-15 17:51:11 +01:00
Yu Watanabe
0b92fbbaee
test: fix typo
2022-12-16 01:38:08 +09:00
Yu Watanabe
9b8eb412ca
Merge pull request #25756 from yuwata/test-resolve-1
...
test: several cleanups for TEST-75-RESOLVE
2022-12-16 00:53:52 +09:00
Yu Watanabe
6f3473ca03
Merge pull request #25718 from yuwata/locale-cleanups
...
locale: avoid TOCTOU in reading config files
2022-12-16 00:51:13 +09:00
Nick Rosbrook
f68f644a16
test-network: add a test for renaming device to current altname
2022-12-15 10:36:14 -05:00
Frantisek Sumsal
a32831ae1d
mkosi: work around a file conflict between systemd and systemd-boot
2022-12-15 16:04:28 +01:00