diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-03-10 09:47:10 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-03-10 09:47:39 +0100 |
commit | 4870133bfaaf97189a970a29bf47e0e38fa721aa (patch) | |
tree | d2fa9a5699a8b4c948179afabf3da2f9da322ce5 /src/core/execute.c | |
parent | 5f64d2bf332371bdfdcb91b588e57d4c0c20428f (diff) | |
download | systemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.tar.gz |
basic: add RuntimeScope enum
In various tools and services we have a per-system and per-user concept.
So far we sometimes used a boolean indicating whether we are in system
mode, or a reversed boolean indicating whether we are in user mode, or
the LookupScope enum used by the lookup path logic.
Let's address that, in introduce a common enum for this, we can use all
across the board.
This is mostly just search/replace, no actual code changes.
Diffstat (limited to 'src/core/execute.c')
-rw-r--r-- | src/core/execute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 085b03aeb8..9db5b2cd17 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -4448,7 +4448,7 @@ static int exec_child( * invocations themselves. Also note that while we'll only invoke NSS modules involved in user management they * might internally call into other NSS modules that are involved in hostname resolution, we never know. */ if (setenv("SYSTEMD_ACTIVATION_UNIT", unit->id, true) != 0 || - setenv("SYSTEMD_ACTIVATION_SCOPE", MANAGER_IS_SYSTEM(unit->manager) ? "system" : "user", true) != 0) { + setenv("SYSTEMD_ACTIVATION_SCOPE", runtime_scope_to_string(unit->manager->runtime_scope), true) != 0) { *exit_status = EXIT_MEMORY; return log_unit_error_errno(unit, errno, "Failed to update environment: %m"); } |