xace: add access_mode argument to selection hook.
This commit is contained in:
parent
4c1fb8069d
commit
a3296d111d
|
@ -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;
|
||||
|
|
|
@ -98,6 +98,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
ClientPtr client;
|
||||
Selection *selection;
|
||||
Mask access_mode;
|
||||
int rval;
|
||||
} XaceSelectionAccessRec;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue