From: Zbigniew Jędrzejewski-Szmek Date: Tue, 8 Jun 2021 14:58:30 +0000 (+0200) Subject: core/serialize: drop bogus deserialization of ipcns sockets X-Git-Tag: v249-rc1~39^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab18976b35347dc50732853c6bf28997020686e0;p=thirdparty%2Fsystemd.git core/serialize: drop bogus deserialization of ipcns sockets a70581ffb5c13c91c76ff73ba6f5f3ff59c5a915 added 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 before e8a565cb660a7a11f76180fe441ba8e4f9383771. There was never any code which would serialize ExecRuntime.ipcns_storage_socket[] this way, so the deserialization attempts are pointless. --- diff --git a/src/core/execute.c b/src/core/execute.c index 8450bb05552..5c958b327b9 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -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;