Commit Graph

69588 Commits

Author SHA1 Message Date
Yu Watanabe
b5dd61e3c1 network: use json_variant_append_arrayb()
No functional change, just refactoring and shortening code.
2023-12-23 17:30:54 +00:00
Yu Watanabe
354171a5db Merge pull request #30603 from mrc0mmand/openssl-shenanigans
test/ukify: make the tests happy with OpenSSL 3.2.0+
2023-12-24 00:27:20 +09:00
Frantisek Sumsal
4e5984f027 test: make sure the dummy CA certificate is marked as such
With OpenSSL 3.2.0+ this is necessary, otherwise the verification
of such CA certificate fails badly:

$ openssl s_client -CAfile /run/systemd/remote-pki/ca.crt -connect localhost:19532
...
Connecting to ::1
CONNECTED(00000003)
Can't use SSL_get_servername
depth=1 C=CZ, L=Brno, O=Foo, OU=Bar, CN=Test CA
verify error:num=79:invalid CA certificate
verify return:1
depth=1 C=CZ, L=Brno, O=Foo, OU=Bar, CN=Test CA
verify error:num=26:unsuitable certificate purpose
verify return:1
...
---
SSL handshake has read 1566 bytes and written 409 bytes
Verification error: unsuitable certificate purpose
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 2048 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 26 (unsuitable certificate purpose)
2023-12-23 13:42:09 +01:00
Frantisek Sumsal
338ed5bea4 ukify: make the test happy with the latest OpenSSL
Which dropped some whitespaces in the output:

$ openssl version
OpenSSL 3.2.0 23 Nov 2023 (Library: OpenSSL 3.2.0 23 Nov 2023)
$ openssl x509 -in cert.pem -text -noout | grep Issuer
        Issuer: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd

$ openssl version
OpenSSL 3.0.9 30 May 2023 (Library: OpenSSL 3.0.9 30 May 2023)
$ openssl x509 -in cert.pem -text -noout | grep Issuer
        Issuer: C = XX, L = Default City, O = Default Company Ltd

Making test-ukify unhappy:

>       assert 'Issuer: CN = SecureBoot signing key on host' in out
E       AssertionError: assert 'Issuer: CN = SecureBoot signing key on host' in '<...snip...>Issuer: CN=SecureBoot signing key on host archlinux2\n...'
2023-12-23 12:32:31 +01:00
Yu Watanabe
24f4144a08 Merge pull request #30600 from dtardon/see-also-simplelist
man: use `<simplelist>` for 'See also' sections
2023-12-23 19:08:31 +09:00
Luca Boccassi
d45ca9a905 man: conditionalize sd-pcrlock and sd-measure on the same variable as their binaries
The binaries are built and installed if HAVE_TPM2 is set, and ignore ENABLE_BOOTLOADER,
so do the same for the manpages.

For the sd-pcrlock case this also installs the manpage aliases for the units, which
are not installed with -Dbootloader=disabled, but there's no way to conditionalize
the aliases, so on balance it's better to have too much documentation rather than
too little.

Fixes https://github.com/systemd/systemd/issues/30588
2023-12-23 18:04:08 +08:00
David Tardon
59b4437973 man: capitalize "also" for consistency
Almost all our man pages write it that way.
2023-12-23 08:28:57 +01:00
David Tardon
13a69c120b man: use <simplelist> for 'See also' sections
This is just a slight markup improvement; there should be no difference
in rendering.
2023-12-23 08:28:57 +01:00
Yu Watanabe
60d52f219e udev: use SD_EVENT_SIGNAL_PROCMASK 2023-12-23 00:32:48 +01:00
Luca Boccassi
bc22b7be0a Merge pull request #30590 from yuwata/backlight-cleanups
backlight: several cleanups and use dispatch_verb()
2023-12-22 23:35:27 +01:00
Yu Watanabe
bdc79e5fcd TODO: fix typo 2023-12-23 04:49:26 +09:00
Matt Layher
4591eccfc7 network: use varlink for networkctl check_netns_match()
Use varlink to detect networkd's network namespace when executing
networkctl rather than the D-Bus interface.

Signed-off-by: Matt Layher <mdlayher@gmail.com>
2023-12-23 04:25:13 +09:00
Yu Watanabe
f8f59f3280 backlight: split out verb_load() and verb_save(), then use dispatch_verb()
No functional change, just refactoring.
2023-12-23 03:53:28 +09:00
Yu Watanabe
48de55c38c backlight: use WRITE_STRING_FILE_MKDIR_0755 flag on save
No functional change, just refactoring.
2023-12-23 03:53:28 +09:00
Yu Watanabe
78b4ff5df4 backlight: split out read_saved_brightness()
No functional change, just refactoring.
2023-12-23 03:53:28 +09:00
Yu Watanabe
69ba99f9f3 backlight: split out device_new_from_arg()
While at it, this replaces strndupa_safe() with strndup(), as the input
is a user-controlled string.

No functional change, just refactoring.
2023-12-23 03:53:28 +09:00
Yu Watanabe
7135e6291d backlight: split out build_save_file_path()
No functional change, just refactoring.
2023-12-23 03:53:28 +09:00
Yu Watanabe
0e1564a261 backlight: move validity check of max_brightness to get_max_brightness()
Also rename get_max_brightness() -> read_max_brightness() for
consistency with read_brightness().
2023-12-23 03:53:28 +09:00
Yu Watanabe
2b575c0c95 Merge pull request #30585 from YHNdnzj/isatty-handling
various: clean up isatty() handling
2023-12-23 03:19:19 +09:00
Mike Yuan
dd9c8da865 various: clean up isatty() handling
As per https://github.com/systemd/systemd/pull/30547#discussion_r1434371627
2023-12-22 23:06:49 +08:00
Mike Yuan
76270f5c09 terminal-util: introduce isatty_safe that rejects EBADF 2023-12-22 23:06:48 +08:00
Mike Yuan
d3f818fea6 terminal-util: use RET_GATHER more 2023-12-22 23:04:47 +08:00
Luca Boccassi
4f276e97de test: fix check for device in test-execute
The unit actually uses /dev/kmsg, not /dev/kvm

Follow-up for ae7482b994
2023-12-22 15:32:28 +01:00
Luca Boccassi
12b6b3cfd9 Merge pull request #30550 from yuwata/network-nexthop-cleanups-3
network: several cleanups for nexthop (part3)
2023-12-22 10:44:39 +01:00
Yu Watanabe
2962a50850 systemctl: swap cached_id_map and cached_name_map
These are unused or used in the same order. So, this patch does not
change any behavior, just for naming consistency with the function
prototype.

Closes #30570.
2023-12-22 12:34:01 +09:00