From 5f19eab1ee7178a43b241ca8e246463dd1f0b291 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 28 Feb 2024 18:33:44 +0100 Subject: [PATCH] os: unexport local client creds handling these functions aren't used by modules, so no need to export them. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- Xext/shm.c | 1 + dix/grabs.c | 1 + dix/window.c | 2 ++ include/os.h | 21 --------------------- os/access.c | 2 ++ os/auth.c | 2 ++ os/auth.h | 18 ++++++++++++++++++ os/client.c | 2 ++ os/connection.c | 1 + 9 files changed, 29 insertions(+), 21 deletions(-) diff --git a/Xext/shm.c b/Xext/shm.c index 00cf12a0b..295866480 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -44,6 +44,7 @@ in this Software without prior written authorization from The Open Group. #include #include +#include "os/auth.h" #include "os/busfault.h" #include "misc.h" diff --git a/dix/grabs.c b/dix/grabs.c index 42ff04a8b..96231a12c 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -55,6 +55,7 @@ SOFTWARE. #include #include "dix/dix_priv.h" +#include "os/auth.h" #include "windowstr.h" #include "inputstr.h" diff --git a/dix/window.c b/dix/window.c index 284aa6dd7..8a5144eae 100644 --- a/dix/window.c +++ b/dix/window.c @@ -100,6 +100,8 @@ Equipment Corporation. #include #endif +#include "os/auth.h" + #include "misc.h" #include "scrnintstr.h" #include "os.h" diff --git a/include/os.h b/include/os.h index fffe8eb40..94ddb6ba4 100644 --- a/include/os.h +++ b/include/os.h @@ -354,27 +354,6 @@ typedef struct sockaddr *sockaddrPtr; extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client); -#define LCC_UID_SET (1 << 0) -#define LCC_GID_SET (1 << 1) -#define LCC_PID_SET (1 << 2) -#define LCC_ZID_SET (1 << 3) - -typedef struct { - int fieldsSet; /* Bit mask of fields set */ - int euid; /* Effective uid */ - int egid; /* Primary effective group id */ - int nSuppGids; /* Number of supplementary group ids */ - int *pSuppGids; /* Array of supplementary group ids */ - int pid; /* Process id */ - int zoneid; /* Only set on Solaris 10 & later */ -} LocalClientCredRec; - -extern _X_EXPORT int -GetLocalClientCreds(ClientPtr, LocalClientCredRec **); - -extern _X_EXPORT void -FreeLocalClientCreds(LocalClientCredRec *); - extern _X_EXPORT int ChangeAccessControl(ClientPtr /*client */ , int /*fEnabled */ ); diff --git a/os/access.c b/os/access.c index cf784248d..3a2c38256 100644 --- a/os/access.c +++ b/os/access.c @@ -187,6 +187,8 @@ SOFTWARE. #define X_INCLUDE_NETDB_H #include +#include "os/auth.h" + #include "dixstruct.h" #include "osdep.h" diff --git a/os/auth.c b/os/auth.c index 6e3f53152..20752eeb5 100644 --- a/os/auth.c +++ b/os/auth.c @@ -48,6 +48,8 @@ from The Open Group. #endif #include /* for arc4random_buf() */ +#include "os/auth.h" + #include "rpcauth.h" #include "xdmcp.h" #include "xdmauth.h" diff --git a/os/auth.h b/os/auth.h index 576fba269..3b9f07fef 100644 --- a/os/auth.h +++ b/os/auth.h @@ -30,4 +30,22 @@ int set_font_authorizations(char **authorizations, int *authlen, void *client); +#define LCC_UID_SET (1 << 0) +#define LCC_GID_SET (1 << 1) +#define LCC_PID_SET (1 << 2) +#define LCC_ZID_SET (1 << 3) + +typedef struct { + int fieldsSet; /* Bit mask of fields set */ + int euid; /* Effective uid */ + int egid; /* Primary effective group id */ + int nSuppGids; /* Number of supplementary group ids */ + int *pSuppGids; /* Array of supplementary group ids */ + int pid; /* Process id */ + int zoneid; /* Only set on Solaris 10 & later */ +} LocalClientCredRec; + +int GetLocalClientCreds(ClientPtr, LocalClientCredRec **); +void FreeLocalClientCreds(LocalClientCredRec *); + #endif /* _XSERVER_OS_AUTH_H */ diff --git a/os/client.c b/os/client.c index 3295949a4..6a119afc1 100644 --- a/os/client.c +++ b/os/client.c @@ -84,6 +84,8 @@ #include #endif +#include "os/auth.h" + /** * Try to determine a PID for a client from its connection * information. This should be called only once when new client has diff --git a/os/connection.c b/os/connection.c index aad3e74fb..9a4a16847 100644 --- a/os/connection.c +++ b/os/connection.c @@ -100,6 +100,7 @@ SOFTWARE. #include "dix/dix_priv.h" #include "os/audit.h" +#include "os/auth.h" #include "misc.h" /* for typedef of pointer */ #include "osdep.h"