core/serialize: drop bogus deserialization of ipcns sockets
a70581ffb5added ExecRuntime.ipcns_storage_socket[], and serialization in exec_runtime_serialize(), and deserialization in exec_runtime_deserialize_one(), but also deserialization in exec_runtime_deserialize_compat(). exec_runtime_deserialize_compat() is for deserializating ExecRuntime when it was serialized as part of the unit beforee8a565cb66. There was never any code which would serialize ExecRuntime.ipcns_storage_socket[] this way, so the deserialization attempts are pointless.
This commit is contained in:
@@ -6412,27 +6412,6 @@ int exec_runtime_deserialize_compat(Unit *u, const char *key, const char *value,
|
||||
safe_close(rt->netns_storage_socket[1]);
|
||||
rt->netns_storage_socket[1] = fdset_remove(fds, fd);
|
||||
|
||||
} else if (streq(key, "ipcns-socket-0")) {
|
||||
int fd;
|
||||
|
||||
if (safe_atoi(value, &fd) < 0 || !fdset_contains(fds, fd)) {
|
||||
log_unit_debug(u, "Failed to parse ipcns socket value: %s", value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
safe_close(rt->ipcns_storage_socket[0]);
|
||||
rt->ipcns_storage_socket[0] = fdset_remove(fds, fd);
|
||||
|
||||
} else if (streq(key, "ipcns-socket-1")) {
|
||||
int fd;
|
||||
|
||||
if (safe_atoi(value, &fd) < 0 || !fdset_contains(fds, fd)) {
|
||||
log_unit_debug(u, "Failed to parse ipcns socket value: %s", value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
safe_close(rt->ipcns_storage_socket[1]);
|
||||
rt->ipcns_storage_socket[1] = fdset_remove(fds, fd);
|
||||
} else
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user