From 5ab47e210de76d29cffbc9ea47800775a3627210 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 24 Nov 2024 13:04:34 -0800 Subject: 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. --- include/nng/nng.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/nng/nng.h b/include/nng/nng.h index ecb45c80..3d762ee6 100644 --- a/include/nng/nng.h +++ b/include/nng/nng.h @@ -378,6 +378,7 @@ NNG_DECL int nng_listener_set_ms(nng_listener, const char *, nng_duration); NNG_DECL int nng_listener_set_addr( nng_listener, const char *, const nng_sockaddr *); NNG_DECL int nng_listener_set_tls(nng_listener, nng_tls_config *); +NNG_DECL int nng_listener_set_security_descriptor(nng_listener, void *); NNG_DECL int nng_listener_get_url(nng_listener id, const nng_url **urlp); NNG_DECL int nng_listener_get_bool(nng_listener, const char *, bool *); @@ -795,11 +796,6 @@ NNG_DECL nng_listener nng_pipe_listener(nng_pipe); // IPC options. These will largely vary depending on the platform, // as POSIX systems have very different options than Windows. -// Security Descriptor. This option may only be set on listeners -// on the Windows platform, where the object is a pointer to a -// a Windows SECURITY_DESCRIPTOR. -#define NNG_OPT_IPC_SECURITY_DESCRIPTOR "ipc:security-descriptor" - // Permissions bits. This option is only valid for listeners on // POSIX platforms and others that honor UNIX style permission bits. // Note that some platforms may not honor the permissions here, although @@ -1239,6 +1235,11 @@ NNG_DECL int nng_stream_listener_get_tls( NNG_DECL int nng_stream_listener_set_tls( nng_stream_listener *, nng_tls_config *); +// Security Descriptor only valid for IPC streams on Windows +// Parameter is a PSECURITY_DESCRIPTOR. +NNG_DECL int nng_stream_listener_set_security_descriptor( + nng_stream_listener *, void *); + // UDP operations. These are provided for convenience, // and should be considered somewhat experimental. -- cgit v1.2.3-70-g09d2