execute: respect selinux_context_ignore
authorTopi Miettinen <toiwoton@gmail.com>
Sat, 30 Oct 2021 16:58:41 +0000 (19:58 +0300)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 31 Oct 2021 23:28:41 +0000 (08:28 +0900)
commit2ad2925de5f258d128ec8cdb07f10f3c52fa4fcf
treeb250d13a2ae163152cb68994a139bcc81886ea1f
parent6b64d740915e4f14ab090ad572fac53d7c83649e
execute: respect selinux_context_ignore

When `SELinuxContext=` parameter is prefixed with `-`, the documentation states
that any errors determining or changing context should be ignored, but this
doesn't actually happen and the service may fail with `229/SELINUX_CONTEXT`.

Fix by adding checks to `context->selinux_context_ignore`.

Closes: #21057
src/core/execute.c