mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
core: check the unit type more thoroughly when deserializing
Resolves: #27523
This commit is contained in:
parent
cc938f1ce0
commit
24e91e08f8
@ -6162,7 +6162,9 @@ int activation_details_deserialize(const char *key, const char *value, Activatio
|
||||
return -EINVAL;
|
||||
|
||||
t = unit_type_from_string(value);
|
||||
if (t == _UNIT_TYPE_INVALID)
|
||||
/* The activation details vtable has defined ops only for path
|
||||
* and timer units */
|
||||
if (!IN_SET(t, UNIT_PATH, UNIT_TIMER))
|
||||
return -EINVAL;
|
||||
|
||||
*details = malloc0(activation_details_vtable[t]->object_size);
|
||||
|
@ -0,0 +1,4 @@
|
||||
|
||||
d.socket
|
||||
job
|
||||
activation-details-unit-type=service
|
Loading…
Reference in New Issue
Block a user