os: move rpcauth prototypes to separate header

The rpc 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 17:53:10 +01:00 committed by Marge Bot
parent 8c4a015cc2
commit 664c3b6ba8
5 changed files with 17 additions and 10 deletions

View File

@ -191,6 +191,7 @@ SOFTWARE.
#include "osdep.h"
#include "xace.h"
#include "rpcauth.h"
Bool defeatAccessControl = FALSE;

View File

@ -48,6 +48,8 @@ from The Open Group.
#endif
#include <stdlib.h> /* for arc4random_buf() */
#include "rpcauth.h"
struct protocol {
unsigned short name_length;
const char *name;

View File

@ -171,16 +171,6 @@ extern int XdmRemoveCookie(AuthRemCArgs);
extern int XdmResetCookie(AuthRstCArgs);
#endif
/* in rpcauth.c */
#ifdef SECURE_RPC
extern void SecureRPCInit(AuthInitArgs);
extern XID SecureRPCCheck(AuthCheckArgs);
extern int SecureRPCAdd(AuthAddCArgs);
extern int SecureRPCFromID(AuthFromIDArgs);
extern int SecureRPCRemove(AuthRemCArgs);
extern int SecureRPCReset(AuthRstCArgs);
#endif
#ifdef XDMCP
/* in xdmcp.c */
extern void XdmcpUseMsg(void);

View File

@ -43,6 +43,7 @@ from The Open Group.
#include "os.h"
#include "osdep.h"
#include "dixstruct.h"
#include "rpcauth.h"
#include <rpc/rpc.h>

13
os/rpcauth.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef _XSERVER_OS_RPCAUTH_H
#define _XSERVER_OS_RPCAUTH_H
#include "osdep.h"
void SecureRPCInit(AuthInitArgs);
XID SecureRPCCheck(AuthCheckArgs);
int SecureRPCAdd(AuthAddCArgs);
int SecureRPCFromID(AuthFromIDArgs);
int SecureRPCRemove(AuthRemCArgs);
int SecureRPCReset(AuthRstCArgs);
#endif /* _XSERVER_OS_RPCAUTH_H */