tree-wide: remove support for kernels lacking ambient caps

Let's bump the kernel baseline a bit to 4.3 and thus require ambient
caps.

This allows us to remove support for a variety of special casing, most
importantly the ExecStart=!! hack.
This commit is contained in:
Lennart Poettering
2024-12-17 17:34:46 +01:00
parent 96ec3911f3
commit 00a415fc8f
18 changed files with 70 additions and 134 deletions
+2 -2
View File
@@ -2811,7 +2811,7 @@ static int drop_capabilities(uid_t uid) {
if (q.permitted == UINT64_MAX)
q.permitted = uid == 0 ? q.bounding : arg_caps_ambient;
if (q.ambient == UINT64_MAX && ambient_capabilities_supported())
if (q.ambient == UINT64_MAX)
q.ambient = arg_caps_ambient;
if (capability_quintet_mangle(&q))
@@ -2823,7 +2823,7 @@ static int drop_capabilities(uid_t uid) {
.effective = uid == 0 ? arg_caps_retain : 0,
.inheritable = uid == 0 ? arg_caps_retain : arg_caps_ambient,
.permitted = uid == 0 ? arg_caps_retain : arg_caps_ambient,
.ambient = ambient_capabilities_supported() ? arg_caps_ambient : UINT64_MAX,
.ambient = arg_caps_ambient,
};
/* If we're not using OCI, proceed with mangled capabilities (so we don't error out)