mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 00:38:00 +02:00
Revert "os: unexport command line args handling functions"
This reverts commit 389b528203.
This commit is contained in:
parent
8985398948
commit
b3d6c23120
13 changed files with 76 additions and 62 deletions
|
|
@ -93,7 +93,6 @@ Equipment Corporation.
|
|||
#include "os/audit.h"
|
||||
#include "os/auth.h"
|
||||
#include "os/client_priv.h"
|
||||
#include "os/cmdline.h"
|
||||
#include "os/osdep.h"
|
||||
#include "os/screensaver.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "config/hotplug_priv.h"
|
||||
#include "dix/screenint_priv.h"
|
||||
#include "os/cmdline.h"
|
||||
|
||||
#include "kdrive.h"
|
||||
#include <mivalidate.h>
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@
|
|||
#include "inpututils.h"
|
||||
#include "optionstr.h"
|
||||
|
||||
#include "os/cmdline.h"
|
||||
|
||||
#if defined(CONFIG_UDEV) || defined(CONFIG_HAL)
|
||||
#include <hotplug.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ from The Open Group.
|
|||
#include "dix/colormap_priv.h"
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/screenint_priv.h"
|
||||
#include "os/cmdline.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
#include "scrnintstr.h"
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@
|
|||
#include "config/hotplug_priv.h"
|
||||
#include "dix/input_priv.h"
|
||||
#include "dix/screenint_priv.h"
|
||||
#include "os/cmdline.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
#include "servermd.h"
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
#include <X11/X.h>
|
||||
|
||||
#include "os/cmdline.h"
|
||||
|
||||
#include "compiler.h"
|
||||
#include "xf86.h"
|
||||
#include "xf86Priv.h"
|
||||
|
|
|
|||
|
|
@ -31,10 +31,9 @@
|
|||
#include <X11/X.h>
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#include "os/cmdline.h"
|
||||
|
||||
#include "compiler.h"
|
||||
#include "linux.h"
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86Priv.h"
|
||||
#include "xf86_os_support.h"
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "../../../../os/cmdline.h"
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86Priv.h"
|
||||
#include "xf86_os_support.h"
|
||||
|
|
|
|||
75
include/os.h
75
include/os.h
|
|
@ -143,6 +143,14 @@ extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */ );
|
|||
|
||||
extern _X_EXPORT void GiveUp(int /*sig */ );
|
||||
|
||||
extern _X_EXPORT void UseMsg(void);
|
||||
|
||||
extern _X_EXPORT void ProcessCommandLine(int /*argc */ , char * /*argv */ []);
|
||||
|
||||
extern _X_EXPORT int set_font_authorizations(char **authorizations,
|
||||
int *authlen,
|
||||
void *client);
|
||||
|
||||
/*
|
||||
* This function malloc(3)s buffer, terminating the server if there is not
|
||||
* enough memory.
|
||||
|
|
@ -250,6 +258,66 @@ OsAbort(void)
|
|||
extern _X_EXPORT Bool
|
||||
PrivsElevated(void);
|
||||
|
||||
extern _X_EXPORT void
|
||||
CheckUserParameters(int argc, char **argv, char **envp);
|
||||
extern _X_EXPORT void
|
||||
CheckUserAuthorization(void);
|
||||
|
||||
extern _X_EXPORT int
|
||||
AddHost(ClientPtr /*client */ ,
|
||||
int /*family */ ,
|
||||
unsigned /*length */ ,
|
||||
const void * /*pAddr */ );
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
ForEachHostInFamily(int family,
|
||||
Bool (*func)(
|
||||
unsigned char *addr,
|
||||
short len,
|
||||
void *closure),
|
||||
void *closure);
|
||||
|
||||
extern _X_EXPORT int
|
||||
RemoveHost(ClientPtr client,
|
||||
int family,
|
||||
unsigned length,
|
||||
void *pAddr);
|
||||
|
||||
extern _X_EXPORT int
|
||||
GetHosts(void ** /*data */ ,
|
||||
int * /*pnHosts */ ,
|
||||
int * /*pLen */ ,
|
||||
BOOL * /*pEnabled */ );
|
||||
|
||||
typedef struct sockaddr *sockaddrPtr;
|
||||
|
||||
extern _X_EXPORT int
|
||||
InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client);
|
||||
|
||||
#define LCC_UID_SET (1 << 0)
|
||||
#define LCC_GID_SET (1 << 1)
|
||||
#define LCC_PID_SET (1 << 2)
|
||||
#define LCC_ZID_SET (1 << 3)
|
||||
|
||||
typedef struct {
|
||||
int fieldsSet; /* Bit mask of fields set */
|
||||
int euid; /* Effective uid */
|
||||
int egid; /* Primary effective group id */
|
||||
int nSuppGids; /* Number of supplementary group ids */
|
||||
int *pSuppGids; /* Array of supplementary group ids */
|
||||
int pid; /* Process id */
|
||||
int zoneid; /* Only set on Solaris 10 & later */
|
||||
} LocalClientCredRec;
|
||||
|
||||
extern _X_EXPORT int
|
||||
GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
|
||||
|
||||
extern _X_EXPORT void
|
||||
FreeLocalClientCreds(LocalClientCredRec *);
|
||||
|
||||
extern _X_EXPORT int
|
||||
ChangeAccessControl(ClientPtr /*client */ , int /*fEnabled */ );
|
||||
|
||||
extern _X_EXPORT int
|
||||
GetClientFd(ClientPtr);
|
||||
|
||||
|
|
@ -259,6 +327,13 @@ ClientIsLocal(ClientPtr client);
|
|||
extern _X_EXPORT int
|
||||
ddxProcessArgument(int /*argc */ , char * /*argv */ [], int /*i */ );
|
||||
|
||||
#define CHECK_FOR_REQUIRED_ARGUMENTS(num) \
|
||||
do if (((i + num) >= argc) || (!argv[i + num])) { \
|
||||
UseMsg(); \
|
||||
FatalError("Required argument to %s not specified\n", argv[i]); \
|
||||
} while (0)
|
||||
|
||||
|
||||
extern _X_EXPORT void
|
||||
ddxUseMsg(void);
|
||||
|
||||
|
|
|
|||
28
os/auth.h
28
os/auth.h
|
|
@ -26,28 +26,11 @@ typedef int (*AuthRemCFunc) (AuthRemCArgs);
|
|||
#define AuthRstCArgs void
|
||||
typedef int (*AuthRstCFunc) (AuthRstCArgs);
|
||||
|
||||
int set_font_authorizations(char **authorizations,
|
||||
int *authlen,
|
||||
void *client);
|
||||
|
||||
#define LCC_UID_SET (1 << 0)
|
||||
#define LCC_GID_SET (1 << 1)
|
||||
#define LCC_PID_SET (1 << 2)
|
||||
#define LCC_ZID_SET (1 << 3)
|
||||
|
||||
typedef struct {
|
||||
int fieldsSet; /* Bit mask of fields set */
|
||||
int euid; /* Effective uid */
|
||||
int egid; /* Primary effective group id */
|
||||
int nSuppGids; /* Number of supplementary group ids */
|
||||
int *pSuppGids; /* Array of supplementary group ids */
|
||||
int pid; /* Process id */
|
||||
int zoneid; /* Only set on Solaris 10 & later */
|
||||
} LocalClientCredRec;
|
||||
|
||||
int GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
|
||||
void FreeLocalClientCreds(LocalClientCredRec *);
|
||||
|
||||
void EnableLocalAccess(void);
|
||||
void DisableLocalAccess(void);
|
||||
|
||||
|
|
@ -87,17 +70,8 @@ XID GenerateAuthorization(unsigned int name_length,
|
|||
|
||||
void RegisterAuthorizations(void);
|
||||
|
||||
void CheckUserAuthorization(void);
|
||||
|
||||
typedef struct sockaddr *sockaddrPtr;
|
||||
|
||||
int AddHost(ClientPtr client, int family, unsigned length, const void *pAddr);
|
||||
Bool ForEachHostInFamily(int family,
|
||||
Bool (*func)(unsigned char *addr, short len, void *closure),
|
||||
void *closure);
|
||||
int RemoveHost(ClientPtr client, int family, unsigned length, void *pAddr);
|
||||
int GetHosts(void **data, int *pnHosts, int *pLen, BOOL *pEnabled);
|
||||
int InvalidHost(sockaddrPtr saddr, int len, ClientPtr client);
|
||||
void AddLocalHosts(void);
|
||||
void ResetHosts(const char *display);
|
||||
|
||||
|
|
@ -107,8 +81,6 @@ void DefineSelf(int fd);
|
|||
/* check whether given addr belongs to ourself */
|
||||
void AugmentSelf(void *from, int len);
|
||||
|
||||
int ChangeAccessControl(ClientPtr client, int fEnabled);
|
||||
|
||||
void AccessUsingXdmcp(void);
|
||||
|
||||
extern Bool defeatAccessControl;
|
||||
|
|
|
|||
20
os/cmdline.h
20
os/cmdline.h
|
|
@ -1,20 +0,0 @@
|
|||
/* SPDX-License-Identifier: MIT OR X11
|
||||
*
|
||||
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||
*/
|
||||
#ifndef _XSERVER_OS_CMDLINE_H
|
||||
#define _XSERVER_OS_CMDLINE_H
|
||||
|
||||
#include "include/os.h"
|
||||
|
||||
#define CHECK_FOR_REQUIRED_ARGUMENTS(num) \
|
||||
do if (((i + num) >= argc) || (!argv[i + num])) { \
|
||||
UseMsg(); \
|
||||
FatalError("Required argument to %s not specified\n", argv[i]); \
|
||||
} while (0)
|
||||
|
||||
void UseMsg(void);
|
||||
void ProcessCommandLine(int argc, char * argv[]);
|
||||
void CheckUserParameters(int argc, char **argv, char **envp);
|
||||
|
||||
#endif /* _XSERVER_OS_CMELINE_H */
|
||||
|
|
@ -107,7 +107,6 @@ __stdcall unsigned long GetTickCount(void);
|
|||
#include "dix/dix_priv.h"
|
||||
#include "dix/input_priv.h"
|
||||
#include "os/auth.h"
|
||||
#include "os/cmdline.h"
|
||||
#include "os/serverlock.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <X11/Xatom.h>
|
||||
#include <X11/extensions/XKMformat.h>
|
||||
|
||||
#include "os/cmdline.h"
|
||||
#include "xkb/xkbsrv_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue