summaryrefslogtreecommitdiffstats
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-08-25 23:42:07 +0200
committerMike Yuan <me@yhndnzj.com>2024-08-26 14:52:25 +0200
commit2234032c47f0abaf59e93b2a42ee926f9233f05c (patch)
tree541eae8d4dd44166c20d92f9a378db46d7f27306 /src/core/socket.c
parentcore/socket: refuse MaxConnection=0 for Accept=no sockets too (diff)
downloadsystemd-2234032c47f0abaf59e93b2a42ee926f9233f05c.tar.xz
systemd-2234032c47f0abaf59e93b2a42ee926f9233f05c.zip
core: move check for combination of PAMName= + KillMode= to unit_verify_contexts()
While at it, allow "mixed" for all unit types too, i.e. also apply ebc2259da1d1579347b86fc2ebca9f96334b6f22 to socket/mount/swap units.
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 88c92876a1..333079277b 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -419,9 +419,6 @@ static int socket_verify(Socket *s) {
if (s->accept && UNIT_ISSET(s->service))
return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Explicit service configuration for accepting socket units not supported. Refusing.");
- if (s->exec_context.pam_name && s->kill_context.kill_mode != KILL_CONTROL_GROUP)
- return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Unit has PAM enabled. Kill mode must be set to 'control-group'. Refusing.");
-
if (!strv_isempty(s->symlinks) && !socket_find_symlink_target(s))
return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Unit has symlinks set but none or more than one node in the file system. Refusing.");