mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-18 12:00:40 +02:00
Merge branch 'server-1.5-branch' into xorg-server-1.5-apple
This commit is contained in:
commit
d84cda5fb1
29 changed files with 401 additions and 118 deletions
|
|
@ -944,6 +944,12 @@ int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
|
|||
buf[p++] = modes->transparentAlpha;
|
||||
buf[p++] = GLX_TRANSPARENT_INDEX_VALUE;
|
||||
buf[p++] = modes->transparentIndex;
|
||||
buf[p++] = 0;
|
||||
buf[p++] = 0;
|
||||
buf[p++] = 0;
|
||||
buf[p++] = 0;
|
||||
buf[p++] = 0;
|
||||
buf[p++] = 0;
|
||||
|
||||
if (client->swapped) {
|
||||
__GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ if DBE
|
|||
DBE_DIR=dbe
|
||||
endif
|
||||
|
||||
if RECORD
|
||||
RECORD_DIR=record
|
||||
endif
|
||||
|
||||
SUBDIRS = \
|
||||
doc \
|
||||
include \
|
||||
|
|
@ -48,7 +52,7 @@ SUBDIRS = \
|
|||
$(AFB_DIR) \
|
||||
$(CFB_DIR) \
|
||||
$(CFB32_DIR) \
|
||||
record \
|
||||
$(RECORD_DIR) \
|
||||
xfixes \
|
||||
damageext \
|
||||
$(XTRAP_DIR) \
|
||||
|
|
|
|||
|
|
@ -188,12 +188,15 @@ static int
|
|||
ProcDPMSEnable(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
/* REQUEST(xDPMSEnableReq); */
|
||||
Bool was_enabled = DPMSEnabled;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDPMSEnableReq);
|
||||
|
||||
if (DPMSCapableFlag)
|
||||
if (DPMSCapableFlag) {
|
||||
DPMSEnabled = TRUE;
|
||||
if (!was_enabled)
|
||||
SetScreenSaverTimer();
|
||||
}
|
||||
|
||||
return(client->noClientException);
|
||||
}
|
||||
|
|
|
|||
122
Xext/xevie.c
122
Xext/xevie.c
|
|
@ -63,11 +63,13 @@ extern Bool noXkbExtension;
|
|||
#endif
|
||||
extern int xeviegrabState;
|
||||
|
||||
static int ProcDispatch (register ClientPtr client), SProcDispatch (register ClientPtr client);
|
||||
static void ResetProc (ExtensionEntry *extEntry);
|
||||
static DISPATCH_PROC(ProcXevieDispatch);
|
||||
static DISPATCH_PROC(SProcXevieDispatch);
|
||||
|
||||
static unsigned char ReqCode = 0;
|
||||
static int ErrorBase;
|
||||
static void XevieResetProc (ExtensionEntry *extEntry);
|
||||
|
||||
static unsigned char XevieReqCode = 0;
|
||||
static int XevieErrorBase;
|
||||
|
||||
int xevieFlag = 0;
|
||||
int xevieClientIndex = 0;
|
||||
|
|
@ -77,7 +79,7 @@ Mask xevieMask = 0;
|
|||
int xevieEventSent = 0;
|
||||
int xevieKBEventSent = 0;
|
||||
static DevPrivateKey xevieDevicePrivateKey = &xevieDevicePrivateKey;
|
||||
static Bool xevieModifiersOn = FALSE;
|
||||
static Bool xevieModifiersOn = FALSE;
|
||||
|
||||
#define XEVIEINFO(dev) ((xevieDeviceInfoPtr) \
|
||||
dixLookupPrivate(&(dev)->devPrivates, xevieDevicePrivateKey))
|
||||
|
|
@ -108,11 +110,6 @@ typedef struct {
|
|||
static xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}};
|
||||
static int keycqHead = 0, keycqTail = 0;
|
||||
|
||||
static int ProcDispatch (ClientPtr), SProcDispatch (ClientPtr);
|
||||
static void ResetProc (ExtensionEntry*);
|
||||
|
||||
static int ErrorBase;
|
||||
|
||||
static Bool XevieStart(void);
|
||||
static void XevieEnd(int clientIndex);
|
||||
static void XevieClientStateCallback(CallbackListPtr *pcbl, pointer nulldata,
|
||||
|
|
@ -140,25 +137,23 @@ XevieExtensionInit (void)
|
|||
if ((extEntry = AddExtension (XEVIENAME,
|
||||
0,
|
||||
XevieNumberErrors,
|
||||
ProcDispatch,
|
||||
SProcDispatch,
|
||||
ResetProc,
|
||||
ProcXevieDispatch,
|
||||
SProcXevieDispatch,
|
||||
XevieResetProc,
|
||||
StandardMinorOpcode))) {
|
||||
ReqCode = (unsigned char)extEntry->base;
|
||||
ErrorBase = extEntry->errorBase;
|
||||
XevieReqCode = (unsigned char)extEntry->base;
|
||||
XevieErrorBase = extEntry->errorBase;
|
||||
}
|
||||
|
||||
/* PC servers initialize the desktop colors (citems) here! */
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static
|
||||
void ResetProc (ExtensionEntry *extEntry)
|
||||
void XevieResetProc (ExtensionEntry *extEntry)
|
||||
{
|
||||
}
|
||||
|
||||
static
|
||||
int ProcQueryVersion (register ClientPtr client)
|
||||
int ProcXevieQueryVersion (register ClientPtr client)
|
||||
{
|
||||
xXevieQueryVersionReply rep;
|
||||
|
||||
|
|
@ -173,7 +168,7 @@ int ProcQueryVersion (register ClientPtr client)
|
|||
}
|
||||
|
||||
static
|
||||
int ProcStart (register ClientPtr client)
|
||||
int ProcXevieStart (register ClientPtr client)
|
||||
{
|
||||
xXevieStartReply rep;
|
||||
|
||||
|
|
@ -214,10 +209,12 @@ int ProcStart (register ClientPtr client)
|
|||
}
|
||||
|
||||
static
|
||||
int ProcEnd (register ClientPtr client)
|
||||
int ProcXevieEnd (register ClientPtr client)
|
||||
{
|
||||
xXevieEndReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXevieEndReq);
|
||||
|
||||
if (xevieFlag) {
|
||||
if (client->index != xevieClientIndex)
|
||||
return BadAccess;
|
||||
|
|
@ -233,13 +230,15 @@ int ProcEnd (register ClientPtr client)
|
|||
}
|
||||
|
||||
static
|
||||
int ProcSend (register ClientPtr client)
|
||||
int ProcXevieSend (register ClientPtr client)
|
||||
{
|
||||
REQUEST (xXevieSendReq);
|
||||
xXevieSendReply rep;
|
||||
xEvent *xE;
|
||||
static unsigned char lastDetail = 0, lastType = 0;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXevieSendReq);
|
||||
|
||||
if (client->index != xevieClientIndex)
|
||||
return BadAccess;
|
||||
|
||||
|
|
@ -279,15 +278,17 @@ int ProcSend (register ClientPtr client)
|
|||
}
|
||||
|
||||
static
|
||||
int ProcSelectInput (register ClientPtr client)
|
||||
int ProcXevieSelectInput (register ClientPtr client)
|
||||
{
|
||||
REQUEST (xXevieSelectInputReq);
|
||||
xXevieSelectInputReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXevieSelectInputReq);
|
||||
|
||||
if (client->index != xevieClientIndex)
|
||||
return BadAccess;
|
||||
|
||||
xevieMask = (long)stuff->event_mask;
|
||||
xevieMask = stuff->event_mask;
|
||||
rep.type = X_Reply;
|
||||
rep.sequence_number = client->sequence;
|
||||
WriteToClient (client, sizeof (xXevieSelectInputReply), (char *)&rep);
|
||||
|
|
@ -295,101 +296,114 @@ int ProcSelectInput (register ClientPtr client)
|
|||
}
|
||||
|
||||
static
|
||||
int ProcDispatch (register ClientPtr client)
|
||||
int ProcXevieDispatch (register ClientPtr client)
|
||||
{
|
||||
REQUEST (xReq);
|
||||
switch (stuff->data)
|
||||
{
|
||||
case X_XevieQueryVersion:
|
||||
return ProcQueryVersion (client);
|
||||
return ProcXevieQueryVersion (client);
|
||||
case X_XevieStart:
|
||||
return ProcStart (client);
|
||||
return ProcXevieStart (client);
|
||||
case X_XevieEnd:
|
||||
return ProcEnd (client);
|
||||
return ProcXevieEnd (client);
|
||||
case X_XevieSend:
|
||||
return ProcSend (client);
|
||||
return ProcXevieSend (client);
|
||||
case X_XevieSelectInput:
|
||||
return ProcSelectInput(client);
|
||||
return ProcXevieSelectInput(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
int SProcQueryVersion (register ClientPtr client)
|
||||
int SProcXevieQueryVersion (register ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST(xXevieQueryVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
return ProcQueryVersion(client);
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH (xXevieQueryVersionReq);
|
||||
swaps (&stuff->client_major_version, n);
|
||||
swaps (&stuff->client_minor_version, n);
|
||||
return ProcXevieQueryVersion(client);
|
||||
}
|
||||
|
||||
static
|
||||
int SProcStart (ClientPtr client)
|
||||
int SProcXevieStart (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST (xXevieStartReq);
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH (xXevieStartReq);
|
||||
swapl (&stuff->screen, n);
|
||||
REQUEST_AT_LEAST_SIZE (xXevieStartReq);
|
||||
return ProcStart (client);
|
||||
return ProcXevieStart (client);
|
||||
}
|
||||
|
||||
static
|
||||
int SProcEnd (ClientPtr client)
|
||||
int SProcXevieEnd (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST (xXevieEndReq);
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE (xXevieEndReq);
|
||||
swapl(&stuff->cmap, n);
|
||||
return ProcEnd (client);
|
||||
REQUEST_SIZE_MATCH (xXevieEndReq);
|
||||
swapl (&stuff->cmap, n);
|
||||
return ProcXevieEnd (client);
|
||||
}
|
||||
|
||||
static
|
||||
int SProcSend (ClientPtr client)
|
||||
int SProcXevieSend (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
xEvent eventT;
|
||||
EventSwapPtr proc;
|
||||
|
||||
REQUEST (xXevieSendReq);
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE (xXevieSendReq);
|
||||
swapl(&stuff->event, n);
|
||||
return ProcSend (client);
|
||||
REQUEST_SIZE_MATCH (xXevieSendReq);
|
||||
swapl (&stuff->dataType, n);
|
||||
|
||||
/* Swap event */
|
||||
proc = EventSwapVector[stuff->event.u.u.type & 0177];
|
||||
if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */
|
||||
return (BadValue);
|
||||
(*proc)(&stuff->event, &eventT);
|
||||
stuff->event = eventT;
|
||||
|
||||
return ProcXevieSend (client);
|
||||
}
|
||||
|
||||
static
|
||||
int SProcSelectInput (ClientPtr client)
|
||||
int SProcXevieSelectInput (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST (xXevieSelectInputReq);
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE (xXevieSelectInputReq);
|
||||
swapl(&stuff->event_mask, n);
|
||||
return ProcSelectInput (client);
|
||||
REQUEST_SIZE_MATCH (xXevieSelectInputReq);
|
||||
swapl (&stuff->event_mask, n);
|
||||
return ProcXevieSelectInput (client);
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
int SProcDispatch (register ClientPtr client)
|
||||
int SProcXevieDispatch (register ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
switch (stuff->data)
|
||||
{
|
||||
case X_XevieQueryVersion:
|
||||
return SProcQueryVersion (client);
|
||||
return SProcXevieQueryVersion (client);
|
||||
case X_XevieStart:
|
||||
return SProcStart (client);
|
||||
return SProcXevieStart (client);
|
||||
case X_XevieEnd:
|
||||
return SProcEnd (client);
|
||||
return SProcXevieEnd (client);
|
||||
case X_XevieSend:
|
||||
return SProcSend (client);
|
||||
return SProcXevieSend (client);
|
||||
case X_XevieSelectInput:
|
||||
return SProcSelectInput(client);
|
||||
return SProcXevieSelectInput(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <libaudit.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include "globals.h"
|
||||
#include "resource.h"
|
||||
#include "privates.h"
|
||||
#include "registry.h"
|
||||
|
|
@ -152,6 +153,12 @@ static struct security_class_mapping map[] = {
|
|||
{ NULL }
|
||||
};
|
||||
|
||||
/* x_resource "read" bits from the list above */
|
||||
#define SELinuxReadMask (DixReadAccess|DixGetAttrAccess|DixListPropAccess| \
|
||||
DixGetPropAccess|DixGetFocusAccess|DixListAccess| \
|
||||
DixShowAccess|DixBlendAccess|DixReceiveAccess| \
|
||||
DixUseAccess|DixDebugAccess)
|
||||
|
||||
/* forward declarations */
|
||||
static void SELinuxScreen(CallbackListPtr *, pointer, pointer);
|
||||
|
||||
|
|
@ -853,6 +860,7 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
SELinuxObjectRec *obj, *data;
|
||||
Selection *pSel = *rec->ppSel;
|
||||
Atom name = pSel->selection;
|
||||
Mask access_mode = rec->access_mode;
|
||||
SELinuxAuditRec auditdata = { .client = rec->client, .selection = name };
|
||||
security_id_t tsid;
|
||||
int rc;
|
||||
|
|
@ -861,11 +869,12 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
obj = dixLookupPrivate(&pSel->devPrivates, objectKey);
|
||||
|
||||
/* If this is a new object that needs labeling, do it now */
|
||||
if (rec->access_mode & DixCreateAccess) {
|
||||
if (access_mode & DixCreateAccess) {
|
||||
sidput(obj->sid);
|
||||
rc = SELinuxSelectionToSID(name, subj, &obj->sid, &obj->poly);
|
||||
if (rc != Success)
|
||||
obj->sid = unlabeled_sid;
|
||||
access_mode = DixSetAttrAccess;
|
||||
}
|
||||
/* If this is a polyinstantiated object, find the right instance */
|
||||
else if (obj->poly) {
|
||||
|
|
@ -890,13 +899,13 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
}
|
||||
|
||||
/* Perform the security check */
|
||||
rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, rec->access_mode,
|
||||
rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, access_mode,
|
||||
&auditdata);
|
||||
if (rc != Success)
|
||||
rec->status = rc;
|
||||
|
||||
/* Label the content (advisory only) */
|
||||
if (rec->access_mode & DixSetAttrAccess) {
|
||||
if (access_mode & DixSetAttrAccess) {
|
||||
data = dixLookupPrivate(&pSel->devPrivates, dataKey);
|
||||
sidput(data->sid);
|
||||
if (subj->sel_create_sid)
|
||||
|
|
@ -976,6 +985,7 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
SELinuxSubjectRec *subj;
|
||||
SELinuxObjectRec *obj;
|
||||
SELinuxAuditRec auditdata = { .client = rec->client };
|
||||
Mask access_mode = rec->access_mode;
|
||||
PrivateRec **privatePtr;
|
||||
security_class_t class;
|
||||
int rc, offset;
|
||||
|
|
@ -997,7 +1007,7 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
}
|
||||
|
||||
/* If this is a new object that needs labeling, do it now */
|
||||
if (rec->access_mode & DixCreateAccess && offset >= 0) {
|
||||
if (access_mode & DixCreateAccess && offset >= 0) {
|
||||
rc = SELinuxLabelResource(rec, subj, obj, class);
|
||||
if (rc != Success) {
|
||||
rec->status = rc;
|
||||
|
|
@ -1005,12 +1015,25 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
}
|
||||
}
|
||||
|
||||
/* Collapse generic resource permissions down to read/write */
|
||||
if (class == SECCLASS_X_RESOURCE) {
|
||||
access_mode = !!(rec->access_mode & SELinuxReadMask); /* rd */
|
||||
access_mode |= !!(rec->access_mode & ~SELinuxReadMask) << 1; /* wr */
|
||||
}
|
||||
|
||||
/* Perform the security check */
|
||||
auditdata.restype = rec->rtype;
|
||||
auditdata.id = rec->id;
|
||||
rc = SELinuxDoCheck(subj, obj, class, rec->access_mode, &auditdata);
|
||||
rc = SELinuxDoCheck(subj, obj, class, access_mode, &auditdata);
|
||||
if (rc != Success)
|
||||
rec->status = rc;
|
||||
|
||||
/* Perform the background none check on windows */
|
||||
if (access_mode & DixCreateAccess && rec->rtype == RT_WINDOW) {
|
||||
rc = SELinuxDoCheck(subj, obj, class, DixBlendAccess, &auditdata);
|
||||
if (rc != Success)
|
||||
((WindowPtr)rec->res)->forcedBG = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1449,6 +1472,24 @@ ProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey)
|
|||
return SELinuxSendContextReply(client, obj->sid);
|
||||
}
|
||||
|
||||
static int
|
||||
ProcSELinuxGetClientContext(ClientPtr client)
|
||||
{
|
||||
ClientPtr target;
|
||||
SELinuxSubjectRec *subj;
|
||||
int rc;
|
||||
|
||||
REQUEST(SELinuxGetContextReq);
|
||||
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
||||
|
||||
rc = dixLookupClient(&target, stuff->id, client, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
subj = dixLookupPrivate(&target->devPrivates, subjectKey);
|
||||
return SELinuxSendContextReply(client, subj->sid);
|
||||
}
|
||||
|
||||
static int
|
||||
SELinuxPopulateItem(SELinuxListItemRec *i, PrivateRec **privPtr, CARD32 id,
|
||||
int *size)
|
||||
|
|
@ -1663,6 +1704,8 @@ ProcSELinuxDispatch(ClientPtr client)
|
|||
return ProcSELinuxGetSelectionContext(client, dataKey);
|
||||
case X_SELinuxListSelections:
|
||||
return ProcSELinuxListSelections(client);
|
||||
case X_SELinuxGetClientContext:
|
||||
return ProcSELinuxGetClientContext(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
|
|
@ -1759,6 +1802,17 @@ SProcSELinuxListProperties(ClientPtr client)
|
|||
return ProcSELinuxListProperties(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcSELinuxGetClientContext(ClientPtr client)
|
||||
{
|
||||
REQUEST(SELinuxGetContextReq);
|
||||
int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
||||
swapl(&stuff->id, n);
|
||||
return ProcSELinuxGetClientContext(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcSELinuxDispatch(ClientPtr client)
|
||||
{
|
||||
|
|
@ -1812,6 +1866,8 @@ SProcSELinuxDispatch(ClientPtr client)
|
|||
return SProcSELinuxGetSelectionContext(client, dataKey);
|
||||
case X_SELinuxListSelections:
|
||||
return ProcSELinuxListSelections(client);
|
||||
case X_SELinuxGetClientContext:
|
||||
return SProcSELinuxGetClientContext(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
|
|
@ -1869,16 +1925,36 @@ void
|
|||
SELinuxExtensionInit(INITARGS)
|
||||
{
|
||||
ExtensionEntry *extEntry;
|
||||
struct selinux_opt options[] = { { SELABEL_OPT_VALIDATE, (char *)1 } };
|
||||
struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *)1 };
|
||||
struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *)0 };
|
||||
security_context_t con;
|
||||
int ret = TRUE;
|
||||
|
||||
/* Setup SELinux stuff */
|
||||
/* Check SELinux mode on system */
|
||||
if (!is_selinux_enabled()) {
|
||||
ErrorF("SELinux: SELinux not enabled, disabling SELinux support.\n");
|
||||
ErrorF("SELinux: Disabled on system, not enabling in X server\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check SELinux mode in configuration file */
|
||||
switch(selinuxEnforcingState) {
|
||||
case SELINUX_MODE_DISABLED:
|
||||
LogMessage(X_INFO, "SELinux: Disabled in configuration file\n");
|
||||
return;
|
||||
case SELINUX_MODE_ENFORCING:
|
||||
LogMessage(X_INFO, "SELinux: Configured in enforcing mode\n");
|
||||
avc_option.value = (char *)1;
|
||||
break;
|
||||
case SELINUX_MODE_PERMISSIVE:
|
||||
LogMessage(X_INFO, "SELinux: Configured in permissive mode\n");
|
||||
avc_option.value = (char *)0;
|
||||
break;
|
||||
default:
|
||||
avc_option.type = AVC_OPT_UNUSED;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set up SELinux stuff */
|
||||
selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback)SELinuxLog);
|
||||
selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback)SELinuxAudit);
|
||||
|
||||
|
|
@ -1890,11 +1966,11 @@ SELinuxExtensionInit(INITARGS)
|
|||
FatalError("SELinux: Failed to set up security class mapping\n");
|
||||
}
|
||||
|
||||
if (avc_open(NULL, 0) < 0)
|
||||
if (avc_open(&avc_option, 1) < 0)
|
||||
FatalError("SELinux: Couldn't initialize SELinux userspace AVC\n");
|
||||
avc_active = 1;
|
||||
|
||||
label_hnd = selabel_open(SELABEL_CTX_X, options, 1);
|
||||
label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1);
|
||||
if (!label_hnd)
|
||||
FatalError("SELinux: Failed to open x_contexts mapping in policy\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#define X_SELinuxGetSelectionContext 19
|
||||
#define X_SELinuxGetSelectionDataContext 20
|
||||
#define X_SELinuxListSelections 21
|
||||
#define X_SELinuxGetClientContext 22
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
|
|
|
|||
|
|
@ -1308,6 +1308,13 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
|
|||
XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $SELINUX_LIB"
|
||||
|
||||
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
|
||||
SAVE_LIBS=$LIBS
|
||||
SAVE_CFLAGS=$CFLAGS
|
||||
CFLAGS=$PCIACCESS_CFLAGS
|
||||
LIBS=$PCIACCESS_LIBS
|
||||
AC_CHECK_FUNCS([pci_system_init_dev_mem])
|
||||
LIBS=$SAVE_LIBS
|
||||
CFLAGS=$SAVE_CFLAGS
|
||||
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS"
|
||||
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
|
||||
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator,
|
|||
for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) {
|
||||
xv->type = DeviceValuator;
|
||||
xv->first_valuator = i;
|
||||
xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i);
|
||||
xv->num_valuators = ((final_valuator - i) > 6) ? 6 : (final_valuator - i);
|
||||
xv->deviceid = pDev->id;
|
||||
switch (final_valuator - i) {
|
||||
case 6:
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ if XEPHYR_HAS_DRI
|
|||
|
||||
libxephyr_hostdri_a_SOURCES= \
|
||||
ephyrdriext.c \
|
||||
ephyrdriext.h \
|
||||
ephyrdri.c \
|
||||
ephyrdri.h \
|
||||
XF86dri.c \
|
||||
|
|
|
|||
|
|
@ -385,9 +385,8 @@ Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
|
|||
context, hHWContext );
|
||||
}
|
||||
|
||||
GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context)
|
||||
GLboolean XF86DRIDestroyContext( Display *dpy, int screen, XID context)
|
||||
{
|
||||
Display * const dpy = (Display *) ndpy;
|
||||
XExtDisplayInfo *info = find_display (dpy);
|
||||
xXF86DRIDestroyContextReq *req;
|
||||
|
||||
|
|
@ -407,10 +406,9 @@ GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid
|
|||
}
|
||||
|
||||
GLboolean
|
||||
XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen,
|
||||
__DRIid drawable, drm_drawable_t * hHWDrawable)
|
||||
XF86DRICreateDrawable (Display *dpy, int screen,
|
||||
XID drawable, drm_drawable_t * hHWDrawable)
|
||||
{
|
||||
Display * const dpy = (Display *) ndpy;
|
||||
XExtDisplayInfo *info = find_display (dpy);
|
||||
xXF86DRICreateDrawableReply rep;
|
||||
xXF86DRICreateDrawableReq *req;
|
||||
|
|
@ -437,16 +435,36 @@ XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen,
|
|||
return True;
|
||||
}
|
||||
|
||||
GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
|
||||
__DRIid drawable )
|
||||
static int noopErrorHandler(Display *dpy, XErrorEvent *xerr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLboolean XF86DRIDestroyDrawable( Display *dpy, int screen,
|
||||
XID drawable )
|
||||
{
|
||||
Display * const dpy = (Display *) ndpy;
|
||||
XExtDisplayInfo *info = find_display (dpy);
|
||||
xXF86DRIDestroyDrawableReq *req;
|
||||
int (*oldXErrorHandler)(Display *, XErrorEvent *);
|
||||
|
||||
TRACE("DestroyDrawable...");
|
||||
XF86DRICheckExtension (dpy, info, False);
|
||||
|
||||
/* This is called from the DRI driver, which used call it like this
|
||||
*
|
||||
* if (windowExists(drawable))
|
||||
* destroyDrawable(drawable);
|
||||
*
|
||||
* which is a textbook race condition - the window may disappear
|
||||
* from the server between checking for its existance and
|
||||
* destroying it. Instead we change the semantics of
|
||||
* __DRIinterfaceMethodsRec::destroyDrawable() to succeed even if
|
||||
* the windows is gone, by wrapping the destroy call in an error
|
||||
* handler. */
|
||||
|
||||
XSync(dpy, GL_FALSE);
|
||||
oldXErrorHandler = XSetErrorHandler(noopErrorHandler);
|
||||
|
||||
LockDisplay(dpy);
|
||||
GetReq(XF86DRIDestroyDrawable, req);
|
||||
req->reqType = info->codes->major_opcode;
|
||||
|
|
@ -455,6 +473,9 @@ GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
|
|||
req->drawable = drawable;
|
||||
UnlockDisplay(dpy);
|
||||
SyncHandle();
|
||||
|
||||
XSetErrorHandler(oldXErrorHandler);
|
||||
|
||||
TRACE("DestroyDrawable... return True");
|
||||
return True;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,9 +891,12 @@ ephyrPoll(void)
|
|||
continue;
|
||||
}
|
||||
{
|
||||
if (ephyrCurScreen != ev.data.mouse_motion.screen)
|
||||
if (ev.data.mouse_motion.screen >=0
|
||||
&& (ephyrCurScreen != ev.data.mouse_motion.screen))
|
||||
{
|
||||
EPHYR_LOG ("warping mouse cursor:%d\n", ephyrCurScreen) ;
|
||||
EPHYR_LOG ("warping mouse cursor. "
|
||||
"cur_screen%d, motion_screen:%d\n",
|
||||
ephyrCurScreen, ev.data.mouse_motion.screen) ;
|
||||
if (ev.data.mouse_motion.screen >= 0)
|
||||
{
|
||||
ephyrWarpCursor
|
||||
|
|
@ -904,11 +907,30 @@ ephyrPoll(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
int x=0, y=0;
|
||||
#ifdef XEPHYR_DRI
|
||||
EphyrWindowPair *pair = NULL;
|
||||
#endif
|
||||
EPHYR_LOG ("enqueuing mouse motion:%d\n", ephyrCurScreen) ;
|
||||
KdEnqueuePointerEvent(ephyrMouse, mouseState,
|
||||
ev.data.mouse_motion.x,
|
||||
ev.data.mouse_motion.y,
|
||||
0);
|
||||
x = ev.data.mouse_motion.x;
|
||||
y = ev.data.mouse_motion.y;
|
||||
EPHYR_LOG ("initial (x,y):(%d,%d)\n", x, y) ;
|
||||
#ifdef XEPHYR_DRI
|
||||
EPHYR_LOG ("is this window peered by a gl drawable ?\n") ;
|
||||
if (findWindowPairFromRemote (ev.data.mouse_motion.window,
|
||||
&pair))
|
||||
{
|
||||
EPHYR_LOG ("yes, it is peered\n") ;
|
||||
x += pair->local->drawable.x;
|
||||
y += pair->local->drawable.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
EPHYR_LOG ("no, it is not peered\n") ;
|
||||
}
|
||||
EPHYR_LOG ("final (x,y):(%d,%d)\n", x, y) ;
|
||||
#endif
|
||||
KdEnqueuePointerEvent(ephyrMouse, mouseState, x, y, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "os.h" /* for OsSignal() */
|
||||
#include "kdrive.h"
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ ddxUseMsg (void)
|
|||
ErrorF("-nodri do not use DRI\n");
|
||||
#endif
|
||||
ErrorF("-noxv do not use XV\n");
|
||||
ErrorF("-name [name] define the name in the WM_CLASS property\n");
|
||||
ErrorF("\n");
|
||||
|
||||
exit(1);
|
||||
|
|
@ -148,6 +149,11 @@ ddxProcessArgument (int argc, char **argv, int i)
|
|||
{
|
||||
EPHYR_DBG("mark argv[%d]='%s'", i, argv[i] );
|
||||
|
||||
if (i == 1)
|
||||
{
|
||||
hostx_use_resname(basename(argv[0]), 0);
|
||||
}
|
||||
|
||||
if (!strcmp (argv[i], "-parent"))
|
||||
{
|
||||
if(i+1 < argc)
|
||||
|
|
@ -223,6 +229,19 @@ ddxProcessArgument (int argc, char **argv, int i)
|
|||
EPHYR_LOG ("no XVideo enabled\n") ;
|
||||
return 1 ;
|
||||
}
|
||||
else if (!strcmp (argv[i], "-name"))
|
||||
{
|
||||
if (i+1 < argc && argv[i+1][0] != '-')
|
||||
{
|
||||
hostx_use_resname(argv[i+1], 1);
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
UseMsg();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (argv[i][0] == ':')
|
||||
{
|
||||
hostx_set_display_name(argv[i]);
|
||||
|
|
|
|||
|
|
@ -107,6 +107,9 @@ extern EphyrKeySyms ephyrKeySyms;
|
|||
|
||||
extern int monitorResolution;
|
||||
|
||||
char *ephyrResName = NULL;
|
||||
int ephyrResNameFromCmd = 0;
|
||||
|
||||
static void
|
||||
hostx_set_fullscreen_hint(void);
|
||||
|
||||
|
|
@ -296,6 +299,13 @@ hostx_handle_signal (int signum)
|
|||
HostXWantDamageDebug);
|
||||
}
|
||||
|
||||
void
|
||||
hostx_use_resname (char *name, int fromcmd)
|
||||
{
|
||||
ephyrResName = name;
|
||||
ephyrResNameFromCmd = fromcmd;
|
||||
}
|
||||
|
||||
int
|
||||
hostx_init (void)
|
||||
{
|
||||
|
|
@ -304,6 +314,8 @@ hostx_init (void)
|
|||
Pixmap cursor_pxm;
|
||||
XColor col;
|
||||
int index;
|
||||
char *tmpstr;
|
||||
XClassHint *class_hint;
|
||||
|
||||
attr.event_mask =
|
||||
ButtonPressMask
|
||||
|
|
@ -327,6 +339,8 @@ hostx_init (void)
|
|||
HostX.depth = DefaultDepth(HostX.dpy, HostX.screen);
|
||||
HostX.visual = DefaultVisual(HostX.dpy, HostX.screen);
|
||||
|
||||
class_hint = XAllocClassHint();
|
||||
|
||||
for (index = 0 ; index < HostX.n_screens ; index++)
|
||||
{
|
||||
struct EphyrHostScreen *host_screen = &HostX.screens[index];
|
||||
|
|
@ -389,9 +403,23 @@ hostx_init (void)
|
|||
|
||||
hostx_set_fullscreen_hint();
|
||||
}
|
||||
|
||||
if (class_hint)
|
||||
{
|
||||
tmpstr = getenv("RESOURCE_NAME");
|
||||
if (tmpstr && (!ephyrResNameFromCmd))
|
||||
ephyrResName = tmpstr;
|
||||
class_hint->res_name = ephyrResName;
|
||||
class_hint->res_class = "Xephyr";
|
||||
XSetClassHint(hostx_get_display(), host_screen->win, class_hint);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (class_hint)
|
||||
XFree(class_hint);
|
||||
|
||||
XParseColor (HostX.dpy, DefaultColormap (HostX.dpy,HostX.screen),
|
||||
"red", &col);
|
||||
|
|
@ -914,8 +942,9 @@ hostx_get_event(EphyrHostXEvent *ev)
|
|||
host_screen_from_window (xev.xmotion.window);
|
||||
|
||||
ev->type = EPHYR_EV_MOUSE_MOTION;
|
||||
ev->data.mouse_motion.x = xev.xmotion.x;
|
||||
ev->data.mouse_motion.x = xev.xmotion.x;
|
||||
ev->data.mouse_motion.y = xev.xmotion.y;
|
||||
ev->data.mouse_motion.window = xev.xmotion.window;
|
||||
ev->data.mouse_motion.screen = (host_screen ? host_screen->mynum : -1);
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ struct EphyrHostXEvent
|
|||
int x;
|
||||
int y;
|
||||
int screen;
|
||||
int window;
|
||||
} mouse_motion;
|
||||
|
||||
struct mouse_down {
|
||||
|
|
@ -144,6 +145,9 @@ hostx_want_preexisting_window(EphyrScreenInfo screen);
|
|||
void
|
||||
hostx_use_preexisting_window(unsigned long win_id);
|
||||
|
||||
void
|
||||
hostx_use_resname (char *name, int fromcmd);
|
||||
|
||||
void
|
||||
hostx_handle_signal(int signum);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ if MFB
|
|||
MFBMOD = libmfb.la
|
||||
endif
|
||||
|
||||
if RECORD
|
||||
RECORDMOD = librecord.la
|
||||
endif
|
||||
|
||||
module_LTLIBRARIES = $(AFBMOD) \
|
||||
$(CFBMOD) \
|
||||
libfb.la \
|
||||
|
|
@ -34,7 +38,7 @@ module_LTLIBRARIES = $(AFBMOD) \
|
|||
libshadow.la
|
||||
|
||||
extsmoduledir = $(moduledir)/extensions
|
||||
extsmodule_LTLIBRARIES = librecord.la \
|
||||
extsmodule_LTLIBRARIES = $(RECORDMOD) \
|
||||
$(DBEMOD) \
|
||||
$(GLXMODS) \
|
||||
$(XTRAPMOD)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static ExtensionModule extensionModules[] = {
|
|||
{
|
||||
SELinuxExtensionInit,
|
||||
SELINUX_EXTENSION_NAME,
|
||||
NULL,
|
||||
&noSELinuxExtension,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
|
@ -258,6 +258,27 @@ extmodSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef XSELINUX
|
||||
if (! strcmp(SELINUX_EXTENSION_NAME, extensionModules[i].name)) {
|
||||
pointer o;
|
||||
selinuxEnforcingState = SELINUX_MODE_DEFAULT;
|
||||
|
||||
if ((o = xf86FindOption(opts, "SELinux mode disabled"))) {
|
||||
xf86MarkOptionUsed(o);
|
||||
selinuxEnforcingState = SELINUX_MODE_DISABLED;
|
||||
}
|
||||
if ((o = xf86FindOption(opts, "SELinux mode permissive"))) {
|
||||
xf86MarkOptionUsed(o);
|
||||
selinuxEnforcingState = SELINUX_MODE_PERMISSIVE;
|
||||
}
|
||||
if ((o = xf86FindOption(opts, "SELinux mode enforcing"))) {
|
||||
xf86MarkOptionUsed(o);
|
||||
selinuxEnforcingState = SELINUX_MODE_ENFORCING;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
LoadExtension(&extensionModules[i], FALSE);
|
||||
}
|
||||
/* Need a non-NULL return */
|
||||
|
|
|
|||
|
|
@ -148,22 +148,23 @@ exaDDXDriverInit(ScreenPtr pScreen)
|
|||
FALSE);
|
||||
}
|
||||
|
||||
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
|
||||
xf86DrvMsg(pScreen->myNum, X_INFO,
|
||||
if (xf86ReturnOptValBool(pScreenPriv->options,
|
||||
EXAOPT_NO_COMPOSITE, FALSE)) {
|
||||
xf86DrvMsg(pScreen->myNum, X_CONFIG,
|
||||
"EXA: Disabling Composite operation "
|
||||
"(RENDER acceleration)\n");
|
||||
pExaScr->info->CheckComposite = NULL;
|
||||
pExaScr->info->PrepareComposite = NULL;
|
||||
}
|
||||
|
||||
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_UTS)) {
|
||||
xf86DrvMsg(pScreen->myNum, X_INFO,
|
||||
if (xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_NO_UTS, FALSE)) {
|
||||
xf86DrvMsg(pScreen->myNum, X_CONFIG,
|
||||
"EXA: Disabling UploadToScreen\n");
|
||||
pExaScr->info->UploadToScreen = NULL;
|
||||
}
|
||||
|
||||
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_DFS)) {
|
||||
xf86DrvMsg(pScreen->myNum, X_INFO,
|
||||
if (xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_NO_DFS, FALSE)) {
|
||||
xf86DrvMsg(pScreen->myNum, X_CONFIG,
|
||||
"EXA: Disabling DownloadFromScreen\n");
|
||||
pExaScr->info->DownloadFromScreen = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -440,6 +440,9 @@ _X_HIDDEN void *dixLookupTab[] = {
|
|||
#ifdef XIDLE
|
||||
SYMVAR(noXIdleExtension)
|
||||
#endif
|
||||
#ifdef XSELINUX
|
||||
SYMVAR(noSELinuxExtension)
|
||||
#endif
|
||||
#ifdef XV
|
||||
SYMVAR(noXvExtension)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -68,8 +68,10 @@
|
|||
# include "xf86Xinput.h"
|
||||
#endif
|
||||
#include "xf86OSmouse.h"
|
||||
#ifdef XV
|
||||
#include "xf86xv.h"
|
||||
#include "xf86xvmc.h"
|
||||
#endif
|
||||
#include "xf86cmap.h"
|
||||
#include "xf86fbman.h"
|
||||
#include "dgaproc.h"
|
||||
|
|
|
|||
|
|
@ -137,7 +137,8 @@ cursor_bitpos (int flags, int x, Bool mask)
|
|||
mask = !mask;
|
||||
if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
|
||||
x = (x & ~3) | (3 - (x & 3));
|
||||
if (flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST)
|
||||
if (((flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) == 0) ==
|
||||
(X_BYTE_ORDER == X_BIG_ENDIAN))
|
||||
x = (x & ~7) | (7 - (x & 7));
|
||||
if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
|
||||
x = (x << 1) + mask;
|
||||
|
|
|
|||
|
|
@ -717,6 +717,9 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
|
|||
xf86CrtcPtr *save_crtcs;
|
||||
Bool save_enabled = crtc->enabled;
|
||||
|
||||
if (!crtc->scrn->vtSema)
|
||||
return FALSE;
|
||||
|
||||
save_crtcs = xalloc(config->num_output * sizeof (xf86CrtcPtr));
|
||||
if ((randr_mode != NULL) != crtc->enabled)
|
||||
changed = TRUE;
|
||||
|
|
|
|||
|
|
@ -212,8 +212,10 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
|
|||
pVidMem->mapMem = mapVidMem;
|
||||
pVidMem->unmapMem = unmapVidMem;
|
||||
|
||||
#if HAVE_PCI_SYSTEM_INIT_DEV_MEM
|
||||
if (useDevMem)
|
||||
pci_system_init_dev_mem(devMemFd);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_MTRR_SUPPORT
|
||||
if (useDevMem) {
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForScreenToScreenCopy &&
|
||||
infoRec->SubsequentScreenToScreenCopy &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SCREEN_TO_SCREEN_COPY)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SCREEN_TO_SCREEN_COPY, FALSE)) {
|
||||
HaveScreenToScreenCopy = TRUE;
|
||||
} else {
|
||||
infoRec->ScreenToScreenCopyFlags = 0;
|
||||
|
|
@ -192,10 +192,10 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
/**** Solid Filled Rects ****/
|
||||
|
||||
if(infoRec->SetupForSolidFill && infoRec->SubsequentSolidFillRect &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_FILL_RECT)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SOLID_FILL_RECT, FALSE)) {
|
||||
HaveSolidFillRect = TRUE;
|
||||
if(infoRec->SubsequentSolidFillTrap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_FILL_TRAP))
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SOLID_FILL_TRAP, FALSE))
|
||||
HaveSolidFillTrap = TRUE;
|
||||
else
|
||||
infoRec->SubsequentSolidFillTrap = NULL;
|
||||
|
|
@ -210,10 +210,11 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForSolidLine) {
|
||||
if(infoRec->SubsequentSolidTwoPointLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_TWO_POINT_LINE))
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_SOLID_TWO_POINT_LINE, FALSE))
|
||||
HaveSolidTwoPointLine = TRUE;
|
||||
if(infoRec->SubsequentSolidBresenhamLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_BRESENHAM_LINE)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SOLID_BRESENHAM_LINE, FALSE)) {
|
||||
HaveSolidBresenhamLine = TRUE;
|
||||
|
||||
if(infoRec->SolidBresenhamLineErrorTermBits)
|
||||
|
|
@ -222,7 +223,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
}
|
||||
|
||||
if(infoRec->SubsequentSolidHorVertLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_HORVERT_LINE))
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_SOLID_HORVERT_LINE, FALSE))
|
||||
HaveSolidHorVertLine = TRUE;
|
||||
else if(HaveSolidTwoPointLine) {
|
||||
infoRec->SubsequentSolidHorVertLine =
|
||||
|
|
@ -265,10 +267,14 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForMono8x8PatternFill &&
|
||||
infoRec->SubsequentMono8x8PatternFillRect &&
|
||||
!xf86IsOptionSet(options, XAAOPT_MONO_8x8_PATTERN_FILL_RECT)) {
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_MONO_8x8_PATTERN_FILL_RECT,
|
||||
FALSE)) {
|
||||
HaveMono8x8PatternFillRect = TRUE;
|
||||
if(infoRec->SubsequentMono8x8PatternFillTrap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_MONO_8x8_PATTERN_FILL_TRAP))
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_MONO_8x8_PATTERN_FILL_TRAP,
|
||||
FALSE))
|
||||
HaveMono8x8PatternFillTrap = TRUE;
|
||||
|
||||
if(infoRec->Mono8x8PatternFillFlags &
|
||||
|
|
@ -318,10 +324,12 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForDashedLine && infoRec->DashPatternMaxLength) {
|
||||
if(infoRec->SubsequentDashedTwoPointLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_DASHED_TWO_POINT_LINE))
|
||||
!xf86ReturnOptValBool(options, XAAOPT_DASHED_TWO_POINT_LINE,
|
||||
FALSE))
|
||||
HaveDashedTwoPointLine = TRUE;
|
||||
if(infoRec->SubsequentDashedBresenhamLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_DASHED_BRESENHAM_LINE)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_DASHED_BRESENHAM_LINE,
|
||||
FALSE)) {
|
||||
HaveDashedBresenhamLine = TRUE;
|
||||
|
||||
if(infoRec->DashedBresenhamLineErrorTermBits)
|
||||
|
|
@ -345,10 +353,11 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForColor8x8PatternFill &&
|
||||
infoRec->SubsequentColor8x8PatternFillRect &&
|
||||
!xf86IsOptionSet(options, XAAOPT_COL_8x8_PATTERN_FILL_RECT)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_COL_8x8_PATTERN_FILL_RECT, FALSE)) {
|
||||
HaveColor8x8PatternFillRect = TRUE;
|
||||
if(infoRec->SubsequentColor8x8PatternFillTrap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_COL_8x8_PATTERN_FILL_TRAP))
|
||||
!xf86ReturnOptValBool(options, XAAOPT_COL_8x8_PATTERN_FILL_TRAP,
|
||||
FALSE))
|
||||
HaveColor8x8PatternFillTrap = TRUE;
|
||||
else
|
||||
infoRec->SubsequentColor8x8PatternFillTrap = NULL;
|
||||
|
|
@ -381,7 +390,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
if(infoRec->SetupForCPUToScreenColorExpandFill &&
|
||||
infoRec->ColorExpandBase &&
|
||||
infoRec->SubsequentCPUToScreenColorExpandFill &&
|
||||
!xf86IsOptionSet(options, XAAOPT_CPU_TO_SCREEN_COL_EXP_FILL)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_CPU_TO_SCREEN_COL_EXP_FILL,
|
||||
FALSE)) {
|
||||
int dwordsNeeded = pScrn->virtualX;
|
||||
|
||||
infoRec->ColorExpandRange >>= 2; /* convert to DWORDS */
|
||||
|
|
@ -406,7 +416,9 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
infoRec->SubsequentColorExpandScanline &&
|
||||
infoRec->ScanlineColorExpandBuffers &&
|
||||
(infoRec->NumScanlineColorExpandBuffers > 0) &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SCANLINE_CPU_TO_SCREEN_COL_EXP_FILL)) {
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_SCANLINE_CPU_TO_SCREEN_COL_EXP_FILL,
|
||||
FALSE)) {
|
||||
HaveScanlineColorExpansion = TRUE;
|
||||
} else {
|
||||
infoRec->ScanlineCPUToScreenColorExpandFillFlags = 0;
|
||||
|
|
@ -419,7 +431,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForScreenToScreenColorExpandFill &&
|
||||
infoRec->SubsequentScreenToScreenColorExpandFill &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SCREEN_TO_SCREEN_COL_EXP_FILL)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SCREEN_TO_SCREEN_COL_EXP_FILL,
|
||||
FALSE)) {
|
||||
HaveScreenToScreenColorExpandFill = TRUE;
|
||||
if (!infoRec->CacheColorExpandDensity)
|
||||
infoRec->CacheColorExpandDensity = 1;
|
||||
|
|
@ -433,7 +446,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForImageWrite && infoRec->ImageWriteBase &&
|
||||
infoRec->SubsequentImageWriteRect &&
|
||||
!xf86IsOptionSet(options, XAAOPT_IMAGE_WRITE_RECT)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_IMAGE_WRITE_RECT, FALSE)) {
|
||||
|
||||
infoRec->ImageWriteRange >>= 2; /* convert to DWORDS */
|
||||
if(infoRec->ImageWriteFlags & CPU_TRANSFER_BASE_FIXED)
|
||||
|
|
@ -452,7 +465,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
infoRec->SubsequentImageWriteScanline &&
|
||||
infoRec->ScanlineImageWriteBuffers &&
|
||||
(infoRec->NumScanlineImageWriteBuffers > 0) &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SCANLINE_IMAGE_WRITE_RECT)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SCANLINE_IMAGE_WRITE_RECT,
|
||||
FALSE)) {
|
||||
HaveScanlineImageWriteRect = TRUE;
|
||||
} else {
|
||||
infoRec->ScanlineImageWriteFlags = 0;
|
||||
|
|
@ -518,7 +532,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
#define XAAMSG(s) do { if (serverGeneration == 1) xf86ErrorF(s); } while (0)
|
||||
|
||||
if((infoRec->Flags & OFFSCREEN_PIXMAPS) && HaveScreenToScreenCopy &&
|
||||
!xf86IsOptionSet(options, XAAOPT_OFFSCREEN_PIXMAPS)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_OFFSCREEN_PIXMAPS,
|
||||
FALSE)) {
|
||||
XAAMSG("\tOffscreen Pixmaps\n");
|
||||
} else {
|
||||
infoRec->Flags &= ~OFFSCREEN_PIXMAPS;
|
||||
|
|
@ -800,7 +815,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
/**** WriteBitmap ****/
|
||||
|
||||
if(infoRec->WriteBitmap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_WRITE_BITMAP)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_WRITE_BITMAP, FALSE)) {
|
||||
XAAMSG("\tDriver provided WriteBitmap replacement\n");
|
||||
} else if(HaveColorExpansion) {
|
||||
if (infoRec->CPUToScreenColorExpandFillFlags & TRIPLE_BITS_24BPP) {
|
||||
|
|
@ -959,7 +974,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
/**** WritePixmap ****/
|
||||
|
||||
if(infoRec->WritePixmap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_WRITE_PIXMAP)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_WRITE_PIXMAP, FALSE)) {
|
||||
XAAMSG("\tDriver provided WritePixmap replacement\n");
|
||||
} else if(HaveImageWriteRect) {
|
||||
infoRec->WritePixmap = XAAWritePixmap;
|
||||
|
|
@ -1433,7 +1448,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
else
|
||||
infoRec->Flags &= ~PIXMAP_CACHE;
|
||||
|
||||
if (xf86IsOptionSet(options, XAAOPT_PIXMAP_CACHE))
|
||||
if (xf86ReturnOptValBool(options, XAAOPT_PIXMAP_CACHE, FALSE))
|
||||
infoRec->Flags &= ~PIXMAP_CACHE;
|
||||
|
||||
if(infoRec->WriteMono8x8PatternToCache) {}
|
||||
|
|
|
|||
|
|
@ -175,6 +175,16 @@ extern Bool noXInputExtension;
|
|||
extern Bool noXIdleExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XSELINUX
|
||||
extern Bool noSELinuxExtension;
|
||||
|
||||
#define SELINUX_MODE_DEFAULT 0
|
||||
#define SELINUX_MODE_DISABLED 1
|
||||
#define SELINUX_MODE_PERMISSIVE 2
|
||||
#define SELINUX_MODE_ENFORCING 3
|
||||
extern int selinuxEnforcingState;
|
||||
#endif
|
||||
|
||||
#ifdef XV
|
||||
extern Bool noXvExtension;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@
|
|||
/* Have execinfo.h */
|
||||
#undef HAVE_EXECINFO_H
|
||||
|
||||
/* Have pci_system_init_dev_mem() */
|
||||
#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
|
||||
|
||||
/* Path to text files containing PCI IDs */
|
||||
#undef PCI_TXT_IDS_PATH
|
||||
|
||||
|
|
|
|||
|
|
@ -215,6 +215,9 @@ extern Bool noXInputExtension;
|
|||
#ifdef XIDLE
|
||||
extern Bool noXIdleExtension;
|
||||
#endif
|
||||
#ifdef XSELINUX
|
||||
extern Bool noSELinuxExtension;
|
||||
#endif
|
||||
#ifdef XV
|
||||
extern Bool noXvExtension;
|
||||
#endif
|
||||
|
|
@ -487,6 +490,9 @@ static ExtensionToggle ExtensionToggleList[] =
|
|||
#endif
|
||||
#ifdef XKB
|
||||
{ "XKEYBOARD", &noXkbExtension },
|
||||
#endif
|
||||
#ifdef XSELINUX
|
||||
{ "SELinux", &noSELinuxExtension },
|
||||
#endif
|
||||
{ "XTEST", &noTestExtensions },
|
||||
#ifdef XV
|
||||
|
|
@ -597,7 +603,7 @@ InitExtensions(argc, argv)
|
|||
if (!noSecurityExtension) SecurityExtensionInit();
|
||||
#endif
|
||||
#ifdef XSELINUX
|
||||
SELinuxExtensionInit();
|
||||
if (!noSELinuxExtension) SELinuxExtensionInit();
|
||||
#endif
|
||||
#ifdef XPRINT
|
||||
XpExtensionInit(); /* server-specific extension, cannot be disabled */
|
||||
|
|
|
|||
|
|
@ -232,6 +232,10 @@ _X_EXPORT Bool noXInputExtension = FALSE;
|
|||
#ifdef XIDLE
|
||||
_X_EXPORT Bool noXIdleExtension = FALSE;
|
||||
#endif
|
||||
#ifdef XSELINUX
|
||||
_X_EXPORT Bool noSELinuxExtension = FALSE;
|
||||
_X_EXPORT int selinuxEnforcingState = SELINUX_MODE_DEFAULT;
|
||||
#endif
|
||||
#ifdef XV
|
||||
_X_EXPORT Bool noXvExtension = FALSE;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1796,7 +1796,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
|
|||
dsection = dst->geom->sections;
|
||||
i < src->geom->num_sections;
|
||||
i++, ssection++, dsection++) {
|
||||
*dsection = *ssection;
|
||||
*dsection = *ssection;
|
||||
if (ssection->num_rows) {
|
||||
tmp = xcalloc(ssection->num_rows, sizeof(XkbRowRec));
|
||||
if (!tmp)
|
||||
|
|
@ -1852,9 +1852,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
|
|||
}
|
||||
ddoodad->any.type = sdoodad->any.type;
|
||||
}
|
||||
dsection->overlays = NULL;
|
||||
dsection->sz_overlays = 0;
|
||||
dsection->num_overlays = 0;
|
||||
dsection->overlays = NULL;
|
||||
dsection->sz_overlays = 0;
|
||||
dsection->num_overlays = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue