aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/unpcb.h
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2020-11-03 01:17:45 +0000
committerConrad Meyer <cem@FreeBSD.org>2020-11-03 01:17:45 +0000
commit2de07e4096e20e1ea18b42865972a12c37aa8e50 (patch)
tree2b73f73f8d57654e1b903c388fdd58eb60775abb /sys/sys/unpcb.h
parenta98f03786e468a83103ed1666a0ffbab8f7dcfb4 (diff)
downloadsrc-2de07e4096e20e1ea18b42865972a12c37aa8e50.tar.gz
src-2de07e4096e20e1ea18b42865972a12c37aa8e50.zip
unix(4): Add SOL_LOCAL:LOCAL_CREDS_PERSISTENT
This option is intended to be semantically identical to Linux's SOL_SOCKET:SO_PASSCRED. For now, it is mutually exclusive with the pre-existing sockopt SOL_LOCAL:LOCAL_CREDS. Reviewed by: markj (penultimate version) Differential Revision: https://reviews.freebsd.org/D27011
Notes
Notes: svn path=/head/; revision=367287
Diffstat (limited to 'sys/sys/unpcb.h')
-rw-r--r--sys/sys/unpcb.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/sys/unpcb.h b/sys/sys/unpcb.h
index 50a8beba8ec1..5944e83e96a0 100644
--- a/sys/sys/unpcb.h
+++ b/sys/sys/unpcb.h
@@ -107,10 +107,13 @@ struct unpcb {
* to determine whether the contents should be sent to the user or
* not.
*/
-#define UNP_HAVEPC 0x001
-#define UNP_WANTCRED 0x004 /* credentials wanted */
+#define UNP_HAVEPC 0x001
+#define UNP_WANTCRED_ALWAYS 0x002 /* credentials wanted always */
+#define UNP_WANTCRED_ONESHOT 0x004 /* credentials wanted once */
#define UNP_CONNWAIT 0x008 /* connect blocks until accepted */
+#define UNP_WANTCRED_MASK (UNP_WANTCRED_ONESHOT | UNP_WANTCRED_ALWAYS)
+
/*
* These flags are used to handle non-atomicity in connect() and bind()
* operations on a socket: in particular, to avoid races between multiple