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 <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1311>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-02-14 19:33:38 +01:00 committed by Marge Bot
parent 8c4759a68e
commit 5620102dfe
5 changed files with 16 additions and 8 deletions

View File

@ -38,6 +38,7 @@
/* Includes for authorization */
#include "securitysrv.h"
#include "os/osdep.h"
#include "os/mitauth.h"
#include <xcb/xcb.h>

View File

@ -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;

View File

@ -38,6 +38,7 @@ from The Open Group.
#include <X11/X.h>
#include "os.h"
#include "osdep.h"
#include "mitauth.h"
#include "dixstruct.h"
static struct auth {

13
os/mitauth.h Normal file
View File

@ -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 */

View File

@ -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_ */