test(m, "exec-runtimedirectory-owner.service", 0, CLD_EXITED);
else if (streq(NOBODY_GROUP_NAME, "nfsnobody"))
test(m, "exec-runtimedirectory-owner-nfsnobody.service", 0, CLD_EXITED);
+ else if (streq(NOBODY_GROUP_NAME, "nogroup"))
+ test(m, "exec-runtimedirectory-owner-nogroup.service", 0, CLD_EXITED);
else
log_error("Unsupported nobody group name '%s', skipping %s", NOBODY_GROUP_NAME, __func__);
}
test-execute/exec-restrictnamespaces-yes.service
test-execute/exec-runtimedirectory-mode.service
test-execute/exec-runtimedirectory-owner-nfsnobody.service
+ test-execute/exec-runtimedirectory-owner-nogroup.service
test-execute/exec-runtimedirectory-owner.service
test-execute/exec-runtimedirectory.service
test-execute/exec-specifier-interpolation.service
--- /dev/null
+[Unit]
+Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set)
+
+[Service]
+ExecStart=/bin/sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nogroup"'
+Type=oneshot
+Group=nogroup
+User=root
+RuntimeDirectory=test-exec_runtimedirectory-owner