X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsocket.c;h=7a8624c848fc962495eeb90371aab6863137c077;hb=b1fc29fb70de560fe9a7a744a20a67aaa4b68b5f;hp=ccbe4326c160dc5b0903f26e4e6e3e976cf170f1;hpb=4cd1fbcc0648a289e9bf9d9047621bbdf7ec0ece;p=elogind.git diff --git a/src/socket.c b/src/socket.c index ccbe4326c..7a8624c84 100644 --- a/src/socket.c +++ b/src/socket.c @@ -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; }