xserver: Branch 'XACE-SELINUX'

Eamon Walsh ewalsh at kemper.freedesktop.org
Thu Mar 22 02:02:12 EET 2007


 Xext/xace.c    |    1 +
 Xext/xacestr.h |    1 +
 dix/dispatch.c |    6 ++++--
 3 files changed, 6 insertions(+), 2 deletions(-)

New commits:
diff-tree a3296d111dc4d76aa3afa7e338cbab93eb390ec4 (from 4c1fb8069d5dd30a73277698503e9dcc2e9d64c6)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Wed Mar 21 17:01:26 2007 -0400

    xace: add access_mode argument to selection hook.

diff --git a/Xext/xace.c b/Xext/xace.c
index 2b873cb..9502b5d 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 4c480a4..edf7b66 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 b5ed13d..e4bc937 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -1119,7 +1119,8 @@ ProcGetSelectionOwner(register ClientPtr
 	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 
 	       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;



More information about the xorg-commit mailing list