1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

unix skt: default on

This commit is contained in:
Andy Green 2018-08-24 12:20:38 +08:00
parent a27dfb2a3e
commit 89902847a8
2 changed files with 6 additions and 4 deletions

View file

@ -27,7 +27,7 @@ option(LWS_WITH_HTTP2 "Compile with server support for HTTP/2" OFF)
option(LWS_WITH_LWSWS "Libwebsockets Webserver" OFF)
option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF)
option(LWS_IPV6 "Compile with support for ipv6" OFF)
option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" OFF)
option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" ON)
option(LWS_WITH_PLUGINS "Support plugins for protocols and extensions" OFF)
option(LWS_WITH_HTTP_PROXY "Support for rewriting HTTP proxying (requires libhubbub)" OFF)
option(LWS_WITH_ZIP_FOPS "Support serving pre-zipped files" OFF)

View file

@ -2593,9 +2593,11 @@ lws_socket_bind(struct lws_vhost *vhost, lws_sockfd_type sockfd, int port,
}
#if defined(LWS_WITH_UNIX_SOCK)
if (LWS_UNIX_SOCK_ENABLED(vhost) && vhost->context->uid) {
chown(serv_unix.sun_path, vhost->context->uid, vhost->context->gid);
}
if (LWS_UNIX_SOCK_ENABLED(vhost) && vhost->context->uid)
if (chown(serv_unix.sun_path, vhost->context->uid,
vhost->context->gid))
lwsl_notice("%s: chown for unix skt %s failed\n",
__func__, serv_unix.sun_path);
#endif
#ifndef LWS_PLAT_OPTEE