This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] Cygwin: Define SO_PASSCRED and SCM_CREDENTIALS
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 23 Feb 2018 20:02:27 -0000
- Subject: [newlib-cygwin] Cygwin: Define SO_PASSCRED and SCM_CREDENTIALS
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c70761df66d7313fd875c7a342304b07b1788889
commit c70761df66d7313fd875c7a342304b07b1788889
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Fri Feb 23 21:00:17 2018 +0100
Cygwin: Define SO_PASSCRED and SCM_CREDENTIALS
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/include/asm/socket.h | 1 +
winsup/cygwin/include/cygwin/socket.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/include/asm/socket.h b/winsup/cygwin/include/asm/socket.h
index 712a460..9aeb889 100644
--- a/winsup/cygwin/include/asm/socket.h
+++ b/winsup/cygwin/include/asm/socket.h
@@ -58,6 +58,7 @@ details. */
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
#define SO_DONTLINGER (unsigned int)(~SO_LINGER)
#define SO_PEERCRED 0x0200 /* same as getpeereid */
+#define SO_PASSCRED 0x0400 /* enable receiving of credentials */
/*
* Additional options.
diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h
index 15e1327..79c9259 100644
--- a/winsup/cygwin/include/cygwin/socket.h
+++ b/winsup/cygwin/include/cygwin/socket.h
@@ -107,7 +107,8 @@ struct cmsghdr
((unsigned char *) ((struct cmsghdr *)(cmsg) + 1))
/* "Socket"-level control message types: */
-#define SCM_RIGHTS 0x01 /* access rights (array of int) */
+#define SCM_RIGHTS 0x01 /* descriptor passing (array of int) */
+#define SCM_CREDENTIALS 0x02 /* credential passing (struct ucred) */
#ifdef __INSIDE_CYGWIN__
/* Definition of struct msghdr up to release 1.5.18 */