diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2014-05-18 11:42:26 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2014-05-18 11:42:26 +0200 |
commit | 05476c4d04a24bdb26fa64e05ab31bc36118f34e (patch) | |
tree | e775f059cfb4bb027c444bb53eb9356e643082c8 /sysdep/unix/main.c | |
parent | 1149aa977d906a6400f998d5f6600871584395d0 (diff) |
IPv4/IPv6 integrated socket code.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r-- | sysdep/unix/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 31094c52..61b306dc 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -463,7 +463,12 @@ cli_init_unix(uid_t use_uid, gid_t use_gid) s->type = SK_UNIX_PASSIVE; s->rx_hook = cli_connect; s->rbsize = 1024; - sk_open_unix(s, path_control_socket); + + /* Return value intentionally ignored */ + unlink(path_control_socket); + + if (sk_open_unix(s, path_control_socket) < 0) + die("Cannot create control socket %s: %m", path_control_socket); if (use_uid || use_gid) if (chown(path_control_socket, use_uid, use_gid) < 0) |