]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/serialize: drop bogus deserialization of ipcns sockets 19864/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Jun 2021 14:58:30 +0000 (16:58 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 10 Jun 2021 12:17:58 +0000 (14:17 +0200)
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.

src/core/execute.c

index 8450bb05552b0cb87165756642e9b6bda929bc27..5c958b327b9c9a924af96435bb12ad1d91678014 100644 (file)
@@ -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;