From 5620102dfeb634f107bcfee46942065a0eed3cf6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 14 Feb 2024 19:33:38 +0100 Subject: [PATCH] os: move mitauth prototypes to separate header The MIT authentication handling isn't really OS specific, and only few sites actually need to call it, so at least it's prototypes are better off in some separate header. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xwin/winauth.c | 1 + os/auth.c | 1 + os/mitauth.c | 1 + os/mitauth.h | 13 +++++++++++++ os/osdep.h | 8 -------- 5 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 os/mitauth.h diff --git a/hw/xwin/winauth.c b/hw/xwin/winauth.c index 4e1b26d13..8d151c36a 100644 --- a/hw/xwin/winauth.c +++ b/hw/xwin/winauth.c @@ -38,6 +38,7 @@ /* Includes for authorization */ #include "securitysrv.h" #include "os/osdep.h" +#include "os/mitauth.h" #include diff --git a/os/auth.c b/os/auth.c index 9f33d86c2..6e3f53152 100644 --- a/os/auth.c +++ b/os/auth.c @@ -51,6 +51,7 @@ from The Open Group. #include "rpcauth.h" #include "xdmcp.h" #include "xdmauth.h" +#include "mitauth.h" struct protocol { unsigned short name_length; diff --git a/os/mitauth.c b/os/mitauth.c index eb5ca3998..44e3329c2 100644 --- a/os/mitauth.c +++ b/os/mitauth.c @@ -38,6 +38,7 @@ from The Open Group. #include #include "os.h" #include "osdep.h" +#include "mitauth.h" #include "dixstruct.h" static struct auth { diff --git a/os/mitauth.h b/os/mitauth.h new file mode 100644 index 000000000..d67a58c95 --- /dev/null +++ b/os/mitauth.h @@ -0,0 +1,13 @@ +#ifndef _XSERVER_OS_MITAUTH_H +#define _XSERVER_OS_MITAUTH_H + +#include "osdep.h" + +XID MitCheckCookie(AuthCheckArgs); +XID MitGenerateCookie(AuthGenCArgs); +int MitAddCookie(AuthAddCArgs); +int MitFromID(AuthFromIDArgs); +int MitRemoveCookie(AuthRemCArgs); +int MitResetCookie(AuthRstCArgs); + +#endif /* _XSERVER_OS_MITAUTH_H */ diff --git a/os/osdep.h b/os/osdep.h index 07d42d0c8..19a7430d9 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -154,12 +154,4 @@ extern Bool ComputeLocalClient(ClientPtr client); /* in auth.c */ extern void GenerateRandomData(int len, char *buf); -/* in mitauth.c */ -extern XID MitCheckCookie(AuthCheckArgs); -extern XID MitGenerateCookie(AuthGenCArgs); -extern int MitAddCookie(AuthAddCArgs); -extern int MitFromID(AuthFromIDArgs); -extern int MitRemoveCookie(AuthRemCArgs); -extern int MitResetCookie(AuthRstCArgs); - #endif /* _OSDEP_H_ */