mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-20 21:50:23 +07:00
service: require KillMode=control-group when PAM is enabled
This commit is contained in:
parent
399ab2b1ac
commit
4d0e5dbd52
@ -303,6 +303,11 @@ static int mount_verify(Mount *m) {
|
||||
return -EBADMSG;
|
||||
}
|
||||
|
||||
if (m->exec_context.pam_name && m->kill_mode != KILL_CONTROL_GROUP) {
|
||||
log_error("%s has PAM enabled. Kill mode must be set to 'control-group'. Refusing.", m->meta.id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -817,7 +817,12 @@ static int service_verify(Service *s) {
|
||||
}
|
||||
|
||||
if (s->type == SERVICE_DBUS && !s->bus_name) {
|
||||
log_error("%s is of type D-Bus but no D-Bus service name has been specified. Refusing.", UNIT(s)->meta.id);
|
||||
log_error("%s is of type D-Bus but no D-Bus service name has been specified. 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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user