Commit Graph
78887 Commits
Author SHA1 Message Date
Yu Watanabe b5a10b2127 udev-control: move setting of log level to manager_adjust_config()
No functional change, just refactoring.
2025-01-21 04:12:18 +09:00
Tommi Rantala 26551c0f67 resolved: empty "ipv4hint" and "ipv6hint" SvcParams are invalid
According to RFC 9460 "An empty list of addresses is invalid."

https://www.rfc-editor.org/rfc/rfc9460.html#section-7.3
2025-01-20 19:03:09 +00:00
Yu Watanabe a8fe005209 tree-wide: drop merely used _cleanup_ macros, and introduce several new ones (#36071) 2025-01-21 03:41:27 +09:00
Lennart Poettering 6d8582ecd6 udev: cleanups around sd_listen_fds() (#36030)
Fixes a bug introduced by 2f0aa9a804.

In the offending commit, `sd_varlink_server_listen_auto()` is used. That
may add file descriptors of netlink socket for uevent and legacy control
socket varlink server. Then, udevd may fail to receive uevents.
2025-01-20 18:06:56 +01:00
Lennart Poettering a6fb250b50 tree-wide: several follow-ups for varlink methods (#36080)
Follow-ups for #35914.
2025-01-20 18:00:21 +01:00
Lennart Poettering 50ffe4058c udev-rules: introduce OPTIONS="dump" (#36069)
split out of #35968.
2025-01-20 17:59:40 +01:00
Daan De Meyer 5e65856829 sbsign: Make sure output file respects umask (#36083) 2025-01-20 14:02:29 +01:00
Daan De Meyer 6f594acd63 sbsign: Make sure output file mode respects umask 2025-01-20 10:06:11 +01:00
Daan De Meyer 7180a3b38c sbsign: Make two debug logs into error logs 2025-01-20 10:05:18 +01:00
Yu Watanabe d919a155c0 udev-varlink: add io.systemd.service.GetEnvironment
There is no reason to not support the method in udevd.

Follow-up for c8127075ae.
2025-01-20 00:21:45 +09:00
Yu Watanabe 901bfcd8c1 tree-wide: rely on sd_varlink_dispatch() for validating zero-argument method calls, too
Follow-ups for a7cc7038ac.
2025-01-20 00:21:31 +09:00
Yu Watanabe 848cdf56dc udev,network: drop unnecessary check for result of sd_listen_fds_with_names() 2025-01-19 23:54:41 +09:00
Yu Watanabe a75abf1ab9 udev-manager: rework initialization of device monitor
Let's determine the socket for device monitor based on its name.
2025-01-19 23:54:41 +09:00
Yu Watanabe 4a2c33847f udev-ctrl: use -EBADF for invalid file descriptor 2025-01-19 23:54:41 +09:00
Yu Watanabe ac440e47c5 udev: split out legacy control socket handling to udev-manager-ctrl.c
Mostly no functional change, except for that now the socket for device
monitor is determined by its name.
2025-01-19 23:53:45 +09:00
Yu Watanabe 2cf9635511 capability-util: rename output argument of capability_gain_cap_setpcap() 2025-01-19 14:00:16 +00:00
Yu Watanabe ed8a737e08 core: use usec_add() at one more place
Follow-up for 8af1b296cb.
Fixes CID#1590317.
2025-01-19 10:31:50 +01:00
Yu Watanabe 22d3a3dd20 Tweaks to generic "io.systemd.service" Varlink interface, and hook it up in all long-running Varlink daemons (#35914) 2025-01-19 11:54:10 +09:00
Yu Watanabe bcc057aa1d pid1,nspawn: enable usrquota on /tmp/ + /dev/shm/ (#36036)
Split out of #36010.

This simply enables the "usrquota" mount option on the two dirs if they
are backed by tmpfs.

#36010 contains a test that actually verifies that the mount option does
its thing.
2025-01-19 11:51:54 +09:00
Yu Watanabe 3fb71599d0 tree-wide: coding style fixlets done by coccinelle (#36074) 2025-01-19 11:51:12 +09:00
Hendrik Wolff 5c6703e2d8 man/systemd.special: Add suspend-then-hibernate.target to sleep.target documentation 2025-01-19 11:47:09 +09:00
Yu Watanabe 99de29945f tree-wide: coding style fixlets done by coccinelle 2025-01-19 08:28:42 +09:00
Yu Watanabe 62123950c6 coccinelle: add .gitignore for cache files 2025-01-19 08:27:47 +09:00
Lennart Poettering adb556abd9 tree-wide: use log_level_is_valid() more 2025-01-18 23:24:29 +01:00
Lennart Poettering 078ddcb7ce test: add superficial test for generic per-service varlink API 2025-01-18 23:24:29 +01:00
Lennart Poettering c8127075ae tree-wide: implement generic io.systemd.service Varlink interface in all long-running services
Given we have the generic interface, let's hook it up everywhere.

This doesnt bother with the Reload() call usually, since that's more
involved, but hooks up the other relevant functions where applicable.
2025-01-18 23:24:29 +01:00
Lennart Poettering fef9eb4e6a varlink: add generic GetEnvironment() call to the Varlink "service" interface
It's just so useful being able to retrieve the current env block from
our services. Add a concept for that. It's really simple, and dumb.

In many ways it's like /proc/$PID/environ, but shows the actual
environ[] array visible to the app, not just some memory that was
originally used for the env block passed in, but might have been rearranged.
2025-01-18 23:24:29 +01:00
Lennart Poettering 211012f544 varlink: tweak introspection description for Reload() 2025-01-18 23:24:29 +01:00
Lennart Poettering 36e7aa7010 varlink: drop redundant check
sd_varlink_dispatch() alredy validates all this, no need to check this
manually.
2025-01-18 23:24:29 +01:00
Lennart Poettering a7cc7038ac varlink: rely on sd_varlink_dispatch() for validating zero-argument method calls, too 2025-01-18 23:24:29 +01:00
Lennart Poettering fa3137f9d0 json-util: fine tune json_dispatch_log_level()
Let's give the user control on how to handle JSON "null" assignments of
the log level. As one of three cases: as failure, as LOG_NULL (i.e. to
turn off logging) or as LOG_INFO (as our usual default log level).

Let's then use that in the generic SetLogLevel() call, so that callers
can use it to explicitly turn off logging in a service.

Note that this was (probably accidentally) already implemented, except
that the introspection enforcement blocked it. Let's clean this up and
make this officially a thing, since it's generally useful to turn off
logging I think.
2025-01-18 23:24:29 +01:00
Lennart Poettering 611ae59888 nspawn: enable usrquota support on /tmp/ and /dev/shm/ 2025-01-18 23:13:06 +01:00
Lennart Poettering c9f805674a units: enable usrquota support on /tmp/ 2025-01-18 23:13:06 +01:00
Lennart Poettering 8f5131fb9e pid1: enable usrquota support on /dev/shm 2025-01-18 23:13:06 +01:00
nl6720 a153d7cbd2 man: replace "-" with "none" in cryptsetup commands and crypttab
`none` is more explicit and harder to overlook than `-` which in certain
contexts could be misunderstood to mean standard input.
2025-01-19 04:37:14 +09:00
Yu Watanabe dadd182317 TODO: fix typo
Follow-up for fb8d46cffe.
2025-01-19 04:25:22 +09:00
Yu Watanabe f0159e2b5b process-util: fix typo
Also rebreak comment.

Follow-up for 03b89cf213.
2025-01-19 04:24:08 +09:00
Yu Watanabe 4d090126ed login: fix typo
Follow-up for a6ad410ffa.
2025-01-19 04:22:16 +09:00
Yu Watanabe 7eabb5ca61 boot: introduce _cleanup_strv_free_ 2025-01-19 04:18:04 +09:00
Yu Watanabe 6ea99fd2cf boot: introduce _cleanup_file_close_ 2025-01-19 04:15:27 +09:00
Yu Watanabe 892b734c1c selinux-util: drop _cleanup_context_free_
It is used at only one place, not necessary.
2025-01-19 04:09:55 +09:00
Yu Watanabe 43e95ddbf4 capability-util: drop _cleanup_cap_free_charp_
Also moves cap_free_charpp() to test-cap-list.c, as it is used only
there.
2025-01-19 04:04:47 +09:00
Yu Watanabe fe5a1afb67 tree-wide: use _cleanup_hashmap_free_ and friends 2025-01-19 03:48:15 +09:00
Yu Watanabe b4ffb77669 udev-rules: introduce OPTIONS="dump" token
Should be useful for debugging.
2025-01-19 03:09:06 +09:00
Yu Watanabe 91d9f8f834 udev-dump: split out dump_event() from udevadm-test.c 2025-01-19 03:07:18 +09:00
Lennart Poettering 8af1b296cb pid1: when a password is requested during PAMName= processing, query it via the ask-password logic 2025-01-18 11:45:44 +00:00
Yu Watanabe f55a6fc1e3 udev: add --verbose option for 'udevadm test' and add more verbose logs (#36021)
split out of #35968.
2025-01-18 06:12:31 +09:00
Luca Boccassi 27c947ec3d tree-wide: switch various uses of mkdtemp() over to mkdtemp_malloc() (#36057) 2025-01-17 19:49:49 +00:00
Lennart Poettering ea844c49c3 escape: make 'bad' parameter optional
Treat a NULL bad parameter just like an empty one: do not escape any
additional characters except for the CC chars.
2025-01-17 19:47:43 +00:00
Mike Yuan 9cd064aa9f meson: bump C std to gnu17
GCC 8.4 (our baseline) defaults to gnu17 already.
2025-01-17 19:46:37 +00:00