mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
_listen_unix_ports: error when remove fails
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -267,7 +267,12 @@ int _listen_unix_ports(void *pool, struct perm_cfg_st* config,
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sa.sun_family = AF_UNIX;
|
||||
strlcpy(sa.sun_path, config->unix_conn_file, sizeof(sa.sun_path));
|
||||
remove(sa.sun_path);
|
||||
if (remove(sa.sun_path) != 0) {
|
||||
e = errno;
|
||||
fprintf(stderr, "could not remove unix domain socket['%s']: %s", sa.sun_path,
|
||||
strerror(e));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (config->foreground != 0)
|
||||
fprintf(stderr, "listening (UNIX) on %s...\n",
|
||||
|
||||
Reference in New Issue
Block a user