From 8c4759a68e335bc17eb0b5cf8a3998e128c7b265 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 14 Feb 2024 19:24:31 +0100 Subject: [PATCH] os: move xdmauth prototypes to separate header The xdmcp 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: --- os/auth.c | 1 + os/osdep.h | 10 ---------- os/xdmauth.c | 1 + os/xdmauth.h | 13 +++++++++++++ os/xdmcp.c | 1 + 5 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 os/xdmauth.h diff --git a/os/auth.c b/os/auth.c index 2518b5293..9f33d86c2 100644 --- a/os/auth.c +++ b/os/auth.c @@ -50,6 +50,7 @@ from The Open Group. #include "rpcauth.h" #include "xdmcp.h" +#include "xdmauth.h" struct protocol { unsigned short name_length; diff --git a/os/osdep.h b/os/osdep.h index fb08d8588..07d42d0c8 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -162,14 +162,4 @@ extern int MitFromID(AuthFromIDArgs); extern int MitRemoveCookie(AuthRemCArgs); extern int MitResetCookie(AuthRstCArgs); -/* in xdmauth.c */ -#ifdef HASXDMAUTH -extern XID XdmCheckCookie(AuthCheckArgs); -extern int XdmAddCookie(AuthAddCArgs); -extern int XdmFromID(AuthFromIDArgs); -extern int XdmRemoveCookie(AuthRemCArgs); -extern int XdmResetCookie(AuthRstCArgs); -extern void XdmAuthenticationInit(const char *cookie, int cookie_length); -#endif - #endif /* _OSDEP_H_ */ diff --git a/os/xdmauth.c b/os/xdmauth.c index aa1c113d2..cffd70ad0 100644 --- a/os/xdmauth.c +++ b/os/xdmauth.c @@ -46,6 +46,7 @@ from The Open Group. #include "os.h" #include "osdep.h" #include "xdmcp.h" +#include "xdmauth.h" #include "dixstruct.h" #ifdef HASXDMAUTH diff --git a/os/xdmauth.h b/os/xdmauth.h new file mode 100644 index 000000000..7a42c8215 --- /dev/null +++ b/os/xdmauth.h @@ -0,0 +1,13 @@ +#ifndef _XSERVER_OS_XDMAUTH_H +#define _XSERVER_OS_XDMAUTH_H + +#include "osdep.h" + +XID XdmCheckCookie(AuthCheckArgs); +int XdmAddCookie(AuthAddCArgs); +int XdmFromID(AuthFromIDArgs); +int XdmRemoveCookie(AuthRemCArgs); +int XdmResetCookie(AuthRstCArgs); +void XdmAuthenticationInit(const char *cookie, int cookie_length); + +#endif /* _XSERVER_OS_XDMAUTH_H */ diff --git a/os/xdmcp.c b/os/xdmcp.c index a264d96af..4d4690c70 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -41,6 +41,7 @@ #include "misc.h" #include "osdep.h" #include "xdmcp.h" +#include "xdmauth.h" #include "input.h" #include "dixstruct.h" #include "opaque.h"