|
|
2d3b65 |
From ef1035d9d86464ea0b5dde60a7a0e190895fdf5b Mon Sep 17 00:00:00 2001
|
|
|
2d3b65 |
From: Simon McVittie <smcv@collabora.com>
|
|
|
2d3b65 |
Date: Mon, 14 Oct 2019 08:22:24 +0100
|
|
|
2d3b65 |
Subject: [PATCH] gcredentialsprivate: Document the various private macros
|
|
|
2d3b65 |
|
|
|
2d3b65 |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
|
2d3b65 |
---
|
|
|
2d3b65 |
gio/gcredentialsprivate.h | 59 +++++++++++++++++++++++++++++++++++++++
|
|
|
2d3b65 |
1 file changed, 59 insertions(+)
|
|
|
2d3b65 |
|
|
|
2d3b65 |
diff --git a/gio/gcredentialsprivate.h b/gio/gcredentialsprivate.h
|
|
|
2d3b65 |
index 4d1c420a8..06f0aed19 100644
|
|
|
2d3b65 |
--- a/gio/gcredentialsprivate.h
|
|
|
2d3b65 |
+++ b/gio/gcredentialsprivate.h
|
|
|
2d3b65 |
@@ -22,6 +22,65 @@
|
|
|
2d3b65 |
#include "gio/gcredentials.h"
|
|
|
2d3b65 |
#include "gio/gnetworking.h"
|
|
|
2d3b65 |
|
|
|
2d3b65 |
+/*
|
|
|
2d3b65 |
+ * G_CREDENTIALS_SUPPORTED:
|
|
|
2d3b65 |
+ *
|
|
|
2d3b65 |
+ * Defined to 1 if GCredentials works.
|
|
|
2d3b65 |
+ */
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_SUPPORTED
|
|
|
2d3b65 |
+
|
|
|
2d3b65 |
+/*
|
|
|
2d3b65 |
+ * G_CREDENTIALS_USE_LINUX_UCRED, etc.:
|
|
|
2d3b65 |
+ *
|
|
|
2d3b65 |
+ * Defined to 1 if GCredentials uses Linux `struct ucred`, etc.
|
|
|
2d3b65 |
+ */
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_USE_LINUX_UCRED
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_USE_FREEBSD_CMSGCRED
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_USE_NETBSD_UNPCBID
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_USE_SOLARIS_UCRED
|
|
|
2d3b65 |
+
|
|
|
2d3b65 |
+/*
|
|
|
2d3b65 |
+ * G_CREDENTIALS_NATIVE_TYPE:
|
|
|
2d3b65 |
+ *
|
|
|
2d3b65 |
+ * Defined to one of G_CREDENTIALS_TYPE_LINUX_UCRED, etc.
|
|
|
2d3b65 |
+ */
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_NATIVE_TYPE
|
|
|
2d3b65 |
+
|
|
|
2d3b65 |
+/*
|
|
|
2d3b65 |
+ * G_CREDENTIALS_NATIVE_SIZE:
|
|
|
2d3b65 |
+ *
|
|
|
2d3b65 |
+ * Defined to the size of the %G_CREDENTIALS_NATIVE_TYPE
|
|
|
2d3b65 |
+ */
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_NATIVE_SIZE
|
|
|
2d3b65 |
+
|
|
|
2d3b65 |
+/*
|
|
|
2d3b65 |
+ * G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED:
|
|
|
2d3b65 |
+ *
|
|
|
2d3b65 |
+ * Defined to 1 if we have a message-passing API in which credentials
|
|
|
2d3b65 |
+ * are attached to a particular message, such as `SCM_CREDENTIALS` on Linux
|
|
|
2d3b65 |
+ * or `SCM_CREDS` on FreeBSD.
|
|
|
2d3b65 |
+ */
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED
|
|
|
2d3b65 |
+
|
|
|
2d3b65 |
+/*
|
|
|
2d3b65 |
+ * G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED:
|
|
|
2d3b65 |
+ *
|
|
|
2d3b65 |
+ * Defined to 1 if we have a `getsockopt()`-style API in which one end of
|
|
|
2d3b65 |
+ * a socket connection can directly query the credentials of the process
|
|
|
2d3b65 |
+ * that initiated the other end, such as `getsockopt SO_PEERCRED` on Linux
|
|
|
2d3b65 |
+ * or `getpeereid()` on multiple operating systems.
|
|
|
2d3b65 |
+ */
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED
|
|
|
2d3b65 |
+
|
|
|
2d3b65 |
+/*
|
|
|
2d3b65 |
+ * G_CREDENTIALS_SPOOFING_SUPPORTED:
|
|
|
2d3b65 |
+ *
|
|
|
2d3b65 |
+ * Defined to 1 if privileged processes can spoof their credentials when
|
|
|
2d3b65 |
+ * using the message-passing API.
|
|
|
2d3b65 |
+ */
|
|
|
2d3b65 |
+#undef G_CREDENTIALS_SPOOFING_SUPPORTED
|
|
|
2d3b65 |
+
|
|
|
2d3b65 |
#ifdef __linux__
|
|
|
2d3b65 |
#define G_CREDENTIALS_SUPPORTED 1
|
|
|
2d3b65 |
#define G_CREDENTIALS_USE_LINUX_UCRED 1
|
|
|
2d3b65 |
--
|
|
|
2d3b65 |
2.23.0
|
|
|
2d3b65 |
|