os: move Auth* function types to separate header
The generic auth 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:
parent
5620102dfe
commit
6816605e22
|
@ -0,0 +1,29 @@
|
||||||
|
#ifndef _XSERVER_OS_AUTH_H
|
||||||
|
#define _XSERVER_OS_AUTH_H
|
||||||
|
|
||||||
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "dix.h"
|
||||||
|
|
||||||
|
#define AuthInitArgs void
|
||||||
|
typedef void (*AuthInitFunc) (AuthInitArgs);
|
||||||
|
|
||||||
|
#define AuthAddCArgs unsigned short data_length, const char *data, XID id
|
||||||
|
typedef int (*AuthAddCFunc) (AuthAddCArgs);
|
||||||
|
|
||||||
|
#define AuthCheckArgs unsigned short data_length, const char *data, ClientPtr client, const char **reason
|
||||||
|
typedef XID (*AuthCheckFunc) (AuthCheckArgs);
|
||||||
|
|
||||||
|
#define AuthFromIDArgs XID id, unsigned short *data_lenp, char **datap
|
||||||
|
typedef int (*AuthFromIDFunc) (AuthFromIDArgs);
|
||||||
|
|
||||||
|
#define AuthGenCArgs unsigned data_length, const char *data, XID id, unsigned *data_length_return, char **data_return
|
||||||
|
typedef XID (*AuthGenCFunc) (AuthGenCArgs);
|
||||||
|
|
||||||
|
#define AuthRemCArgs unsigned short data_length, const char *data
|
||||||
|
typedef int (*AuthRemCFunc) (AuthRemCArgs);
|
||||||
|
|
||||||
|
#define AuthRstCArgs void
|
||||||
|
typedef int (*AuthRstCFunc) (AuthRstCArgs);
|
||||||
|
|
||||||
|
#endif /* _XSERVER_OS_AUTH_H */
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef _XSERVER_OS_MITAUTH_H
|
#ifndef _XSERVER_OS_MITAUTH_H
|
||||||
#define _XSERVER_OS_MITAUTH_H
|
#define _XSERVER_OS_MITAUTH_H
|
||||||
|
|
||||||
#include "osdep.h"
|
#include "auth.h"
|
||||||
|
|
||||||
XID MitCheckCookie(AuthCheckArgs);
|
XID MitCheckCookie(AuthCheckArgs);
|
||||||
XID MitGenerateCookie(AuthGenCArgs);
|
XID MitGenerateCookie(AuthGenCArgs);
|
||||||
|
|
23
os/osdep.h
23
os/osdep.h
|
@ -85,29 +85,6 @@ typedef struct _connectionOutput *ConnectionOutputPtr;
|
||||||
|
|
||||||
struct _osComm;
|
struct _osComm;
|
||||||
|
|
||||||
#define AuthInitArgs void
|
|
||||||
typedef void (*AuthInitFunc) (AuthInitArgs);
|
|
||||||
|
|
||||||
#define AuthAddCArgs unsigned short data_length, const char *data, XID id
|
|
||||||
typedef int (*AuthAddCFunc) (AuthAddCArgs);
|
|
||||||
|
|
||||||
#define AuthCheckArgs unsigned short data_length, const char *data, ClientPtr client, const char **reason
|
|
||||||
typedef XID (*AuthCheckFunc) (AuthCheckArgs);
|
|
||||||
|
|
||||||
#define AuthFromIDArgs XID id, unsigned short *data_lenp, char **datap
|
|
||||||
typedef int (*AuthFromIDFunc) (AuthFromIDArgs);
|
|
||||||
|
|
||||||
#define AuthGenCArgs unsigned data_length, const char *data, XID id, unsigned *data_length_return, char **data_return
|
|
||||||
typedef XID (*AuthGenCFunc) (AuthGenCArgs);
|
|
||||||
|
|
||||||
#define AuthRemCArgs unsigned short data_length, const char *data
|
|
||||||
typedef int (*AuthRemCFunc) (AuthRemCArgs);
|
|
||||||
|
|
||||||
#define AuthRstCArgs void
|
|
||||||
typedef int (*AuthRstCFunc) (AuthRstCArgs);
|
|
||||||
|
|
||||||
typedef void (*OsCloseFunc) (ClientPtr);
|
|
||||||
|
|
||||||
typedef int (*OsFlushFunc) (ClientPtr who, struct _osComm * oc, char *extraBuf,
|
typedef int (*OsFlushFunc) (ClientPtr who, struct _osComm * oc, char *extraBuf,
|
||||||
int extraCount);
|
int extraCount);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef _XSERVER_OS_RPCAUTH_H
|
#ifndef _XSERVER_OS_RPCAUTH_H
|
||||||
#define _XSERVER_OS_RPCAUTH_H
|
#define _XSERVER_OS_RPCAUTH_H
|
||||||
|
|
||||||
#include "osdep.h"
|
#include "auth.h"
|
||||||
|
|
||||||
void SecureRPCInit(AuthInitArgs);
|
void SecureRPCInit(AuthInitArgs);
|
||||||
XID SecureRPCCheck(AuthCheckArgs);
|
XID SecureRPCCheck(AuthCheckArgs);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef _XSERVER_OS_XDMAUTH_H
|
#ifndef _XSERVER_OS_XDMAUTH_H
|
||||||
#define _XSERVER_OS_XDMAUTH_H
|
#define _XSERVER_OS_XDMAUTH_H
|
||||||
|
|
||||||
#include "osdep.h"
|
#include "auth.h"
|
||||||
|
|
||||||
XID XdmCheckCookie(AuthCheckArgs);
|
XID XdmCheckCookie(AuthCheckArgs);
|
||||||
int XdmAddCookie(AuthAddCArgs);
|
int XdmAddCookie(AuthAddCArgs);
|
||||||
|
|
Loading…
Reference in New Issue