Skip to content
Commit 155eb72b authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov
Browse files

unix: don't drop the path on unix sockets if they don't exist



For standalone unix sockets, listen() will fail if we haven't called bind()
with an actual address. If we remove the name on dump, we won't call
bind(), and thus sockets in this state will fail to restore.

v2: temporarily rename a unix socket out of the way if necessary in order
    to bind() correctly and then delete it (e.g. when there are two unix
    sockets bound "on top" of each other)
v3: remove extra unlink(), do the real unlink() in bind_unix_sk() so we
    only need to do it once

Signed-off-by: default avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent daeb9129
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment