aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport/ipc/ipc.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-24 13:04:34 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-24 13:04:34 -0800
commit5ab47e210de76d29cffbc9ea47800775a3627210 (patch)
tree8138498b3efd5e81b96503bb14d2f79519905a88 /src/sp/transport/ipc/ipc.c
parenta2b6d6a544aa9934c87a6d54591faff18179858d (diff)
downloadnng-5ab47e210de76d29cffbc9ea47800775a3627210.tar.gz
nng-5ab47e210de76d29cffbc9ea47800775a3627210.tar.bz2
nng-5ab47e210de76d29cffbc9ea47800775a3627210.zip
Remove the NNG_OPT_IPC_SECURITY_DESCRIPTOR option.
This is now replaced with nng_listener_set_security_descriptor and nng_stream_listener_set_security_descriptor functions. We may elect to remove these entirely, but for named pipe users they are probably still quite useful. Moving towards UNIX domain sockets would obsolete this functionality.
Diffstat (limited to 'src/sp/transport/ipc/ipc.c')
-rw-r--r--src/sp/transport/ipc/ipc.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/sp/transport/ipc/ipc.c b/src/sp/transport/ipc/ipc.c
index 69efa741..803c4b4b 100644
--- a/src/sp/transport/ipc/ipc.c
+++ b/src/sp/transport/ipc/ipc.c
@@ -13,6 +13,7 @@
#include "core/defs.h"
#include "core/nng_impl.h"
+#include "nng/nng.h"
// IPC transport. Platform specific IPC operations must be
// supplied as well. Normally the IPC is UNIX domain sockets or
@@ -1106,6 +1107,15 @@ ipc_listener_set(
return (rv);
}
+static int
+ipc_listener_set_sec_desc(void *arg, void *pdesc)
+{
+ ipc_ep *ep = arg;
+
+ return (
+ nng_stream_listener_set_security_descriptor(ep->listener, pdesc));
+}
+
static nni_sp_dialer_ops ipc_dialer_ops = {
.d_init = ipc_ep_init_dialer,
.d_fini = ipc_ep_fini,
@@ -1116,13 +1126,14 @@ static nni_sp_dialer_ops ipc_dialer_ops = {
};
static nni_sp_listener_ops ipc_listener_ops = {
- .l_init = ipc_ep_init_listener,
- .l_fini = ipc_ep_fini,
- .l_bind = ipc_ep_bind,
- .l_accept = ipc_ep_accept,
- .l_close = ipc_ep_close,
- .l_getopt = ipc_listener_get,
- .l_setopt = ipc_listener_set,
+ .l_init = ipc_ep_init_listener,
+ .l_fini = ipc_ep_fini,
+ .l_bind = ipc_ep_bind,
+ .l_accept = ipc_ep_accept,
+ .l_close = ipc_ep_close,
+ .l_getopt = ipc_listener_get,
+ .l_setopt = ipc_listener_set,
+ .l_set_security_descriptor = ipc_listener_set_sec_desc,
};
static nni_sp_tran ipc_tran = {