summaryrefslogtreecommitdiff
path: root/src/core/dbus-util.h
Commit message (Collapse)AuthorAgeFilesLines
* core/dbus-util: introduce bus_set_transient_tristate()Yu Watanabe2023-02-231-0/+1
| | | | This will be used in later commits.
* core: add basic infrastructure to record unit activation informationLuca Boccassi2022-08-231-0/+2
| | | | | | | Not wired in by any unit type yet, just the basic to allocate, ref, deref and plug in to other unit types. Includes recording the trigger unit name and passing it to the triggered unit as TRIGGER_UNIT= env var.
* oom: rework *MemoryPressureLimit= properties to have 1/10000 precisionAnita Zhang2021-02-021-1/+0
| | | | | | | Requested in https://github.com/systemd/systemd/pull/15206#discussion_r505506657, preserve the full granularity for memory pressure limits (permyriad) instead of capping out at percent.
* core: split read_mount_options helper out for reuseLuca Boccassi2021-01-211-0/+3
|
* core: add DBUS method to bind mount new nodes without service restartLuca Boccassi2021-01-181-0/+1
| | | | | | | | | | | | | | Allow to setup new bind mounts for a service at runtime (via either DBUS or a new 'systemctl bind' verb) with a new helper that forks into the unit's mount namespace. Add a new integration test to cover this. Useful for zero-downtime addition to services that are running inside mount namespaces, especially when using RootImage/RootDirectory. If a service runs with a read-only root, a tmpfs is added on /run to ensure we can create the airlock directory for incoming mounts under /run/host/incoming.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* core: add ManagedOOM*= properties to configure systemd-oomd on the unitAnita Zhang2020-10-071-0/+1
| | | | | This adds the hook ups so it can be read with the usual systemd utilities. Used in later commits by sytemd-oomd.
* user-util: rework how we validate user namesLennart Poettering2020-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This reworks the user validation infrastructure. There are now two modes. In regular mode we are strict and test against a strict set of valid chars. And in "relaxed" mode we just filter out some really obvious, dangerous stuff. i.e. strict is whitelisting what is OK, but "relaxed" is blacklisting what is really not OK. The idea is that we use strict mode whenver we allocate a new user (i.e. in sysusers.d or homed), while "relaxed" mode is when we process users registered elsewhere, (i.e. userdb, logind, …) The requirements on user name validity vary wildly. SSSD thinks its fine to embedd "@" for example, while the suggested NAME_REGEX field on Debian does not even allow uppercase chars… This effectively liberaralizes a lot what we expect from usernames. The code that warns about questionnable user names is now optional and only used at places such as unit file parsing, so that it doesn't show up on every userdb query, but only when processing configuration files that know better. Fixes: #15149 #15090
* make namespace_flags_to_string() not return empty stringYu Watanabe2020-03-031-1/+2
| | | | | | | | | | This improves the following debug log. Before: systemd[1162]: Restricting namespace to: . After: systemd[1162]: Restricting namespace to: n/a.
* shared/user-util: allow usernames with dots in specific fieldsZbigniew Jędrzejewski-Szmek2019-08-191-1/+1
| | | | | | | | | | | | | | | | | | People do have usernames with dots, and it makes them very unhappy that systemd doesn't like their that. It seems that there is no actual problem with allowing dots in the username. In particular chown declares ":" as the official separator, and internally in systemd we never rely on "." as the seperator between user and group (nor do we call chown directly). Using dots in the name is probably not a very good idea, but we don't need to care. Debian tools (adduser) do not allow users with dots to be created. This patch allows *existing* names with dots to be used in User, Group, SupplementaryGroups, SocketUser, SocketGroup fields, both in unit files and on the command line. DynamicUsers and sysusers still follow the strict policy. user@.service and tmpfiles already allowed arbitrary user names, and this remains unchanged. Fixes #12754.
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-4/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* core: include sd-bus-vtable.h in dbus-*.hYu Watanabe2018-05-281-0/+1
|
* core: merge duplicated functionsYu Watanabe2018-05-111-0/+2
|
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* core/cgroup: accepts MemorySwapMax=0 (#8366)Yu Watanabe2018-03-091-78/+0
| | | | | | Also, this moves two macros from dbus-util.h to dbus-cgroup.c, as they are only used in dbus-cgroup.c. Fixes #8363.
* core: drop unnecessary __useless_struct_to_allow_trailing_semicolon__Zbigniew Jędrzejewski-Szmek2018-03-061-18/+9
| | | | | | | | | | | | | | ISO C does not allow empty statements outside of functions, and gcc will warn the trailing semicolons when compiling with -pedantic: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic] But our code cannot compile with -pedantic anyway, at least because warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic] Without -pedatnic, clang and even old gcc (3.4) generate no warnings about those semicolons, so let's just drop __useless_struct_to_allow_trailing_semicolon__.
* dbus-cgroup: simplify bus_cgroup_set_property()Yu Watanabe2018-01-031-0/+80
|
* core: add dbus-util.[ch] to simplify creating transient unitsYu Watanabe2018-01-021-0/+271
The functions and macros introduced by them will be used in later commits.