core: make mount(8) and swapon(8) inherit SMACK label from systemd
By default mount(8), umount(8), swapon(8) and swapoff(8) should run with with the SMACK label inherited from systemd rather than the default one meant for services. Fixes:aa5ae9711eFollow-up-for:20bbf5ee4c
This commit is contained in:
committed by
Lennart Poettering
parent
58ada3eab2
commit
8144537a81
@@ -876,6 +876,9 @@ static int mount_spawn(Mount *m, ExecCommand *c, PidRef *ret_pid) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
/* Assume the label inherited from systemd as the fallback */
|
||||
exec_params.fallback_smack_process_label = NULL;
|
||||
|
||||
r = exec_spawn(UNIT(m),
|
||||
c,
|
||||
&m->exec_context,
|
||||
|
||||
@@ -642,6 +642,9 @@ static int swap_spawn(Swap *s, ExecCommand *c, PidRef *ret_pid) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
/* Assume the label inherited from systemd as the fallback */
|
||||
exec_params.fallback_smack_process_label = NULL;
|
||||
|
||||
r = exec_spawn(UNIT(s),
|
||||
c,
|
||||
&s->exec_context,
|
||||
|
||||
Reference in New Issue
Block a user