diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-17 15:32:02 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-23 15:09:13 +0900 |
commit | fbbb9697b64286e70cd99fa7d56a9bc9c61ddc8e (patch) | |
tree | a5f9dfdfb3f11918a0c9f652bb43b82113002a23 /src/core/socket.c | |
parent | 06b3a2f6f06697e6870b131dce1f3f7422d549d1 (diff) | |
download | systemd-fbbb9697b64286e70cd99fa7d56a9bc9c61ddc8e.tar.gz |
core/execute: introduce exec_needs_network_namespace() helper function
Diffstat (limited to 'src/core/socket.c')
-rw-r--r-- | src/core/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index 8241ba050b..3dd726d52a 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -1494,7 +1494,7 @@ static int fork_needed(const SocketAddress *address, const ExecContext *context) return true; } - return context->private_network || context->network_namespace_path; + return exec_needs_network_namespace(context); } static int socket_address_listen_in_cgroup( @@ -1557,7 +1557,7 @@ static int socket_address_listen_in_cgroup( pair[0] = safe_close(pair[0]); - if ((s->exec_context.private_network || s->exec_context.network_namespace_path) && + if (exec_needs_network_namespace(&s->exec_context) && s->exec_runtime && s->exec_runtime->netns_storage_socket[0] >= 0) { |