smack: Add DefaultSmackProcessLabel to user.conf and system.conf
DefaultSmackProcessLabel tells systemd what label to assign to its child process in case SmackProcessLabel is not set in the service file. By default, when DefaultSmackProcessLabel is not set child processes inherit label from systemd. If DefaultSmackProcessLabel is set to "/" (which is an invalid character for a SMACK label) the DEFAULT_SMACK_PROCESS_LABEL set during compilation is ignored and systemd act as if the option was unset.
This commit is contained in:
committed by
Luca Boccassi
parent
8880c3be82
commit
aa5ae9711e
@@ -457,6 +457,8 @@ struct Manager {
|
||||
|
||||
/* Reference to RestrictFileSystems= BPF program */
|
||||
struct restrict_fs_bpf *restrict_fs;
|
||||
|
||||
char *default_smack_process_label;
|
||||
};
|
||||
|
||||
static inline usec_t manager_default_timeout_abort_usec(Manager *m) {
|
||||
@@ -509,6 +511,8 @@ int manager_transient_environment_add(Manager *m, char **plus);
|
||||
int manager_client_environment_modify(Manager *m, char **minus, char **plus);
|
||||
int manager_get_effective_environment(Manager *m, char ***ret);
|
||||
|
||||
int manager_set_default_smack_process_label(Manager *m, const char *label);
|
||||
|
||||
int manager_set_default_rlimits(Manager *m, struct rlimit **default_rlimit);
|
||||
|
||||
void manager_trigger_run_queue(Manager *m);
|
||||
|
||||
Reference in New Issue
Block a user