]> granicus.if.org Git - curl/commit
unix_socket: add support for abstract unix domain socket
authorIsaac Boukris <iboukris@gmail.com>
Sun, 8 Jan 2017 22:51:08 +0000 (00:51 +0200)
committerPeter Wu <peter@lekensteyn.nl>
Fri, 13 Jan 2017 15:25:20 +0000 (16:25 +0100)
commit1d786faee1046ff90e71252aeef4a997c3bf0d8d
tree325ebddb13f12be61a28062c2f06980e2a34754a
parenta7c73ae309c03bd84b28659421ac613e503565ce
unix_socket: add support for abstract unix domain socket

In addition to unix domain sockets, Linux also supports an
abstract namespace which is independent of the filesystem.

In order to support it, add new CURLOPT_ABSTRACT_UNIX_SOCKET
option which uses the same storage as CURLOPT_UNIX_SOCKET_PATH
internally, along with a flag to specify abstract socket.

On non-supporting platforms, the abstract address will be
interpreted as an empty string and fail gracefully.

Also add new --abstract-unix-socket tool parameter.

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Reported-by: Chungtsun Li (typeless)
Reviewed-by: Daniel Stenberg
Reviewed-by: Peter Wu
Closes #1197
Fixes #1061
17 files changed:
docs/cmdline-opts/Makefile.am
docs/cmdline-opts/abstract-unix-socket.d [new file with mode: 0644]
docs/curl.1
docs/libcurl/curl_easy_setopt.3
docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 [new file with mode: 0644]
docs/libcurl/opts/Makefile.am
docs/libcurl/symbols-in-versions
include/curl/curl.h
include/curl/typecheck-gcc.h
lib/curl_addrinfo.c
lib/curl_addrinfo.h
lib/url.c
lib/urldata.h
src/tool_cfgable.h
src/tool_getparam.c
src/tool_help.c
src/tool_operate.c