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
View File
@@ -315,8 +315,6 @@ int main(int argc, char *argv[]) {
test_last_cap_file();
test_last_cap_probe();
log_info("have ambient caps: %s", yes_no(ambient_capabilities_supported()));
if (getuid() != 0)
return log_tests_skipped("not running as root");
+2 -3
View File
@@ -422,7 +422,6 @@ TEST(exec_command_flags_from_strv) {
assert_se(FLAGS_SET(flags, EXEC_COMMAND_NO_ENV_EXPAND));
assert_se(FLAGS_SET(flags, EXEC_COMMAND_NO_SETUID));
assert_se(FLAGS_SET(flags, EXEC_COMMAND_IGNORE_FAILURE));
assert_se(!FLAGS_SET(flags, EXEC_COMMAND_AMBIENT_MAGIC));
assert_se(!FLAGS_SET(flags, EXEC_COMMAND_FULLY_PRIVILEGED));
r = exec_command_flags_from_strv(invalid_strv, &flags);
@@ -433,8 +432,8 @@ TEST(exec_command_flags_from_strv) {
TEST(exec_command_flags_to_strv) {
_cleanup_strv_free_ char **opts = NULL;
ASSERT_OK(exec_command_flags_to_strv(EXEC_COMMAND_AMBIENT_MAGIC|EXEC_COMMAND_NO_ENV_EXPAND|EXEC_COMMAND_IGNORE_FAILURE, &opts));
assert_se(strv_equal(opts, STRV_MAKE("ignore-failure", "ambient", "no-env-expand")));
ASSERT_OK(exec_command_flags_to_strv(EXEC_COMMAND_NO_ENV_EXPAND|EXEC_COMMAND_IGNORE_FAILURE, &opts));
assert_se(strv_equal(opts, STRV_MAKE("ignore-failure", "no-env-expand")));
opts = strv_free(opts);