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:
Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment