summaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move CLEANUP_ARRAY to src/fundamentalLuca Boccassi2023-10-093-35/+36
|
* efi: add xmemdupLuca Boccassi2023-10-091-0/+5
|
* efi: add EFI_TCG2_TAGGED_EVENT and helpersLuca Boccassi2023-10-093-0/+90
|
* dissect: avoid clobbering device-mapper error when activating verityLuca Boccassi2023-10-091-7/+10
| | | | | | | | | | The device-mapper driver can return a wild variety of errors when trying to activate the same dm-verity volume concurrently, as it might happen with an image. There is a fallback logic in place, but the original return code was clobbered when userspace signature check was added. Add it back. Follow-up for c2fa92e7e8907d9
* Merge pull request #29495 from yuwata/network-manager-state-fileLuca Boccassi2023-10-082-122/+228
|\ | | | | network: fixlets for manager state file
| * network/dhcp6: keep lease when running in information request modeYu Watanabe2023-10-081-1/+11
| | | | | | | | Fixes #28566.
| * network/dhcp6: shorten dhcp6_handler()Yu Watanabe2023-10-081-12/+5
| | | | | | | | | | Note, currently dhcp6_lease_information_acquired() do nothing, so this does not change any behavior.
| * network: also save NTP servers and friends obtained by other protocolsYu Watanabe2023-10-081-109/+212
| | | | | | | | | | | | | | | | | | Previously, only servers that statically configursd or obtained by DHCPv4 protocol are saved in the manager state file. NTP servers obtained by DHCPv6 could not be used by timesyncd. Fixes #29148.
* | Merge pull request #29490 from yuwata/network-tc-fixesLuca Boccassi2023-10-086-60/+133
|\ \ | |/ |/| network: several fixes for traffic control support
| * network/tc: support Parent=X:0 for qdiscsYu Watanabe2023-10-073-11/+12
| | | | | | | | | | When the minor part of the parent handle is zero, let's check if the corresponding qdisc exists, rather than tc class.
| * network/tc: allow to configure class or qdisc under foreign oneYu Watanabe2023-10-072-6/+0
| | | | | | | | | | | | Some qdiscs (e.g. tbf) implicitly create class(es) on create. Previously, we could not create any child qdisc under the class, as the implicit class is tagged as foreign.
| * network/tc: re-enumerate traffic control classes when a qdisc createdYu Watanabe2023-10-071-0/+8
| | | | | | | | | | | | Some kind of qdisc implicitly creates a class for the qdisc, but the created class is not notified by the kernel. So, we need to explicitly enumerate classes after a qdisc is created.
| * network/tc: fix enumeration logic of traffic control classesYu Watanabe2023-10-074-7/+29
| | | | | | | | TC class can be enumerated only per link.
| * network/tc: drop child tree of traffic control nodes on removeYu Watanabe2023-10-074-16/+64
| | | | | | | | | | | | | | When a node of traffic control tree is removed, all child nodes are also removed but their removal are not notified by the kernel. So, previously, removed TC classes or qdiscs under the removed node were kept in the memory of networkd, and may cause failure on reconfigure.
| * network/tc: align vtablesYu Watanabe2023-10-071-20/+20
| |
* | core: refactor compare_job_priority()Lennart Poettering2023-10-075-42/+46
| | | | | | | | | | | | | | | | | | Let's move it out of cgroup.[ch]. The function primarily compares the priority values for units, hence let's move the core of it into a new function unit_compare_priority() in unit.[ch], and then make compare_job_priority() a local wrapper for it in manager.[ch] Shorten the code a bit while we are at it.
* | Merge pull request #29482 from poettering/cgroup-func-renameYu Watanabe2023-10-078-92/+100
|\ \ | |/ |/| core: various clean-ups in cgroup.[ch] and around
| * cgroup: rename cgroup_modify_nft_set() → unit_modify_nft_set()Lennart Poettering2023-10-063-10/+10
| | | | | | | | | | | | | | | | | | | | | | This is the only function that cgroup.h exports that is prefixed with cgroup_ where this does not refer to some type such as CGroupContext or CGroupTasksMax or so. It simply operates on a unit. And it doesn't even modify a cgroup, but just modifies an nft set. Hence, to make the naming scheme systematic, change prefix from cgroup_ to unit_, matching the majority of the functions that operate on Unit* in the file.
| * cgroup: un-export two functionsLennart Poettering2023-10-062-5/+2
| |
| * cgroup: refactor cgroup_xattr_apply()Lennart Poettering2023-10-061-9/+28
| | | | | | | | Split the function up, so that each set of xattrs is applied separately.
| * cgroup: drop cgroup path parameter from xattr callsLennart Poettering2023-10-062-36/+28
| | | | | | | | | | | | We only pass the same thing there: u->cgroup_path or NULL (which is ultimately the same as u->cgroup_path). Hence let's simplify things, and simply drop the whole parameter, and imply u->cgroup_pat.
| * cgroup: rename cgroup_add_* to cgroup_context_*Lennart Poettering2023-10-065-11/+11
| | | | | | | | | | | | They add settings to a CGroupContext, hence give them the expected context, to make clear they do not operate on anything else than the structure (i.e. not on a kernel cgroup or so).
| * cgroup: rename TasksMax structure to CGroupTasksMaxLennart Poettering2023-10-067-27/+27
| | | | | | | | | | | | | | | | Almost all our enums/structs/funcs carry the CGroup prefix if they are defined in cgroup.h, TasksMax so far does not, even though it is exclusively used in cgroup context. Change that.
* | Merge pull request #29491 from yuwata/varlink-follow-upsDaan De Meyer2023-10-073-16/+13
|\ \ | | | | | | varlink: several follow-ups
| * | tree-wide: use path_simplify_alloc() moreYu Watanabe2023-10-073-15/+12
| | |
| * | varlink: drop unnecessary conditionYu Watanabe2023-10-071-1/+1
| | | | | | | | | | | | | | | | | | When 'exec' is true, 'c' is always non-NULL. Fixes CID#1522384.
* | | tree-wide: add missing sigbus handlingYu Watanabe2023-10-073-0/+9
|/ /
* | varlink: fix typoYu Watanabe2023-10-072-2/+2
| | | | | | | | Follow-ups for #29325.
* | Merge pull request #29475 from keszybz/remove-wrapper-functionsLuca Boccassi2023-10-063-15/+11
|\ \ | | | | | | Remove unnecessary wrapper functions
| * | basic/macro: add comment explaining DEFINE_TRIVIAL_DESTRUCTOR()Zbigniew Jędrzejewski-Szmek2023-10-061-0/+2
| | |
| * | fuzz-bus-match: drop unnecessary wrapper functionZbigniew Jędrzejewski-Szmek2023-10-061-3/+1
| | | | | | | | | | | | Same confusion as in previous commit.
| * | nspawn: drop unnecessary wrapper functionsZbigniew Jędrzejewski-Szmek2023-10-061-12/+8
| |/ | | | | | | | | | | | | | | The naming was confused: suffix 'p' means that the function takes a pointer to the type that the wrapped function takes. (E.g., a char**, for a wrapped function taking a char*.) But DEFINE_TRIVIAL_DESTRUCTOR() just changes the return type. Also add one more assert for consistency.
* | sd-boot: add auto-reboot and auto-poweroff entriesEmil Velikov2023-10-062-3/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently only an auto-reboot-to-firmware entry is available. For other features - like reboot and power off - one needs to press the uppercase B and O respectively. Embedded devices may be missing a full fledged keyboard, so allow for sd-boot to generate those entries. v2: - add to the config parser/man/bootctl/sd-boot info screen - keep them off by default - add the (O)ff and re(B)oot help text if boot entries are not shown - drop irrelevant get_os_indications_supported() comment - s/ShutDown/Shutdown/ v3: - cast shutdown_system() reboot_system() to void v4: - shutdown -> poweroff - add trailing ",ignoring" in parser message - drop explicit default state assignment to "false" Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* | sd-boot: sprinkle some ", ignoring" trailing messagesEmil Velikov2023-10-061-9/+13
| | | | | | | | | | | | | | | | | | | | | | As mentioned by Lennart: ... we typically suffix such messages with ", ignoring", to indicate that we don't consider this fatal for anything. Update config_defaults_load_from_file() to follow that pattern. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* | sd-boot: remove unneeded false assignmentEmil Velikov2023-10-061-1/+0
| | | | | | | | | | | | | | When the assignment is missing, the default 0/NULL/false value is used. So drop the explicit piece in config_load_defaults() Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* | sd-boot: cast away reboot_into_firmware() return typeEmil Velikov2023-10-061-1/+1
|/ | | | | | | | | | As mentioned by Lennart, in a commit where I was adding similar piece of code: maybe cast this call to void, to tell static analyzers that we are ignoring the return value on purpose, not by accident Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* core: improve debug logs when failing to create symlinks in namespacesLuca Boccassi2023-10-061-2/+9
| | | | | I am seeing some failures and I don't know what is failing and why even with debug logs, so add more details
* Merge pull request #29325 from poettering/varlink-introspectYu Watanabe2023-10-0636-63/+3844
|\ | | | | varlink: add introspection support + varlinkctl + varlinkify one first command line tool (systemd-pcrextend)
| * pcrextend: make pcrextend tool acccessible via varlinkLennart Poettering2023-10-065-30/+171
| | | | | | | | | | | | | | | | This is primarily supposed to be a 1st step with varlinkifying our various command line tools, and excercise in how this might look like across our codebase one day. However, at AllSystemsGo! 2023 it was requested that we provide an API to do a PCR measurement along with a matching event log record, and this provides that.
| * varlinkctl: add new varlinkctl toolLennart Poettering2023-10-062-0/+533
| |
| * varlink: add varlink_invocation() callLennart Poettering2023-10-062-1/+44
| | | | | | | | | | | | | | This call checks if we are invoked in a socket-activation Varlink server context. It's useful for commands that can be run from the command line or as Varlink service and then either serve commands from the cmdline or those from Varlink.
| * varlink: add new call varlink_server_loop_auto()Lennart Poettering2023-10-062-0/+30
| | | | | | | | | | | | | | | | | | This is a helper call that runs the specified VarlinkServer object in an event loop, and exits once no more connections exist. This is useful for pure varlink servers (i.e. those which only server varlink requests and do nothing else), to run as long as there's something to do and exit right after.
| * varlink: add varlink_server_listen_auto() helperLennart Poettering2023-10-062-0/+46
| | | | | | | | | | | | This new helper will automatically take listening fds passed in from the service manager and processes varlink on them. It's useful for Varlink services that shall be socket activatable.
| * varlink: add exit-on-idle logic for Varlink serverLennart Poettering2023-10-062-1/+21
| | | | | | | | | | | | | | | | | | This adds a logic that if enabled ensures sd_event_exit() is called whenever the varlink connection count hits zero. This is useful for implementing pure Varlink services (i.e. services whose only job is to serve Varlink requests), that shall run only as long as needed, i.e. as long as at least one request is being served.
| * test: add test for varlink introspection logicLennart Poettering2023-10-062-0/+345
| |
| * oomd: move SubscriptionTaken Varlink error out of generic Varlink codeLennart Poettering2023-10-063-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This error is a private error returned by PID 1 to oomd. It's internal, and very specific to the use-case. Hence it should not be part of the org.varlink.service interface (which isn't really our namespace anyway). Hence, let's clean this up and move it over to the ManagedOOM varlink interface of PID, where it belongs. Since this is a private protocol of our two daemons, and the client (i.e. oomd) doesn't explicitly test for this error anyway we can just move it over without ill effects.
| * tree-wide: make all our Varlink APIs introspectableLennart Poettering2023-10-0620-0/+409
| |
| * varlink: add varlink_connect_url() and varlink_connect_exec() callsLennart Poettering2023-10-062-0/+147
| |
| * varlink: implement the org.varlink.service introspection interface by ↵Lennart Poettering2023-10-061-31/+202
| | | | | | | | | | | | default + hook up validator Fixes: #23874
| * varlink: add introspection data for the org.varlink.service and io.systemd ↵Lennart Poettering2023-10-066-0/+82
| | | | | | | | | | | | | | | | | | | | | | interfaces The official org.varlink.service interface definition, as per: https://varlink.org/Service And the io.systemd service where we carry some super generic errors our Varlink implementation generates.