mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
core: rename original_ambient_set → saved_ambient_set
We call similar other fields in main.c (notably: rlimit stuff, env vars) "saved", rather than "original". Hence stick to that kind of naming here too. Follow-up for: #32937
This commit is contained in:
parent
d1b04f47e3
commit
b004393d70
@ -468,7 +468,7 @@ int exec_spawn(
|
||||
|
||||
/* Restore the original ambient capability set the manager was started with to pass it to
|
||||
* sd-executor. */
|
||||
r = capability_ambient_set_apply(unit->manager->original_ambient_set, /* also_inherit= */ false);
|
||||
r = capability_ambient_set_apply(unit->manager->saved_ambient_set, /* also_inherit= */ false);
|
||||
if (r < 0)
|
||||
return log_unit_error_errno(unit, r, "Failed to apply the starting ambient set: %m");
|
||||
|
||||
|
@ -1938,7 +1938,7 @@ static int do_reexecute(
|
||||
FDSet *fds,
|
||||
const char *switch_root_dir,
|
||||
const char *switch_root_init,
|
||||
uint64_t capability_ambient_set,
|
||||
uint64_t saved_capability_ambient_set,
|
||||
const char **ret_error_message) {
|
||||
|
||||
size_t i, args_size;
|
||||
@ -2000,7 +2000,7 @@ static int do_reexecute(
|
||||
log_error_errno(r, "Failed to switch root, trying to continue: %m");
|
||||
}
|
||||
|
||||
r = capability_ambient_set_apply(capability_ambient_set, /* also_inherit= */ false);
|
||||
r = capability_ambient_set_apply(saved_capability_ambient_set, /* also_inherit= */ false);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Failed to apply the starting ambient set, ignoring: %m");
|
||||
|
||||
@ -2379,12 +2379,12 @@ static int initialize_runtime(
|
||||
bool first_boot,
|
||||
struct rlimit *saved_rlimit_nofile,
|
||||
struct rlimit *saved_rlimit_memlock,
|
||||
uint64_t *original_ambient_set,
|
||||
uint64_t *saved_ambient_set,
|
||||
const char **ret_error_message) {
|
||||
|
||||
int r;
|
||||
|
||||
assert(original_ambient_set);
|
||||
assert(saved_ambient_set);
|
||||
assert(ret_error_message);
|
||||
|
||||
/* Sets up various runtime parameters. Many of these initializations are conditionalized:
|
||||
@ -2506,7 +2506,7 @@ static int initialize_runtime(
|
||||
* system manager operation, because by default it starts with an empty ambient set.
|
||||
*
|
||||
* Preserve the ambient set for later use with sd-executor processes. */
|
||||
r = capability_get_ambient(original_ambient_set);
|
||||
r = capability_get_ambient(saved_ambient_set);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Failed to save ambient capabilities, ignoring: %m");
|
||||
|
||||
@ -3011,7 +3011,7 @@ int main(int argc, char *argv[]) {
|
||||
usec_t before_startup, after_startup;
|
||||
static char systemd[] = "systemd";
|
||||
const char *error_message = NULL;
|
||||
uint64_t original_ambient_set;
|
||||
uint64_t saved_ambient_set;
|
||||
int r, retval = EXIT_FAILURE;
|
||||
Manager *m = NULL;
|
||||
FDSet *fds = NULL;
|
||||
@ -3286,7 +3286,7 @@ int main(int argc, char *argv[]) {
|
||||
first_boot,
|
||||
&saved_rlimit_nofile,
|
||||
&saved_rlimit_memlock,
|
||||
&original_ambient_set,
|
||||
&saved_ambient_set,
|
||||
&error_message);
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
@ -3308,7 +3308,7 @@ int main(int argc, char *argv[]) {
|
||||
m->timestamps[manager_timestamp_initrd_mangle(MANAGER_TIMESTAMP_SECURITY_START)] = security_start_timestamp;
|
||||
m->timestamps[manager_timestamp_initrd_mangle(MANAGER_TIMESTAMP_SECURITY_FINISH)] = security_finish_timestamp;
|
||||
|
||||
m->original_ambient_set = original_ambient_set;
|
||||
m->saved_ambient_set = saved_ambient_set;
|
||||
|
||||
set_manager_defaults(m);
|
||||
set_manager_settings(m);
|
||||
@ -3385,7 +3385,7 @@ finish:
|
||||
fds,
|
||||
switch_root_dir,
|
||||
switch_root_init,
|
||||
original_ambient_set,
|
||||
saved_ambient_set,
|
||||
&error_message); /* This only returns if reexecution failed */
|
||||
|
||||
arg_serialization = safe_fclose(arg_serialization);
|
||||
|
@ -512,7 +512,7 @@ struct Manager {
|
||||
unsigned soft_reboots_count;
|
||||
|
||||
/* Original ambient capabilities when we were initialized */
|
||||
uint64_t original_ambient_set;
|
||||
uint64_t saved_ambient_set;
|
||||
};
|
||||
|
||||
static inline usec_t manager_default_timeout_abort_usec(Manager *m) {
|
||||
|
Loading…
Reference in New Issue
Block a user