summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xext/xace.c1
-rw-r--r--Xext/xacestr.h1
-rw-r--r--dix/dispatch.c6
3 files changed, 6 insertions, 2 deletions
diff --git a/Xext/xace.c b/Xext/xace.c
index 2b873cbf0..9502b5da9 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -151,6 +151,7 @@ int XaceHook(int hook, ...)
XaceSelectionAccessRec rec = {
va_arg(ap, ClientPtr),
va_arg(ap, Selection*),
+ va_arg(ap, Mask),
TRUE /* default allow */
};
calldata = &rec;
diff --git a/Xext/xacestr.h b/Xext/xacestr.h
index 4c480a4ea..edf7b66fb 100644
--- a/Xext/xacestr.h
+++ b/Xext/xacestr.h
@@ -98,6 +98,7 @@ typedef struct {
typedef struct {
ClientPtr client;
Selection *selection;
+ Mask access_mode;
int rval;
} XaceSelectionAccessRec;
diff --git a/dix/dispatch.c b/dix/dispatch.c
index b5ed13d0c..e4bc93728 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -1119,7 +1119,8 @@ ProcGetSelectionOwner(register ClientPtr client)
reply.length = 0;
reply.sequenceNumber = client->sequence;
if (i < NumCurrentSelections &&
- XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i]))
+ XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i],
+ DixReadAccess))
reply.owner = CurrentSelections[i].destwindow;
else
reply.owner = None;
@@ -1159,7 +1160,8 @@ ProcConvertSelection(register ClientPtr client)
CurrentSelections[i].selection != stuff->selection) i++;
if ((i < NumCurrentSelections) &&
(CurrentSelections[i].window != None) &&
- XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i]))
+ XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i],
+ DixReadAccess))
{
event.u.u.type = SelectionRequest;
event.u.selectionRequest.time = stuff->time;