mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00: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;
|
return -EINVAL;
|
||||||
|
|
||||||
t = unit_type_from_string(value);
|
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;
|
return -EINVAL;
|
||||||
|
|
||||||
*details = malloc0(activation_details_vtable[t]->object_size);
|
*details = malloc0(activation_details_vtable[t]->object_size);
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
d.socket
|
||||||
|
job
|
||||||
|
activation-details-unit-type=service
|
Loading…
Reference in a new issue