service: require KillMode=control-group when PAM is enabled

This commit is contained in:
Lennart Poettering
2010-06-19 16:57:54 +02:00
parent 399ab2b1ac
commit 4d0e5dbd52
3 changed files with 17 additions and 2 deletions
+6 -1
View File
@@ -153,7 +153,12 @@ static int socket_verify(Socket *s) {
}
if (s->accept && s->max_connections <= 0) {
log_error("%s's MaxConnection setting too small. Refusing.", UNIT(s)->meta.id);
log_error("%s's MaxConnection setting too small. Refusing.", s->meta.id);
return -EINVAL;
}
if (s->exec_context.pam_name && s->kill_mode != KILL_CONTROL_GROUP) {
log_error("%s has PAM enabled. Kill mode must be set to 'control-group'. Refusing.", s->meta.id);
return -EINVAL;
}