summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-ctrl.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-05-10dirent: conditionalize dirent assert based on dirent64 existenceSam James2-0/+4
>=musl-1.2.4 doesn't define dirent64 and its LFS friends as its "native" functions are already LFS-aware. Check for dirent64 in meson.build and only assert if it exists. Bug: https://bugs.gentoo.org/905900 Closes: https://github.com/systemd/systemd/pull/25809
2023-05-10network/tc: rename settings in log messages tooMike Yuan1-3/+3
Follow-up for c03ef420fa7157b8d4881636fe72596a06e08bb6
2023-05-10sd-bus: bus_message_type_from_string is not pureXi Ruoyao1-1/+1
GCC document [1] says: The pure attribute prohibits a function from modifying the state of the program that is observable by means other than inspecting the function’s return value. And there is an example: `int hash (char *) __attribute__ ((pure));` ... Even though hash takes a non-const pointer argument it must not modify the array it points to, ... But we are modifying the object pointed to by the pointer u, which is clearly a violation of the semantic of pure. With -ftrivial-auto-var-init (enabled by -Dmode=release), on some targets (GCC 12.2 on AArch64 and GCC 13.1 on x86_64) performs an optimization: as the variable "u" in bus_match_parse has been zero-initialized (by the -ftrivial-auto-var-init option) and never modified (because a "pure" bus_message_type_from_string is not allowed to modify it), "u" will be always 0. Then 0 is used to initialize .value_u8 field of struct bus_match_component. This then causes a infinite event loop, so "systemctl restart" never stops, and pam_systemd timeouts communicating with logind, etc. So we should remove the "pure" attribute here. Fixes #26395. [1]:https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-pure-function-attribute
2023-05-10core/mount: replace invalid UTF-8 code points in "what" and "options"Michal Sekletar1-6/+29
Previously, these strings were copied w/o any modification. However, if mount table contained e.g. remote fs mount like NFS or CIFS that was mounted from server running with non UTF-8 locale then those strings might have contained some non UTF-8 characters. If then client asked about status of such mount unit we tried to forward these non UTF-8 strings over D-Bus. That is the violation of the protocol and we ended up kicked from the bus.
2023-05-09test: slightly extend systemd-cryptenroll coverageFrantisek Sumsal1-0/+35
2023-05-09cryptenroll: fix an assertion with weak passwordsFrantisek Sumsal1-1/+1
Passing 0 to log_xxx_errno() leads to an assertion, so let's not do that: $ NEWPASSWORD="" build-san/systemd-cryptenroll --unlock-key-file=/tmp/password --password "$img" /tmp/password has 0644 mode that is too permissive, please adjust the ownership and access mode. Assertion '(_error) != 0' failed at src/cryptenroll/cryptenroll-password.c:164, function enroll_password(). Aborting. Aborted (core dumped)
2023-05-09test: TEST-70-TPM2 cleanupFrantisek Sumsal1-137/+115
No functional changes.