mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
os: move AllowByteSwappedClients setting into DIX
Adding new source and header that's going to host all DIX settings (set via cmdline or xf86 config file) in the future. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
5501c60f1b
commit
5532917d76
@@ -117,6 +117,7 @@ Equipment Corporation.
|
||||
#include "dix/screensaver_priv.h"
|
||||
#include "dix/selection_priv.h"
|
||||
#include "dix/server_priv.h"
|
||||
#include "dix/settings_priv.h"
|
||||
#include "dix/window_priv.h"
|
||||
#include "include/resource.h"
|
||||
#include "miext/extinit_priv.h"
|
||||
@@ -3906,7 +3907,7 @@ ProcEstablishConnection(ClientPtr client)
|
||||
|
||||
prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq);
|
||||
|
||||
if (client->swapped && !AllowByteSwappedClients) {
|
||||
if (client->swapped && !dixSettingAllowByteSwappedClients) {
|
||||
reason = "Prohibited client endianess, see the Xserver man page ";
|
||||
} else if ((client->req_len << 2) != sz_xReq + sz_xConnClientPrefix +
|
||||
pad_to_int32(prefix->nbytesAuthProto) +
|
||||
|
||||
@@ -51,6 +51,7 @@ SOFTWARE.
|
||||
|
||||
#include "dix/cursor_priv.h"
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/settings_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "windowstr.h"
|
||||
|
||||
@@ -33,6 +33,7 @@ srcs_dix = [
|
||||
'screen_hooks.c',
|
||||
'selection.c',
|
||||
'screen.c',
|
||||
'settings.c',
|
||||
'swaprep.c',
|
||||
'swapreq.c',
|
||||
'tables.c',
|
||||
|
||||
17
dix/settings.c
Normal file
17
dix/settings.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* SPDX-License-Identifier: MIT OR X11
|
||||
*
|
||||
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||
*
|
||||
* This file holds global DIX *settings*, which might be needed by other
|
||||
* parts, e.g. OS layer or DDX'es.
|
||||
*
|
||||
* Some of them might be influenced by command line args, some by xf86's
|
||||
* config files.
|
||||
*/
|
||||
#include <dix-config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "dix/settings_priv.h"
|
||||
|
||||
bool dixSettingAllowByteSwappedClients = false;
|
||||
19
dix/settings_priv.h
Normal file
19
dix/settings_priv.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* SPDX-License-Identifier: MIT OR X11
|
||||
*
|
||||
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||
*/
|
||||
#ifndef _XSERVER_DIX_SETTINGS_H
|
||||
#define _XSERVER_DIX_SETTINGS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/* This file holds global DIX *settings*, which might be needed by other
|
||||
* parts, e.g. OS layer or DDX'es.
|
||||
*
|
||||
* Some of them might be influenced by command line args, some by xf86's
|
||||
* config files.
|
||||
*/
|
||||
|
||||
extern bool dixSettingAllowByteSwappedClients;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user