xserver: Branch 'master' - 2 commits

Eamon Walsh ewalsh at kemper.freedesktop.org
Thu Dec 14 21:47:52 EET 2006


 Xext/appgroup.c                 |    4 
 Xext/cup.c                      |    2 
 Xext/panoramiXprocs.c           |  172 +++++++++++++++++++--------------------
 Xext/saver.c                    |   10 +-
 Xext/security.c                 |   12 +-
 Xext/shape.c                    |   22 ++---
 Xext/shm.c                      |    6 -
 Xext/sync.c                     |   16 +--
 Xext/xf86bigfont.c              |    4 
 Xext/xprint.c                   |   26 ++---
 Xext/xvdisp.c                   |   30 +++---
 damageext/damageext.c           |   10 +-
 dbe/dbe.c                       |   12 +-
 dix/colormap.c                  |    4 
 dix/cursor.c                    |    4 
 dix/dispatch.c                  |  118 +++++++++++++-------------
 dix/dixfonts.c                  |    8 -
 dix/dixutils.c                  |  176 +++++++++++++++++++++-------------------
 dix/events.c                    |   38 ++++----
 dix/gc.c                        |    8 -
 dix/property.c                  |   20 ++--
 dix/resource.c                  |    4 
 dix/window.c                    |   10 +-
 hw/darwin/quartz/applewm.c      |    6 -
 hw/darwin/quartz/xpr/appledri.c |    4 
 hw/dmx/dmx.c                    |   12 +-
 hw/dmx/dmxpict.c                |   24 ++---
 hw/dmx/glxProxy/glxcmds.c       |   24 ++---
 hw/xfree86/dri/xf86dri.c        |    6 -
 hw/xfree86/loader/dixsym.c      |   12 +-
 hw/xwin/winclipboardwrappers.c  |    2 
 hw/xwin/winwindowswm.c          |    6 -
 include/dix.h                   |   83 ++++++++----------
 include/pixmap.h                |   10 ++
 include/resource.h              |    9 +-
 os/access.c                     |    2 
 randr/rrcrtc.c                  |    8 -
 randr/rrdispatch.c              |    4 
 randr/rroutput.c                |    2 
 randr/rrproperty.c              |   14 +--
 randr/rrscreen.c                |   10 +-
 render/picture.c                |    4 
 render/render.c                 |  122 +++++++++++++--------------
 xfixes/cursor.c                 |   12 +-
 xfixes/region.c                 |   46 +++++-----
 xfixes/saveset.c                |    2 
 xfixes/select.c                 |    2 
 47 files changed, 582 insertions(+), 560 deletions(-)

New commits:
diff-tree 60cdc592fe042c03ceb5d4c3344acfbbf5d8ae28 (from 6c46645cfc1afda8aeabfe0ed4d9342673b702f1)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Dec 14 14:46:03 2006 -0500

    Add new, combined dix lookup functions.

diff --git a/dix/dixutils.c b/dix/dixutils.c
index fca55d9..f9980c5 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -194,115 +194,129 @@ CompareISOLatin1Lowered(unsigned char *s
     return (int) c1 - (int) c2;
 }
 
-#ifdef XACE
-
-/* SecurityLookupWindow and SecurityLookupDrawable:
- * Look up the window/drawable taking into account the client doing
- * the lookup and the type of access desired.  Return the window/drawable
- * if it exists and the client is allowed access, else return NULL.
- * Most Proc* functions should be calling these instead of
- * LookupWindow and LookupDrawable, which do no access checks.
- * XACE note: need to see if client->lastDrawableID can still be used here.
+/*
+ * dixLookupWindow and dixLookupDrawable:
+ * Look up the window/drawable taking into account the client doing the
+ * lookup, the type of drawable desired, and the type of access desired.
+ * Return Success with *pDraw set if the window/drawable exists and the client
+ * is allowed access, else return an error code with *pDraw set to NULL.  The
+ * access mask values are defined in resource.h.  The type mask values are
+ * defined in pixmap.h, with zero equivalent to M_DRAWABLE.
  */
+_X_EXPORT int
+dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
+		  Mask type, Mask access)
+{
+    DrawablePtr pTmp;
+    RESTYPE rtype;
+    *pDraw = NULL;
+    client->errorValue = id;
+
+    if (id == INVALID)
+	return BadDrawable;
+
+    if (id == client->lastDrawableID) {
+	pTmp = client->lastDrawable;
+
+	/* an access check is required for cached drawables */
+	rtype = (pTmp->type | M_WINDOW) ? RT_WINDOW : RT_PIXMAP;
+	if (!XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp))
+	    return BadDrawable;
+    } else
+	pTmp = (DrawablePtr)SecurityLookupIDByClass(client, id, RC_DRAWABLE,
+						   access);
+    if (!pTmp)
+	return BadDrawable;
+    if (!((1 << pTmp->type) | (type ? type : M_DRAWABLE)))
+	return BadMatch;
+
+    if (pTmp->type | M_DRAWABLE) {
+	client->lastDrawable = pTmp;
+	client->lastDrawableID = id;
+	client->lastGCID = INVALID;
+	client->lastGC = (GCPtr)NULL;
+    }
+    *pDraw = pTmp;
+    return Success;
+}
 
-_X_EXPORT WindowPtr
-SecurityLookupWindow(XID rid, ClientPtr client, Mask access_mode)
+_X_EXPORT int
+dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access)
 {
-    client->errorValue = rid;
-    if(rid == INVALID)
-	return NULL;
-    return (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode);
+    int rc;
+    rc = dixLookupDrawable((DrawablePtr*)pWin, id, client, M_WINDOW, access);
+    return (rc == BadDrawable) ? BadWindow : rc;
 }
 
+_X_EXPORT int
+dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access)
+{
+    GCPtr pTmp = (GCPtr)SecurityLookupIDByType(client, id, RT_GC, access);
+    if (pTmp) {
+	*pGC = pTmp;
+	return Success;
+    }
+    client->errorValue = id;
+    *pGC = NULL;
+    return BadGC;
+}
 
-_X_EXPORT pointer
-SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode)
+_X_EXPORT int
+dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client)
 {
-    register DrawablePtr pDraw;
+    pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY,
+						    DixReadAccess);
+    int clientIndex = CLIENT_ID(rid);
 
-    if(rid == INVALID)
-	return (pointer) NULL;
-    pDraw = (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE,
-						 access_mode);
-    if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW))
-        return (pointer)pDraw;		
-    return (pointer)NULL;
+    if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) {
+	*pClient = clients[clientIndex];
+	return Success;
+    }
+    *pClient = NULL;
+    return BadValue;
 }
 
-/* We can't replace the LookupWindow and LookupDrawable functions with
- * macros because of compatibility with loadable servers.
+/*
+ * These are deprecated compatibility functions and will be removed soon!
+ * Please use the new dixLookup*() functions above.
  */
-
 _X_EXPORT WindowPtr
-LookupWindow(XID rid, ClientPtr client)
+SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode)
 {
-    return SecurityLookupWindow(rid, client, DixUnknownAccess);
+    WindowPtr pWin;
+    int i = dixLookupWindow(&pWin, id, client, access_mode);
+    return (i == Success) ? pWin : NULL;
 }
 
-_X_EXPORT pointer
-LookupDrawable(XID rid, ClientPtr client)
+_X_EXPORT WindowPtr
+LookupWindow(XID id, ClientPtr client)
 {
-    return SecurityLookupDrawable(rid, client, DixUnknownAccess);
+    return SecurityLookupWindow(id, client, DixUnknownAccess);
 }
 
-#else /* not XACE */
-
-WindowPtr
-LookupWindow(XID rid, ClientPtr client)
+_X_EXPORT pointer
+SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode)
 {
-    WindowPtr	pWin;
-
-    client->errorValue = rid;
-    if(rid == INVALID)
-	return NULL;
-    if (client->lastDrawableID == rid)
-    {
-        if (client->lastDrawable->type == DRAWABLE_WINDOW)
-            return ((WindowPtr) client->lastDrawable);
-        return (WindowPtr) NULL;
-    }
-    pWin = (WindowPtr)LookupIDByType(rid, RT_WINDOW);
-    if (pWin && pWin->drawable.type == DRAWABLE_WINDOW) {
-	client->lastDrawable = (DrawablePtr) pWin;
-	client->lastDrawableID = rid;
-	client->lastGCID = INVALID;
-	client->lastGC = (GCPtr)NULL;
-    }
-    return pWin;
+    DrawablePtr pDraw;
+    int i = dixLookupDrawable(&pDraw, id, client, access_mode, TRUE);
+    return (i == Success) ? pDraw : NULL;
 }
 
-
-pointer
-LookupDrawable(XID rid, ClientPtr client)
+_X_EXPORT pointer
+LookupDrawable(XID id, ClientPtr client)
 {
-    register DrawablePtr pDraw;
-
-    if(rid == INVALID)
-	return (pointer) NULL;
-    if (client->lastDrawableID == rid)
-	return ((pointer) client->lastDrawable);
-    pDraw = (DrawablePtr)LookupIDByClass(rid, RC_DRAWABLE);
-    if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW))
-        return (pointer)pDraw;		
-    return (pointer)NULL;
+    return SecurityLookupDrawable(id, client, DixUnknownAccess);
 }
 
-#endif /* XACE */
-
 _X_EXPORT ClientPtr
-LookupClient(XID rid, ClientPtr client)
+LookupClient(XID id, ClientPtr client)
 {
-    pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY,
-						    DixReadAccess);
-    int clientIndex = CLIENT_ID(rid);
-
-    if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT))
-    {
-	return clients[clientIndex];
-    }
-    return (ClientPtr)NULL;
+    ClientPtr pClient;
+    int i = dixLookupClient(&pClient, id, client);
+    return (i == Success) ? pClient : NULL;
 }
 
+/* end deprecated functions */
 
 int
 AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 27a3093..32e0e4f 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -155,17 +155,21 @@ _X_HIDDEN void *dixLookupTab[] = {
     SYMFUNC(CompareTimeStamps)
     SYMFUNC(CopyISOLatin1Lowered)
     SYMFUNC(DeleteCallback)
+    SYMFUNC(dixLookupDrawable)
+    SYMFUNC(dixLookupWindow)
+    SYMFUNC(dixLookupClient)
+    SYMFUNC(dixLookupGC)
+    /* following are deprecated */
     SYMFUNC(LookupClient)
     SYMFUNC(LookupDrawable)
     SYMFUNC(LookupWindow)
+    SYMFUNC(SecurityLookupDrawable)
+    SYMFUNC(SecurityLookupWindow)
+    /* end deprecated */
     SYMFUNC(NoopDDA)
     SYMFUNC(QueueWorkProc)
     SYMFUNC(RegisterBlockAndWakeupHandlers)
     SYMFUNC(RemoveBlockAndWakeupHandlers)
-#ifdef XACE
-    SYMFUNC(SecurityLookupDrawable)
-    SYMFUNC(SecurityLookupWindow)
-#endif
     /* events.c */
     SYMFUNC(CheckCursorConfinement)
     SYMFUNC(DeliverEvents)
diff --git a/include/dix.h b/include/dix.h
index 2c87a48..09d5fef 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -375,47 +375,40 @@ extern int CompareISOLatin1Lowered(
     unsigned char * /*b*/,
     int blen);
 
-#ifdef XACE
-
-extern WindowPtr SecurityLookupWindow(
-    XID /*rid*/,
-    ClientPtr /*client*/,
-    Mask /*access_mode*/);
-
-extern pointer SecurityLookupDrawable(
-    XID /*rid*/,
-    ClientPtr /*client*/,
-    Mask /*access_mode*/);
-
-extern WindowPtr LookupWindow(
-    XID /*rid*/,
-    ClientPtr /*client*/);
-
-extern pointer LookupDrawable(
-    XID /*rid*/,
-    ClientPtr /*client*/);
-
-#else
-
-extern WindowPtr LookupWindow(
-    XID /*rid*/,
-    ClientPtr /*client*/);
-
-extern pointer LookupDrawable(
-    XID /*rid*/,
-    ClientPtr /*client*/);
-
-#define SecurityLookupWindow(rid, client, access_mode) \
-	LookupWindow(rid, client)
-
-#define SecurityLookupDrawable(rid, client, access_mode) \
-	LookupDrawable(rid, client)
-
-#endif /* XACE */
+extern int dixLookupWindow(
+    WindowPtr *result,
+    XID id,
+    ClientPtr client,
+    Mask access_mode);
+
+extern int dixLookupDrawable(
+    DrawablePtr *result,
+    XID id,
+    ClientPtr client,
+    Mask type_mask,
+    Mask access_mode);
+
+extern int dixLookupGC(
+    GCPtr *result,
+    XID id,
+    ClientPtr client,
+    Mask access_mode);
+
+extern int dixLookupClient(
+    ClientPtr *result,
+    XID id,
+    ClientPtr client);
 
-extern ClientPtr LookupClient(
-    XID /*rid*/,
-    ClientPtr /*client*/);
+/*
+ * These are deprecated compatibility functions and will be removed soon!
+ * Please use the new dixLookup*() functions above.
+ */
+extern WindowPtr SecurityLookupWindow(XID, ClientPtr, Mask);
+extern WindowPtr LookupWindow(XID, ClientPtr);
+extern pointer SecurityLookupDrawable(XID, ClientPtr, Mask);
+extern pointer LookupDrawable(XID, ClientPtr);
+extern ClientPtr LookupClient(XID, ClientPtr);
+/* end deprecated functions */
 
 extern void NoopDDA(void);
 
diff --git a/include/pixmap.h b/include/pixmap.h
index 3276fad..19e682a 100644
--- a/include/pixmap.h
+++ b/include/pixmap.h
@@ -58,6 +58,16 @@ SOFTWARE.
 #define UNDRAWABLE_WINDOW 2
 #define DRAWABLE_BUFFER 3
 
+/* corresponding type masks for dixLookupDrawable() */
+#define M_DRAWABLE_WINDOW	(1<<0)
+#define M_DRAWABLE_PIXMAP	(1<<1)
+#define M_UNDRAWABLE_WINDOW	(1<<2)
+#define M_DRAWABLE_BUFFER	(1<<3)
+#define M_ANY			(-1)
+#define M_WINDOW	(M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
+#define M_DRAWABLE	(M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP|M_DRAWABLE_BUFFER)
+#define M_UNDRAWABLE	(M_UNDRAWABLE_WINDOW)
+
 /* flags to PaintWindow() */
 #define PW_BACKGROUND 0
 #define PW_BORDER 1
diff-tree 6c46645cfc1afda8aeabfe0ed4d9342673b702f1 (from b88ad820fac81d0dfd557a384bf0406e8893e7af)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Dec 14 14:45:42 2006 -0500

    Naming change: Security*Access -> Dix*Access

diff --git a/Xext/appgroup.c b/Xext/appgroup.c
index 650dc0a..4f30005 100644
--- a/Xext/appgroup.c
+++ b/Xext/appgroup.c
@@ -432,7 +432,7 @@ int ProcXagDestroy(
 
     REQUEST_SIZE_MATCH (xXagDestroyReq);
     pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client, 
-		(XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess);
+		(XID)stuff->app_group, RT_APPGROUP, DixReadAccess);
     if (!pAppGrp) return XagBadAppGroup;
     FreeResource ((XID)stuff->app_group, RT_NONE);
     if (--XagCallbackRefCount == 0)
@@ -451,7 +451,7 @@ int ProcXagGetAttr(
 
     REQUEST_SIZE_MATCH (xXagGetAttrReq);
     pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client, 
-		(XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess);
+		(XID)stuff->app_group, RT_APPGROUP, DixReadAccess);
     if (!pAppGrp) return XagBadAppGroup;
     rep.type = X_Reply;
     rep.length = 0;
diff --git a/Xext/cup.c b/Xext/cup.c
index 10d13ba..6bfa278 100644
--- a/Xext/cup.c
+++ b/Xext/cup.c
@@ -227,7 +227,7 @@ int ProcStoreColors(
 
     REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq);
     pcmp = (ColormapPtr) SecurityLookupIDByType (client, stuff->cmap,
-						 RT_COLORMAP, SecurityWriteAccess);
+						 RT_COLORMAP, DixWriteAccess);
 
     if (pcmp) {
 	int ncolors, n;
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 8bb4c59..6833084 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -91,7 +91,7 @@ int PanoramiXCreateWindow(ClientPtr clie
         return BadLength;
 
     if (!(parent = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->parent, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->parent, XRT_WINDOW, DixWriteAccess)))
         return BadWindow;
 
     if(stuff->class == CopyFromParent)
@@ -105,7 +105,7 @@ int PanoramiXCreateWindow(ClientPtr clie
 	tmp = *((CARD32 *) &stuff[1] + pback_offset);
 	if ((tmp != None) && (tmp != ParentRelative)) {
 	   if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -114,7 +114,7 @@ int PanoramiXCreateWindow(ClientPtr clie
 	tmp = *((CARD32 *) &stuff[1] + pbord_offset);
 	if (tmp != CopyFromParent) {
 	   if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -123,7 +123,7 @@ int PanoramiXCreateWindow(ClientPtr clie
 	tmp = *((CARD32 *) &stuff[1] + cmap_offset);
 	if ((tmp != CopyFromParent) && (tmp != None)) {
 	   if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_COLORMAP, SecurityReadAccess)))
+		client, tmp, XRT_COLORMAP, DixReadAccess)))
 	      return BadColor;
 	}
     }
@@ -192,7 +192,7 @@ int PanoramiXChangeWindowAttributes(Clie
         return BadLength;
 
     if (!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->window, XRT_WINDOW, DixWriteAccess)))
         return BadWindow;
 
     if((win->u.win.class == InputOnly) && 
@@ -204,7 +204,7 @@ int PanoramiXChangeWindowAttributes(Clie
 	tmp = *((CARD32 *) &stuff[1] + pback_offset);
 	if ((tmp != None) && (tmp != ParentRelative)) {
 	   if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -213,7 +213,7 @@ int PanoramiXChangeWindowAttributes(Clie
 	tmp = *((CARD32 *) &stuff[1] + pbord_offset);
 	if (tmp != CopyFromParent) {
 	   if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -222,7 +222,7 @@ int PanoramiXChangeWindowAttributes(Clie
 	tmp = *((CARD32 *) &stuff[1] + cmap_offset);
 	if ((tmp != CopyFromParent) && (tmp != None)) {
 	   if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_COLORMAP, SecurityReadAccess)))
+		client, tmp, XRT_COLORMAP, DixReadAccess)))
 	      return BadColor;
 	}
     }
@@ -251,7 +251,7 @@ int PanoramiXDestroyWindow(ClientPtr cli
     REQUEST_SIZE_MATCH(xResourceReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->id, XRT_WINDOW, SecurityDestroyAccess)))
+		client, stuff->id, XRT_WINDOW, DixDestroyAccess)))
 	return BadWindow;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -276,7 +276,7 @@ int PanoramiXDestroySubwindows(ClientPtr
     REQUEST_SIZE_MATCH(xResourceReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->id, XRT_WINDOW, SecurityDestroyAccess)))
+		client, stuff->id, XRT_WINDOW, DixDestroyAccess)))
 	return BadWindow;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -301,7 +301,7 @@ int PanoramiXChangeSaveSet(ClientPtr cli
     REQUEST_SIZE_MATCH(xChangeSaveSetReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->window, XRT_WINDOW, SecurityReadAccess)))
+		client, stuff->window, XRT_WINDOW, DixReadAccess)))
 	return BadWindow;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -325,11 +325,11 @@ int PanoramiXReparentWindow(ClientPtr cl
     REQUEST_SIZE_MATCH(xReparentWindowReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->window, XRT_WINDOW, DixWriteAccess)))
 	return BadWindow;
 
     if(!(parent = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->parent, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->parent, XRT_WINDOW, DixWriteAccess)))
 	return BadWindow;
 
     x = stuff->x;
@@ -360,7 +360,7 @@ int PanoramiXMapWindow(ClientPtr client)
     REQUEST_SIZE_MATCH(xResourceReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->id, XRT_WINDOW, SecurityReadAccess)))
+		client, stuff->id, XRT_WINDOW, DixReadAccess)))
 	return BadWindow;
 
     FOR_NSCREENS_FORWARD(j) {
@@ -382,7 +382,7 @@ int PanoramiXMapSubwindows(ClientPtr cli
     REQUEST_SIZE_MATCH(xResourceReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->id, XRT_WINDOW, SecurityReadAccess)))
+		client, stuff->id, XRT_WINDOW, DixReadAccess)))
 	return BadWindow;
 
     FOR_NSCREENS_FORWARD(j) {
@@ -404,7 +404,7 @@ int PanoramiXUnmapWindow(ClientPtr clien
     REQUEST_SIZE_MATCH(xResourceReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->id, XRT_WINDOW, SecurityReadAccess)))
+		client, stuff->id, XRT_WINDOW, DixReadAccess)))
 	return BadWindow;
 
     FOR_NSCREENS_FORWARD(j) {
@@ -426,7 +426,7 @@ int PanoramiXUnmapSubwindows(ClientPtr c
     REQUEST_SIZE_MATCH(xResourceReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->id, XRT_WINDOW, SecurityReadAccess)))
+		client, stuff->id, XRT_WINDOW, DixReadAccess)))
 	return BadWindow;
 
     FOR_NSCREENS_FORWARD(j) {
@@ -457,11 +457,11 @@ int PanoramiXConfigureWindow(ClientPtr c
 
     /* because we need the parent */
     if (!(pWin = (WindowPtr)SecurityLookupIDByType(
-		client, stuff->window, RT_WINDOW, SecurityWriteAccess)))
+		client, stuff->window, RT_WINDOW, DixWriteAccess)))
         return BadWindow;
 
     if (!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->window, XRT_WINDOW, DixWriteAccess)))
         return BadWindow;
 
     if ((Mask)stuff->mask & CWSibling) {
@@ -469,7 +469,7 @@ int PanoramiXConfigureWindow(ClientPtr c
 	sib_offset = Ones((Mask)stuff->mask & (CWSibling - 1));
 	if ((tmp = *((CARD32 *) &stuff[1] + sib_offset))) {
 	   if(!(sib = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_WINDOW, SecurityReadAccess)))
+		client, tmp, XRT_WINDOW, DixReadAccess)))
 	      return BadWindow;
 	}
     }
@@ -514,7 +514,7 @@ int PanoramiXCirculateWindow(ClientPtr c
     REQUEST_SIZE_MATCH(xCirculateWindowReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->window, XRT_WINDOW, DixWriteAccess)))
 	return BadWindow;
 
     FOR_NSCREENS_FORWARD(j) {
@@ -579,11 +579,11 @@ int PanoramiXTranslateCoords(ClientPtr c
 
     REQUEST_SIZE_MATCH(xTranslateCoordsReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->srcWid, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     pDst = (WindowPtr)SecurityLookupWindow(stuff->dstWid, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pDst)
         return(BadWindow);
     rep.type = X_Reply;
@@ -655,7 +655,7 @@ int PanoramiXCreatePixmap(ClientPtr clie
     client->errorValue = stuff->pid;
 
     if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityReadAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixReadAccess)))
 	return BadDrawable;
 
     if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes))))
@@ -694,7 +694,7 @@ int PanoramiXFreePixmap(ClientPtr client
     client->errorValue = stuff->id;
 
     if(!(pix = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->id, XRT_PIXMAP, SecurityDestroyAccess)))
+		client, stuff->id, XRT_PIXMAP, DixDestroyAccess)))
 	return BadPixmap;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -730,14 +730,14 @@ int PanoramiXCreateGC(ClientPtr client)
         return BadLength;
 
     if (!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityReadAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixReadAccess)))
         return BadDrawable;
 
     if ((Mask)stuff->mask & GCTile) {
 	tile_offset = Ones((Mask)stuff->mask & (GCTile - 1));
 	if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) {
 	   if(!(tile = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -745,7 +745,7 @@ int PanoramiXCreateGC(ClientPtr client)
 	stip_offset = Ones((Mask)stuff->mask & (GCStipple - 1));
 	if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) {
 	   if(!(stip = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -753,7 +753,7 @@ int PanoramiXCreateGC(ClientPtr client)
 	clip_offset = Ones((Mask)stuff->mask & (GCClipMask - 1));
 	if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) {
 	   if(!(clip = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -805,14 +805,14 @@ int PanoramiXChangeGC(ClientPtr client)
         return BadLength;
 
     if (!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
         return BadGC;
 
     if ((Mask)stuff->mask & GCTile) {
 	tile_offset = Ones((Mask)stuff->mask & (GCTile - 1));
 	if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) {
 	   if(!(tile = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -820,7 +820,7 @@ int PanoramiXChangeGC(ClientPtr client)
 	stip_offset = Ones((Mask)stuff->mask & (GCStipple - 1));
 	if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) {
 	   if(!(stip = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -828,7 +828,7 @@ int PanoramiXChangeGC(ClientPtr client)
 	clip_offset = Ones((Mask)stuff->mask & (GCClipMask - 1));
 	if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) {
 	   if(!(clip = (PanoramiXRes*) SecurityLookupIDByType(
-		client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+		client, tmp, XRT_PIXMAP, DixReadAccess)))
 	      return BadPixmap;
 	}
     }
@@ -859,11 +859,11 @@ int PanoramiXCopyGC(ClientPtr client)
     REQUEST_SIZE_MATCH(xCopyGCReq);
 
     if(!(srcGC = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->srcGC, XRT_GC, SecurityReadAccess)))
+		client, stuff->srcGC, XRT_GC, DixReadAccess)))
 	return BadGC;
 
     if(!(dstGC = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->dstGC, XRT_GC, SecurityWriteAccess)))
+		client, stuff->dstGC, XRT_GC, DixWriteAccess)))
 	return BadGC;
 
     FOR_NSCREENS(j) {
@@ -886,7 +886,7 @@ int PanoramiXSetDashes(ClientPtr client)
     REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityWriteAccess)))
+		client, stuff->gc, XRT_GC, DixWriteAccess)))
 	return BadGC;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -908,7 +908,7 @@ int PanoramiXSetClipRectangles(ClientPtr
     REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityWriteAccess)))
+		client, stuff->gc, XRT_GC, DixWriteAccess)))
 	return BadGC;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -930,7 +930,7 @@ int PanoramiXFreeGC(ClientPtr client)
     REQUEST_SIZE_MATCH(xResourceReq);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->id, XRT_GC, SecurityDestroyAccess)))
+		client, stuff->id, XRT_GC, DixDestroyAccess)))
 	return BadGC;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -956,7 +956,7 @@ int PanoramiXClearToBackground(ClientPtr
     REQUEST_SIZE_MATCH(xClearAreaReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->window, XRT_WINDOW, DixWriteAccess)))
 	return BadWindow;
 
     x = stuff->x;
@@ -998,13 +998,13 @@ int PanoramiXCopyArea(ClientPtr client)
     REQUEST_SIZE_MATCH(xCopyAreaReq);
 
     if(!(src = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->srcDrawable, XRC_DRAWABLE, SecurityReadAccess)))
+		client, stuff->srcDrawable, XRC_DRAWABLE, DixReadAccess)))
 	return BadDrawable;
 
     srcShared = IS_SHARED_PIXMAP(src);
 
     if(!(dst = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->dstDrawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->dstDrawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;
 
     dstShared = IS_SHARED_PIXMAP(dst);
@@ -1013,7 +1013,7 @@ int PanoramiXCopyArea(ClientPtr client)
 	return (* SavedProcVector[X_CopyArea])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;
 
     if((dst->type == XRT_WINDOW) && dst->u.win.root)
@@ -1082,7 +1082,7 @@ int PanoramiXCopyArea(ClientPtr client)
 	    VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, pGC, client); 
 	    if (stuff->dstDrawable != stuff->srcDrawable) {
 		SECURITY_VERIFY_DRAWABLE(pSrc, stuff->srcDrawable, client,
-                                 SecurityReadAccess);
+                                 DixReadAccess);
 		if ((pDst->pScreen != pSrc->pScreen) || 
 		    (pDst->depth != pSrc->depth)) {
 			client->errorValue = stuff->dstDrawable;
@@ -1146,13 +1146,13 @@ int PanoramiXCopyPlane(ClientPtr client)
     REQUEST_SIZE_MATCH(xCopyPlaneReq);
 
     if(!(src = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->srcDrawable, XRC_DRAWABLE, SecurityReadAccess)))
+		client, stuff->srcDrawable, XRC_DRAWABLE, DixReadAccess)))
 	return BadDrawable;    
 
     srcShared = IS_SHARED_PIXMAP(src);
 
     if(!(dst = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->dstDrawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->dstDrawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;
 
     dstShared = IS_SHARED_PIXMAP(dst);
@@ -1161,7 +1161,7 @@ int PanoramiXCopyPlane(ClientPtr client)
 	return (* SavedProcVector[X_CopyPlane])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;
 
     if((dst->type == XRT_WINDOW) && dst->u.win.root)
@@ -1188,7 +1188,7 @@ int PanoramiXCopyPlane(ClientPtr client)
 	VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, pGC, client);
 	if (stuff->dstDrawable != stuff->srcDrawable) {
 	    SECURITY_VERIFY_DRAWABLE(psrcDraw, stuff->srcDrawable, client,
-                                 SecurityReadAccess);
+                                 DixReadAccess);
             if (pdstDraw->pScreen != psrcDraw->pScreen) {
 		client->errorValue = stuff->dstDrawable;
 		return (BadMatch);
@@ -1246,14 +1246,14 @@ int PanoramiXPolyPoint(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xPolyPointReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolyPoint])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1304,14 +1304,14 @@ int PanoramiXPolyLine(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xPolyLineReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolyLine])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1362,14 +1362,14 @@ int PanoramiXPolySegment(ClientPtr clien
     REQUEST_AT_LEAST_SIZE(xPolySegmentReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolySegment])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1424,14 +1424,14 @@ int PanoramiXPolyRectangle(ClientPtr cli
 
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolyRectangle])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1484,14 +1484,14 @@ int PanoramiXPolyArc(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xPolyArcReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolyArc])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1542,14 +1542,14 @@ int PanoramiXFillPoly(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xFillPolyReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_FillPoly])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1601,14 +1601,14 @@ int PanoramiXPolyFillRectangle(ClientPtr
     REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolyFillRectangle])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1660,14 +1660,14 @@ int PanoramiXPolyFillArc(ClientPtr clien
     REQUEST_AT_LEAST_SIZE(xPolyFillArcReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolyFillArc])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1718,14 +1718,14 @@ int PanoramiXPutImage(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xPutImageReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PutImage])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1769,7 +1769,7 @@ int PanoramiXGetImage(ClientPtr client)
     }
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;
 
     if(draw->type == XRT_PIXMAP)
@@ -1909,14 +1909,14 @@ PanoramiXPolyText8(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xPolyTextReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolyText8])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1948,14 +1948,14 @@ PanoramiXPolyText16(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xPolyTextReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_PolyText16])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1987,14 +1987,14 @@ int PanoramiXImageText8(ClientPtr client
     REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_ImageText8])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -2026,14 +2026,14 @@ int PanoramiXImageText16(ClientPtr clien
     REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;    
 
     if(IS_SHARED_PIXMAP(draw))
 	return (*SavedProcVector[X_ImageText16])(client);
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->gc, XRT_GC, SecurityReadAccess)))
+		client, stuff->gc, XRT_GC, DixReadAccess)))
 	return BadGC;    
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -2064,7 +2064,7 @@ int PanoramiXCreateColormap(ClientPtr cl
     REQUEST_SIZE_MATCH(xCreateColormapReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->window, XRT_WINDOW, SecurityReadAccess)))
+		client, stuff->window, XRT_WINDOW, DixReadAccess)))
 	return BadWindow;    
 
     if(!stuff->visual || (stuff->visual > 255)) 
@@ -2107,7 +2107,7 @@ int PanoramiXFreeColormap(ClientPtr clie
     client->errorValue = stuff->id;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->id, XRT_COLORMAP, SecurityDestroyAccess)))
+                client, stuff->id, XRT_COLORMAP, DixDestroyAccess)))
         return BadColor;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -2136,7 +2136,7 @@ PanoramiXCopyColormapAndFree(ClientPtr c
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
                 client, stuff->srcCmap, XRT_COLORMAP, 
-		SecurityReadAccess | SecurityWriteAccess)))
+		DixReadAccess | DixWriteAccess)))
         return BadColor;
 
     if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes))))
@@ -2174,7 +2174,7 @@ int PanoramiXInstallColormap(ClientPtr c
     client->errorValue = stuff->id;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->id, XRT_COLORMAP, SecurityReadAccess)))
+                client, stuff->id, XRT_COLORMAP, DixReadAccess)))
         return BadColor;
 
     FOR_NSCREENS_BACKWARD(j){
@@ -2197,7 +2197,7 @@ int PanoramiXUninstallColormap(ClientPtr
     client->errorValue = stuff->id;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->id, XRT_COLORMAP, SecurityReadAccess)))
+                client, stuff->id, XRT_COLORMAP, DixReadAccess)))
         return BadColor;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -2220,7 +2220,7 @@ int PanoramiXAllocColor(ClientPtr client
     client->errorValue = stuff->cmap;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
+                client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
 	return BadColor;
 
     FOR_NSCREENS_BACKWARD(j){
@@ -2243,7 +2243,7 @@ int PanoramiXAllocNamedColor(ClientPtr c
     client->errorValue = stuff->cmap;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
+                client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
         return BadColor;
 
     FOR_NSCREENS_BACKWARD(j){
@@ -2266,7 +2266,7 @@ int PanoramiXAllocColorCells(ClientPtr c
     client->errorValue = stuff->cmap;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
+                client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
 	return BadColor;
 	
     FOR_NSCREENS_BACKWARD(j){
@@ -2289,7 +2289,7 @@ int PanoramiXAllocColorPlanes(ClientPtr 
     client->errorValue = stuff->cmap;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
+                client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
 	return BadColor;
 	
     FOR_NSCREENS_BACKWARD(j){
@@ -2313,7 +2313,7 @@ int PanoramiXFreeColors(ClientPtr client
     client->errorValue = stuff->cmap;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
+                client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
         return BadColor;
 
     FOR_NSCREENS_BACKWARD(j) {
@@ -2335,7 +2335,7 @@ int PanoramiXStoreColors(ClientPtr clien
     client->errorValue = stuff->cmap;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
+                client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
         return BadColor;
 
     FOR_NSCREENS_BACKWARD(j){
@@ -2358,7 +2358,7 @@ int PanoramiXStoreNamedColor(ClientPtr c
     client->errorValue = stuff->cmap;
 
     if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
+                client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
         return BadColor;
 
     FOR_NSCREENS_BACKWARD(j){
diff --git a/Xext/saver.c b/Xext/saver.c
index 1d223ae..d6b537a 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -1279,7 +1279,7 @@ ProcScreenSaverSetAttributes (ClientPtr 
        REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq);
 
        if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-                   client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+                   client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
            return BadDrawable;
 
        len = stuff->length -  (sizeof(xScreenSaverSetAttributesReq) >> 2);
@@ -1291,7 +1291,7 @@ ProcScreenSaverSetAttributes (ClientPtr 
           tmp = *((CARD32 *) &stuff[1] + pback_offset);
           if ((tmp != None) && (tmp != ParentRelative)) {
              if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
-                  client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+                  client, tmp, XRT_PIXMAP, DixReadAccess)))
                 return BadPixmap;
           }
        }
@@ -1301,7 +1301,7 @@ ProcScreenSaverSetAttributes (ClientPtr 
           tmp = *((CARD32 *) &stuff[1] + pbord_offset);
           if (tmp != CopyFromParent) {
              if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
-                  client, tmp, XRT_PIXMAP, SecurityReadAccess)))
+                  client, tmp, XRT_PIXMAP, DixReadAccess)))
                 return BadPixmap;
           }
        }
@@ -1311,7 +1311,7 @@ ProcScreenSaverSetAttributes (ClientPtr 
            tmp = *((CARD32 *) &stuff[1] + cmap_offset);
            if ((tmp != CopyFromParent) && (tmp != None)) {
              if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
-                  client, tmp, XRT_COLORMAP, SecurityReadAccess)))
+                  client, tmp, XRT_COLORMAP, DixReadAccess)))
                  return BadColor;
            }
        }
@@ -1351,7 +1351,7 @@ ProcScreenSaverUnsetAttributes (ClientPt
        int i;
 
        if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-                   client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+                   client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
            return BadDrawable;
 
        for(i = PanoramiXNumScreens - 1; i > 0; i--) {
diff --git a/Xext/security.c b/Xext/security.c
index 572f811..4fbf6f2 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -600,7 +600,7 @@ ProcSecurityRevokeAuthorization(
     REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
 
     pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client,
-	stuff->authId, SecurityAuthorizationResType, SecurityDestroyAccess);
+	stuff->authId, SecurityAuthorizationResType, DixDestroyAccess);
     if (!pAuth)
 	return SecurityErrorBase + XSecurityBadAuthorization;
 
@@ -966,7 +966,7 @@ CALLBACK(SecurityCheckResourceIDAccess)
     int cid, reqtype;
 
     if (TRUSTLEVEL(client) == XSecurityClientTrusted ||
-	SecurityUnknownAccess == access_mode)
+	DixUnknownAccess == access_mode)
 	return;       /* for compatibility, we have to allow access */
 
     cid = CLIENT_ID(id);
@@ -1217,7 +1217,7 @@ CALLBACK(SecurityCheckHostlistAccess)
     if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
     {
 	rec->rval = FALSE;
-	if (rec->access_mode == SecurityWriteAccess)
+	if (rec->access_mode == DixWriteAccess)
 	    SecurityAudit("client %d attempted to change host access\n",
 			  rec->client->index);
 	else
@@ -1798,11 +1798,11 @@ CALLBACK(SecurityCheckPropertyAccess)
 	     * executed a continue, which will skip the follwing code.
 	     */
 	    action = XaceAllowOperation;
-	    if (access_mode & SecurityReadAccess)
+	    if (access_mode & DixReadAccess)
 		action = max(action, pacl->readAction);
-	    if (access_mode & SecurityWriteAccess)
+	    if (access_mode & DixWriteAccess)
 		action = max(action, pacl->writeAction);
-	    if (access_mode & SecurityDestroyAccess)
+	    if (access_mode & DixDestroyAccess)
 		action = max(action, pacl->destroyAction);
 	    break;
 	} /* end for each pacl */
diff --git a/Xext/shape.c b/Xext/shape.c
index 4d9d3fb..4a798da 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -390,7 +390,7 @@ ProcPanoramiXShapeRectangles(
     REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
 	return BadWindow;
 
     FOR_NSCREENS(j) {
@@ -422,7 +422,7 @@ ProcShapeMask (client)
 
     REQUEST_SIZE_MATCH (xShapeMaskReq);
     UpdateCurrentTime();
-    pWin = SecurityLookupWindow (stuff->dest, client, SecurityWriteAccess);
+    pWin = SecurityLookupWindow (stuff->dest, client, DixWriteAccess);
     if (!pWin)
 	return BadWindow;
     switch (stuff->destKind) {
@@ -444,7 +444,7 @@ ProcShapeMask (client)
 	srcRgn = 0;
     else {
         pPixmap = (PixmapPtr) SecurityLookupIDByType(client, stuff->src,
-						RT_PIXMAP, SecurityReadAccess);
+						RT_PIXMAP, DixReadAccess);
         if (!pPixmap)
 	    return BadPixmap;
 	if (pPixmap->drawable.pScreen != pScreen ||
@@ -488,12 +488,12 @@ ProcPanoramiXShapeMask(
     REQUEST_SIZE_MATCH (xShapeMaskReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
 	return BadWindow;
 
     if(stuff->src != None) {
 	if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->src, XRT_PIXMAP, SecurityReadAccess)))
+		client, stuff->src, XRT_PIXMAP, DixReadAccess)))
 	    return BadPixmap;
     } else
 	pmap = NULL;
@@ -616,11 +616,11 @@ ProcPanoramiXShapeCombine(
     REQUEST_AT_LEAST_SIZE (xShapeCombineReq);
 
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
 	return BadWindow;
 
     if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->src, XRT_WINDOW, SecurityReadAccess)))
+		client, stuff->src, XRT_WINDOW, DixReadAccess)))
 	return BadWindow;
 
     FOR_NSCREENS(j) {
@@ -688,7 +688,7 @@ ProcPanoramiXShapeOffset(
     REQUEST_AT_LEAST_SIZE (xShapeOffsetReq);
    
     if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
+		client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
 	return BadWindow;
 
     FOR_NSCREENS(j) {
@@ -822,11 +822,11 @@ ProcShapeSelectInput (client)
     XID			clientResource;
 
     REQUEST_SIZE_MATCH (xShapeSelectInputReq);
-    pWin = SecurityLookupWindow (stuff->window, client, SecurityWriteAccess);
+    pWin = SecurityLookupWindow (stuff->window, client, DixWriteAccess);
     if (!pWin)
 	return BadWindow;
     pHead = (ShapeEventPtr *)SecurityLookupIDByType(client,
-			pWin->drawable.id, EventType, SecurityWriteAccess);
+			pWin->drawable.id, EventType, DixWriteAccess);
     switch (stuff->enable) {
     case xTrue:
 	if (pHead) {
@@ -999,7 +999,7 @@ ProcShapeInputSelected (client)
     if (!pWin)
 	return BadWindow;
     pHead = (ShapeEventPtr *) SecurityLookupIDByType(client,
-			pWin->drawable.id, EventType, SecurityReadAccess);
+			pWin->drawable.id, EventType, DixReadAccess);
     enabled = xFalse;
     if (pHead) {
     	for (pShapeEvent = *pHead;
diff --git a/Xext/shm.c b/Xext/shm.c
index be79862..0c2299a 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -571,11 +571,11 @@ ProcPanoramiXShmPutImage(register Client
     REQUEST_SIZE_MATCH(xShmPutImageReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-                client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+                client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
         return BadDrawable;
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->gc, XRT_GC, SecurityReadAccess)))
+                client, stuff->gc, XRT_GC, DixReadAccess)))
         return BadGC;
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -621,7 +621,7 @@ ProcPanoramiXShmGetImage(ClientPtr clien
     }
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;
 
     if (draw->type == XRT_PIXMAP)
diff --git a/Xext/sync.c b/Xext/sync.c
index 7def85b..1d89934 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -436,7 +436,7 @@ SyncInitTrigger(client, pTrigger, counte
 	if (counter == None)
 	    pCounter = NULL;
 	else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType(
-			client, counter, RTCounter, SecurityReadAccess)))
+			client, counter, RTCounter, DixReadAccess)))
 	{
 	    client->errorValue = counter;
 	    return SyncErrorBase + XSyncBadCounter;
@@ -1550,7 +1550,7 @@ ProcSyncSetCounter(client)
     REQUEST_SIZE_MATCH(xSyncSetCounterReq);
 
     pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->cid,
-					   RTCounter, SecurityWriteAccess);
+					   RTCounter, DixWriteAccess);
     if (pCounter == NULL)
     {
 	client->errorValue = stuff->cid;
@@ -1583,7 +1583,7 @@ ProcSyncChangeCounter(client)
     REQUEST_SIZE_MATCH(xSyncChangeCounterReq);
 
     pCounter = (SyncCounter *) SecurityLookupIDByType(client, stuff->cid,
-					    RTCounter, SecurityWriteAccess);
+					    RTCounter, DixWriteAccess);
     if (pCounter == NULL)
     {
 	client->errorValue = stuff->cid;
@@ -1621,7 +1621,7 @@ ProcSyncDestroyCounter(client)
     REQUEST_SIZE_MATCH(xSyncDestroyCounterReq);
 
     pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter,
-					   RTCounter, SecurityDestroyAccess);
+					   RTCounter, DixDestroyAccess);
     if (pCounter == NULL)
     {
 	client->errorValue = stuff->counter;
@@ -1767,7 +1767,7 @@ ProcSyncQueryCounter(client)
     REQUEST_SIZE_MATCH(xSyncQueryCounterReq);
 
     pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter,
-					    RTCounter, SecurityReadAccess);
+					    RTCounter, DixReadAccess);
     if (pCounter == NULL)
     {
 	client->errorValue = stuff->counter;
@@ -1896,7 +1896,7 @@ ProcSyncChangeAlarm(client)
     REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
 
     if (!(pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
-					      RTAlarm, SecurityWriteAccess)))
+					      RTAlarm, DixWriteAccess)))
     {
 	client->errorValue = stuff->alarm;
 	return SyncErrorBase + XSyncBadAlarm;
@@ -1937,7 +1937,7 @@ ProcSyncQueryAlarm(client)
     REQUEST_SIZE_MATCH(xSyncQueryAlarmReq);
 
     pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
-						RTAlarm, SecurityReadAccess);
+						RTAlarm, DixReadAccess);
     if (!pAlarm)
     {
 	client->errorValue = stuff->alarm;
@@ -1997,7 +1997,7 @@ ProcSyncDestroyAlarm(client)
     REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq);
 
     if (!((SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
-					      RTAlarm, SecurityDestroyAccess)))
+					      RTAlarm, DixDestroyAccess)))
     {
 	client->errorValue = stuff->alarm;
 	return SyncErrorBase + XSyncBadAlarm;
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index bd25056..4464706 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -445,11 +445,11 @@ ProcXF86BigfontQueryFont(
 #endif
     client->errorValue = stuff->id;		/* EITHER font or gc */
     pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
-					    SecurityReadAccess);
+					    DixReadAccess);
     if (!pFont) {
 	/* can't use VERIFY_GC because it might return BadGC */
 	GC *pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC,
-						SecurityReadAccess);
+						DixReadAccess);
         if (!pGC) {
 	    client->errorValue = stuff->id;
             return BadFont;    /* procotol spec says only error is BadFont */
diff --git a/Xext/xprint.c b/Xext/xprint.c
index 29d3262..669ad27 100644
--- a/Xext/xprint.c
+++ b/Xext/xprint.c
@@ -749,7 +749,7 @@ ProcXpGetPageDimensions(ClientPtr client
     if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
 						       stuff->printContext,
 						       RTcontext,
-						       SecurityReadAccess))
+						       DixReadAccess))
        == (XpContextPtr)NULL)
     {
 	client->errorValue = stuff->printContext;
@@ -811,7 +811,7 @@ ProcXpSetImageResolution(ClientPtr clien
     if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
 						       stuff->printContext,
 						       RTcontext,
-						       SecurityWriteAccess))
+						       DixWriteAccess))
        == (XpContextPtr)NULL)
     {
 	client->errorValue = stuff->printContext;
@@ -859,7 +859,7 @@ ProcXpGetImageResolution(ClientPtr clien
     if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
 						       stuff->printContext,
 						       RTcontext,
-						       SecurityReadAccess))
+						       DixReadAccess))
        == (XpContextPtr)NULL)
     {
 	client->errorValue = stuff->printContext;
@@ -1068,7 +1068,7 @@ ProcXpSetContext(ClientPtr client)
     if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
 						       stuff->printContext,
 						       RTcontext,
-						       SecurityWriteAccess))
+						       DixWriteAccess))
        == (XpContextPtr)NULL)
     {
 	client->errorValue = stuff->printContext;
@@ -1141,7 +1141,7 @@ ProcXpDestroyContext(ClientPtr client)
     if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
 						       stuff->printContext,
 						       RTcontext,
-						       SecurityDestroyAccess))
+						       DixDestroyAccess))
        == (XpContextPtr)NULL)
     {
 	client->errorValue = stuff->printContext;
@@ -1167,7 +1167,7 @@ ProcXpGetContextScreen(ClientPtr client)
     if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
 						       stuff->printContext,
 						       RTcontext,
-						       SecurityReadAccess))
+						       DixReadAccess))
        == (XpContextPtr)NULL)
         return XpErrorBase+XPBadContext;
     
@@ -1853,7 +1853,7 @@ ProcXpStartPage(ClientPtr client)
 	return XpErrorBase+XPBadSequence;
 
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityWriteAccess);
+					   DixWriteAccess);
     if (!pWin || pWin->drawable.pScreen->myNum != pContext->screenNum)
 	return BadWindow;
 
@@ -1994,7 +1994,7 @@ ProcXpGetDocumentData(ClientPtr client)
     if((pContext = (XpContextPtr)SecurityLookupIDByType(client,
 							stuff->printContext, 
 							RTcontext,
-							SecurityWriteAccess))
+							DixWriteAccess))
        == (XpContextPtr)NULL)
     {
         client->errorValue = stuff->printContext;
@@ -2077,7 +2077,7 @@ ProcXpGetAttributes(ClientPtr client)
 						client,
 						stuff->printContext,
 						RTcontext,
-						SecurityReadAccess))
+						DixReadAccess))
 	   == (XpContextPtr)NULL)
         {
 	    client->errorValue = stuff->printContext;
@@ -2149,7 +2149,7 @@ ProcXpSetAttributes(ClientPtr client)
 					client,
 					stuff->printContext,
 					RTcontext,
-					SecurityWriteAccess))
+					DixWriteAccess))
        == (XpContextPtr)NULL)
     {
         client->errorValue = stuff->printContext;
@@ -2229,7 +2229,7 @@ ProcXpGetOneAttribute(ClientPtr client)
 						client,
 						stuff->printContext, 
 						RTcontext,
-						SecurityReadAccess))
+						DixReadAccess))
 	   == (XpContextPtr)NULL)
         {
 	    client->errorValue = stuff->printContext;
@@ -2300,7 +2300,7 @@ ProcXpSelectInput(ClientPtr client)
     if((pContext=(XpContextPtr)SecurityLookupIDByType(client,
 						      stuff->printContext,
 						      RTcontext,
-						      SecurityWriteAccess))
+						      DixWriteAccess))
        == (XpContextPtr)NULL)
     {
 	client->errorValue = stuff->printContext;
@@ -2336,7 +2336,7 @@ ProcXpInputSelected(ClientPtr client)
     if((pContext=(XpContextPtr)SecurityLookupIDByType(client,
 						      stuff->printContext,
 						      RTcontext,
-						      SecurityReadAccess))
+						      DixReadAccess))
        == (XpContextPtr)NULL)
     {
 	client->errorValue = stuff->printContext;
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index 0c7a381..ec2b4f8 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -1877,11 +1877,11 @@ XineramaXvStopVideo(ClientPtr client)
    REQUEST_SIZE_MATCH(xvStopVideoReq);
 
    if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-                client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+                client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
         return BadDrawable;
 
    if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->port, XvXRTPort, SecurityReadAccess)))
+                client, stuff->port, XvXRTPort, DixReadAccess)))
         return _XvBadPort;
 
    FOR_NSCREENS_BACKWARD(i) {
@@ -1905,7 +1905,7 @@ XineramaXvSetPortAttribute(ClientPtr cli
     REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
 
     if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->port, XvXRTPort, SecurityReadAccess)))
+                client, stuff->port, XvXRTPort, DixReadAccess)))
         return _XvBadPort;
 
     FOR_NSCREENS_BACKWARD(i) {
@@ -1931,15 +1931,15 @@ XineramaXvShmPutImage(ClientPtr client)
     REQUEST_SIZE_MATCH(xvShmPutImageReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-                client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+                client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
         return BadDrawable;
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->gc, XRT_GC, SecurityReadAccess)))
+                client, stuff->gc, XRT_GC, DixReadAccess)))
         return BadGC;    
 
     if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->port, XvXRTPort, SecurityReadAccess)))
+                client, stuff->port, XvXRTPort, DixReadAccess)))
         return _XvBadPort;
  
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -1978,15 +1978,15 @@ XineramaXvPutImage(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xvPutImageReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-                client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+                client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
         return BadDrawable;
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->gc, XRT_GC, SecurityReadAccess)))
+                client, stuff->gc, XRT_GC, DixReadAccess)))
         return BadGC;    
 
     if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
-		client, stuff->port, XvXRTPort, SecurityReadAccess)))
+		client, stuff->port, XvXRTPort, DixReadAccess)))
 	return _XvBadPort;
  
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -2023,15 +2023,15 @@ XineramaXvPutVideo(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xvPutVideoReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-                client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+                client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
         return BadDrawable;
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->gc, XRT_GC, SecurityReadAccess)))
+                client, stuff->gc, XRT_GC, DixReadAccess)))
         return BadGC;
 
     if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->port, XvXRTPort, SecurityReadAccess)))
+                client, stuff->port, XvXRTPort, DixReadAccess)))
         return _XvBadPort;
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@@ -2068,15 +2068,15 @@ XineramaXvPutStill(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xvPutImageReq);
 
     if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
-                client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+                client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
         return BadDrawable;
 
     if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->gc, XRT_GC, SecurityReadAccess)))
+                client, stuff->gc, XRT_GC, DixReadAccess)))
         return BadGC;
 
     if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
-                client, stuff->port, XvXRTPort, SecurityReadAccess)))
+                client, stuff->port, XvXRTPort, DixReadAccess)))
         return _XvBadPort;
 
     isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
diff --git a/damageext/damageext.c b/damageext/damageext.c
index 225f9ec..c8f28e9 100755
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -179,7 +179,7 @@ ProcDamageCreate (ClientPtr client)
     REQUEST_SIZE_MATCH(xDamageCreateReq);
     LEGAL_NEW_RESOURCE(stuff->damage, client);
     SECURITY_VERIFY_DRAWABLE (pDrawable, stuff->drawable, client,
-			      SecurityReadAccess);
+			      DixReadAccess);
     switch (stuff->level) {
     case XDamageReportRawRectangles:
 	level = DamageReportRawRegion;
@@ -237,7 +237,7 @@ ProcDamageDestroy (ClientPtr client)
     DamageExtPtr    pDamageExt;
 
     REQUEST_SIZE_MATCH(xDamageDestroyReq);
-    VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, SecurityWriteAccess);
+    VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess);
     FreeResource (stuff->damage, RT_NONE);
     return (client->noClientException);
 }
@@ -251,9 +251,9 @@ ProcDamageSubtract (ClientPtr client)
     RegionPtr	    pParts;
 
     REQUEST_SIZE_MATCH(xDamageSubtractReq);
-    VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, SecurityWriteAccess);
-    VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, SecurityWriteAccess);
-    VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, SecurityWriteAccess);
+    VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess);
+    VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, DixWriteAccess);
+    VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, DixWriteAccess);
 
     if (pDamageExt->level != DamageReportRawRegion)
     {
diff --git a/dbe/dbe.c b/dbe/dbe.c
index 5b43dd1..649143c 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -406,7 +406,7 @@ ProcDbeAllocateBackBufferName(ClientPtr 
 
     /* The window must be valid. */
     if (!(pWin = SecurityLookupWindow(stuff->window, client,
-				      SecurityWriteAccess)))
+				      DixWriteAccess)))
     {
 	return(BadWindow);
     }
@@ -633,9 +633,9 @@ ProcDbeDeallocateBackBufferName(ClientPt
 
     /* Buffer name must be valid */
     if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client,
-		stuff->buffer, dbeWindowPrivResType, SecurityDestroyAccess)) ||
+		stuff->buffer, dbeWindowPrivResType, DixDestroyAccess)) ||
         !(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType,
-				 SecurityDestroyAccess)))
+				 DixDestroyAccess)))
     {
         client->errorValue = stuff->buffer;
         return(dbeErrorBase + DbeBadBuffer);
@@ -730,7 +730,7 @@ ProcDbeSwapBuffers(ClientPtr client)
 
         /* Each window must be a valid window - BadWindow. */
         if (!(pWin = SecurityLookupWindow(dbeSwapInfo[i].window, client,
-					  SecurityWriteAccess)))
+					  DixWriteAccess)))
         {
             DEALLOCATE_LOCAL(swapInfo);
 	    return(BadWindow);
@@ -890,7 +890,7 @@ ProcDbeGetVisualInfo(ClientPtr client)
         for (i = 0; i < stuff->n; i++)
         {
             if (!(pDrawables[i] = (DrawablePtr)SecurityLookupDrawable(
-				drawables[i], client, SecurityReadAccess)))
+				drawables[i], client, DixReadAccess)))
             {
                 DEALLOCATE_LOCAL(pDrawables);
                 return(BadDrawable);
@@ -1047,7 +1047,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr
     REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq);
 
     if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client,
-		stuff->buffer, dbeWindowPrivResType, SecurityReadAccess)))
+		stuff->buffer, dbeWindowPrivResType, DixReadAccess)))
     {
         rep.attributes = None;
     }
diff --git a/dix/colormap.c b/dix/colormap.c
index b8f2f4a..a74cb39 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -903,7 +903,7 @@ AllocColor (ColormapPtr pmap, 
 	{
 	    ColormapPtr prootmap = (ColormapPtr)
 		SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap,
-					 RT_COLORMAP, SecurityReadAccess);
+					 RT_COLORMAP, DixReadAccess);
 
 	    if (pmap->class == prootmap->class)
 		FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb, 
@@ -920,7 +920,7 @@ AllocColor (ColormapPtr pmap, 
 	{
 	    ColormapPtr prootmap = (ColormapPtr)
 		SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap,
-					 RT_COLORMAP, SecurityReadAccess);
+					 RT_COLORMAP, DixReadAccess);
 
 	    if (pmap->class == prootmap->class)
 	    {
diff --git a/dix/cursor.c b/dix/cursor.c
index b9ede1f..7071d83 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -262,9 +262,9 @@ AllocGlyphCursor(Font source, unsigned s
     GlyphSharePtr pShare;
 
     sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT,
-						  SecurityReadAccess);
+						  DixReadAccess);
     maskfont = (FontPtr) SecurityLookupIDByType(client, mask, RT_FONT,
-						SecurityReadAccess);
+						DixReadAccess);
 
     if (!sourcefont)
     {
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 0a761eb..a3de07f 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -563,7 +563,7 @@ ProcCreateWindow(ClientPtr client)
     
     LEGAL_NEW_RESOURCE(stuff->wid, client);
     if (!(pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client,
-						    SecurityWriteAccess)))
+						    DixWriteAccess)))
         return BadWindow;
     len = client->req_len - (sizeof(xCreateWindowReq) >> 2);
     if (Ones(stuff->mask) != len)
@@ -604,7 +604,7 @@ ProcChangeWindowAttributes(register Clie
 
     REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityWriteAccess);
+					   DixWriteAccess);
     if (!pWin)
         return(BadWindow);
     len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2);
@@ -629,7 +629,7 @@ ProcGetWindowAttributes(register ClientP
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     GetWindowAttributes(pWin, client, &wa);
@@ -645,7 +645,7 @@ ProcDestroyWindow(register ClientPtr cli
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
-					   SecurityDestroyAccess);
+					   DixDestroyAccess);
     if (!pWin)
         return(BadWindow);
     if (pWin->parent)
@@ -661,7 +661,7 @@ ProcDestroySubwindows(register ClientPtr
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
-					   SecurityDestroyAccess);
+					   DixDestroyAccess);
     if (!pWin)
         return(BadWindow);
     DestroySubwindows(pWin, client);
@@ -677,7 +677,7 @@ ProcChangeSaveSet(register ClientPtr cli
 		  
     REQUEST_SIZE_MATCH(xChangeSaveSetReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id)))
@@ -706,11 +706,11 @@ ProcReparentWindow(register ClientPtr cl
 
     REQUEST_SIZE_MATCH(xReparentWindowReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityWriteAccess);
+					   DixWriteAccess);
     if (!pWin)
         return(BadWindow);
     pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client,
-					      SecurityWriteAccess);
+					      DixWriteAccess);
     if (!pParent)
         return(BadWindow);
     if (SAME_SCREENS(pWin->drawable, pParent->drawable))
@@ -740,7 +740,7 @@ ProcMapWindow(register ClientPtr client)
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     MapWindow(pWin, client);
@@ -756,7 +756,7 @@ ProcMapSubwindows(register ClientPtr cli
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client,
-					    SecurityReadAccess);
+					    DixReadAccess);
     if (!pWin)
         return(BadWindow);
     MapSubwindows(pWin, client);
@@ -772,7 +772,7 @@ ProcUnmapWindow(register ClientPtr clien
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client,
-					    SecurityReadAccess);
+					    DixReadAccess);
     if (!pWin)
         return(BadWindow);
     UnmapWindow(pWin, FALSE);
@@ -788,7 +788,7 @@ ProcUnmapSubwindows(register ClientPtr c
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client,
-					    SecurityReadAccess);
+					    DixReadAccess);
     if (!pWin)
         return(BadWindow);
     UnmapSubwindows(pWin);
@@ -805,7 +805,7 @@ ProcConfigureWindow(register ClientPtr c
 
     REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
     pWin = (WindowPtr)SecurityLookupWindow( stuff->window, client,
-					    SecurityWriteAccess);
+					    DixWriteAccess);
     if (!pWin)
         return(BadWindow);
     len = client->req_len - (sizeof(xConfigureWindowReq) >> 2);
@@ -833,7 +833,7 @@ ProcCirculateWindow(register ClientPtr c
         return BadValue;
     }
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityWriteAccess);
+					   DixWriteAccess);
     if (!pWin)
         return(BadWindow);
     CirculateWindow(pWin, (int)stuff->direction, client);
@@ -847,7 +847,7 @@ GetGeometry(register ClientPtr client, x
     REQUEST(xResourceReq);
 
     REQUEST_SIZE_MATCH(xResourceReq);
-    SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->id, client, SecurityReadAccess);
+    SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->id, client, DixReadAccess);
     rep->type = X_Reply;
     rep->length = 0;
     rep->sequenceNumber = client->sequence;
@@ -906,7 +906,7 @@ ProcQueryTree(register ClientPtr client)
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     reply.type = X_Reply;
@@ -1022,7 +1022,7 @@ ProcSetSelectionOwner(register ClientPtr
     if (stuff->window != None)
     {
         pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					       SecurityReadAccess);
+					       DixReadAccess);
         if (!pWin)
             return(BadWindow);
     }
@@ -1141,7 +1141,7 @@ ProcConvertSelection(register ClientPtr 
 
     REQUEST_SIZE_MATCH(xConvertSelectionReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->requestor, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
 
@@ -1159,7 +1159,7 @@ ProcConvertSelection(register ClientPtr 
 	    (CurrentSelections[i].window != None) &&
 	    XaceHook(XACE_RESOURCE_ACCESS, client,
 		     CurrentSelections[i].window, RT_WINDOW,
-		     SecurityReadAccess, CurrentSelections[i].pWin))
+		     DixReadAccess, CurrentSelections[i].pWin))
 	{        
 	    event.u.u.type = SelectionRequest;
 	    event.u.selectionRequest.time = stuff->time;
@@ -1263,11 +1263,11 @@ ProcTranslateCoords(register ClientPtr c
 
     REQUEST_SIZE_MATCH(xTranslateCoordsReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->srcWid, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     pDst = (WindowPtr)SecurityLookupWindow(stuff->dstWid, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pDst)
         return(BadWindow);
     rep.type = X_Reply;
@@ -1358,7 +1358,7 @@ ProcCloseFont(register ClientPtr client)
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
-					    SecurityDestroyAccess);
+					    DixDestroyAccess);
     if ( pFont != (FontPtr)NULL)	/* id was valid */
     {
         FreeResource(stuff->id, RT_NONE);
@@ -1382,12 +1382,12 @@ ProcQueryFont(register ClientPtr client)
     REQUEST_SIZE_MATCH(xResourceReq);
     client->errorValue = stuff->id;		/* EITHER font or gc */
     pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
-					    SecurityReadAccess);
+					    DixReadAccess);
     if (!pFont)
     {
 	  /* can't use VERIFY_GC because it might return BadGC */
 	pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC,
-					    SecurityReadAccess);
+					    DixReadAccess);
         if (!pGC)
 	{
 	    client->errorValue = stuff->id;
@@ -1443,11 +1443,11 @@ ProcQueryTextExtents(register ClientPtr 
     REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq);
         
     pFont = (FontPtr)SecurityLookupIDByType(client, stuff->fid, RT_FONT,
-					    SecurityReadAccess);
+					    DixReadAccess);
     if (!pFont)
     {
         pGC = (GC *)SecurityLookupIDByType(client, stuff->fid, RT_GC,
-					   SecurityReadAccess);
+					   DixReadAccess);
         if (!pGC)
 	{
 	    client->errorValue = stuff->fid;
@@ -1526,7 +1526,7 @@ ProcCreatePixmap(register ClientPtr clie
     client->errorValue = stuff->pid;
     LEGAL_NEW_RESOURCE(stuff->pid, client);
     SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->drawable, client,
-				 SecurityReadAccess);
+				 DixReadAccess);
     if (!stuff->width || !stuff->height)
     {
 	client->errorValue = 0;
@@ -1581,7 +1581,7 @@ ProcFreePixmap(register ClientPtr client
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pMap = (PixmapPtr)SecurityLookupIDByType(client, stuff->id, RT_PIXMAP,
-					     SecurityDestroyAccess);
+					     DixDestroyAccess);
     if (pMap) 
     {
 	FreeResource(stuff->id, RT_NONE);
@@ -1607,7 +1607,7 @@ ProcCreateGC(register ClientPtr client)
     client->errorValue = stuff->gc;
     LEGAL_NEW_RESOURCE(stuff->gc, client);
     SECURITY_VERIFY_DRAWABLE (pDraw, stuff->drawable, client,
-			      SecurityReadAccess);
+			      DixReadAccess);
     len = client->req_len -  (sizeof(xCreateGCReq) >> 2);
     if (len != Ones(stuff->mask))
         return BadLength;
@@ -1629,7 +1629,7 @@ ProcChangeGC(register ClientPtr client)
     unsigned len;
 		
     REQUEST_AT_LEAST_SIZE(xChangeGCReq);
-    SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityWriteAccess);
+    SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixWriteAccess);
     len = client->req_len -  (sizeof(xChangeGCReq) >> 2);
     if (len != Ones(stuff->mask))
         return BadLength;
@@ -1653,8 +1653,8 @@ ProcCopyGC(register ClientPtr client)
     REQUEST(xCopyGCReq);
 
     REQUEST_SIZE_MATCH(xCopyGCReq);
-    SECURITY_VERIFY_GC( pGC, stuff->srcGC, client, SecurityReadAccess);
-    SECURITY_VERIFY_GC( dstGC, stuff->dstGC, client, SecurityWriteAccess);
+    SECURITY_VERIFY_GC( pGC, stuff->srcGC, client, DixReadAccess);
+    SECURITY_VERIFY_GC( dstGC, stuff->dstGC, client, DixWriteAccess);
     if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth))
         return (BadMatch);    
     result = CopyGC(pGC, dstGC, stuff->mask);
@@ -1681,7 +1681,7 @@ ProcSetDashes(register ClientPtr client)
          return BadValue;
     }
 
-    SECURITY_VERIFY_GC(pGC,stuff->gc, client, SecurityWriteAccess);
+    SECURITY_VERIFY_GC(pGC,stuff->gc, client, DixWriteAccess);
 
     result = SetDashes(pGC, stuff->dashOffset, stuff->nDashes,
 		       (unsigned char *)&stuff[1]);
@@ -1709,7 +1709,7 @@ ProcSetClipRectangles(register ClientPtr
 	client->errorValue = stuff->ordering;
         return BadValue;
     }
-    SECURITY_VERIFY_GC(pGC,stuff->gc, client, SecurityWriteAccess);
+    SECURITY_VERIFY_GC(pGC,stuff->gc, client, DixWriteAccess);
 		 
     nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq);
     if (nr & 4)
@@ -1730,7 +1730,7 @@ ProcFreeGC(register ClientPtr client)
     REQUEST(xResourceReq);
 
     REQUEST_SIZE_MATCH(xResourceReq);
-    SECURITY_VERIFY_GC(pGC, stuff->id, client, SecurityDestroyAccess);
+    SECURITY_VERIFY_GC(pGC, stuff->id, client, DixDestroyAccess);
     FreeResource(stuff->id, RT_NONE);
     return(client->noClientException);
 }
@@ -1743,7 +1743,7 @@ ProcClearToBackground(register ClientPtr
 
     REQUEST_SIZE_MATCH(xClearAreaReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityWriteAccess);
+					   DixWriteAccess);
     if (!pWin)
         return(BadWindow);
     if (pWin->drawable.class == InputOnly)
@@ -1777,7 +1777,7 @@ ProcCopyArea(register ClientPtr client)
     if (stuff->dstDrawable != stuff->srcDrawable)
     {
 	SECURITY_VERIFY_DRAWABLE(pSrc, stuff->srcDrawable, client,
-				 SecurityReadAccess);
+				 DixReadAccess);
 	if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth))
 	{
 	    client->errorValue = stuff->dstDrawable;
@@ -1817,7 +1817,7 @@ ProcCopyPlane(register ClientPtr client)
     if (stuff->dstDrawable != stuff->srcDrawable)
     {
 	SECURITY_VERIFY_DRAWABLE(psrcDraw, stuff->srcDrawable, client,
-				 SecurityReadAccess);
+				 DixReadAccess);
 	if (pdstDraw->pScreen != psrcDraw->pScreen)
 	{
 	    client->errorValue = stuff->dstDrawable;
@@ -2156,7 +2156,7 @@ DoGetImage(register ClientPtr client, in
 	client->errorValue = format;
         return(BadValue);
     }
-    SECURITY_VERIFY_DRAWABLE(pDraw, drawable, client, SecurityReadAccess);
+    SECURITY_VERIFY_DRAWABLE(pDraw, drawable, client, DixReadAccess);
     if(pDraw->type == DRAWABLE_WINDOW)
     {
       if( /* check for being viewable */
@@ -2478,7 +2478,7 @@ ProcCreateColormap(register ClientPtr cl
     mid = stuff->mid;
     LEGAL_NEW_RESOURCE(mid, client);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
 
@@ -2508,7 +2508,7 @@ ProcFreeColormap(register ClientPtr clie
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pmap = (ColormapPtr )SecurityLookupIDByType(client, stuff->id, RT_COLORMAP,
-						SecurityDestroyAccess);
+						DixDestroyAccess);
     if (pmap) 
     {
 	/* Freeing a default colormap is a no-op */
@@ -2536,7 +2536,7 @@ ProcCopyColormapAndFree(register ClientP
     mid = stuff->mid;
     LEGAL_NEW_RESOURCE(mid, client);
     if( (pSrcMap = (ColormapPtr )SecurityLookupIDByType(client,	stuff->srcCmap,
-		RT_COLORMAP, SecurityReadAccess|SecurityWriteAccess)) )
+		RT_COLORMAP, DixReadAccess|DixWriteAccess)) )
     {
 	result = CopyColormapAndFree(mid, pSrcMap, client->index);
 	if (client->noClientException != Success)
@@ -2559,7 +2559,7 @@ ProcInstallColormap(register ClientPtr c
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id,
-					    RT_COLORMAP, SecurityReadAccess);
+					    RT_COLORMAP, DixReadAccess);
     if (pcmp)
     {
         (*(pcmp->pScreen->InstallColormap)) (pcmp);
@@ -2580,7 +2580,7 @@ ProcUninstallColormap(register ClientPtr
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id,
-					RT_COLORMAP, SecurityReadAccess);
+					RT_COLORMAP, DixReadAccess);
     if (pcmp)
     {
 	if(pcmp->mid != pcmp->pScreen->defColormap)
@@ -2604,7 +2604,7 @@ ProcListInstalledColormaps(register Clie
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
 
     if (!pWin)
         return(BadWindow);
@@ -2639,7 +2639,7 @@ ProcAllocColor (register ClientPtr clien
 
     REQUEST_SIZE_MATCH(xAllocColorReq);
     pmap = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					RT_COLORMAP, SecurityWriteAccess);
+					RT_COLORMAP, DixWriteAccess);
     if (pmap)
     {
 	acr.type = X_Reply;
@@ -2679,7 +2679,7 @@ ProcAllocNamedColor (register ClientPtr 
 
     REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					    RT_COLORMAP, SecurityWriteAccess);
+					    RT_COLORMAP, DixWriteAccess);
     if (pcmp)
     {
 	int		retval;
@@ -2731,7 +2731,7 @@ ProcAllocColorCells (register ClientPtr 
 
     REQUEST_SIZE_MATCH(xAllocColorCellsReq);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					RT_COLORMAP, SecurityWriteAccess);
+					RT_COLORMAP, DixWriteAccess);
     if (pcmp)
     {
 	xAllocColorCellsReply	accr;
@@ -2797,7 +2797,7 @@ ProcAllocColorPlanes(register ClientPtr 
 
     REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					RT_COLORMAP, SecurityWriteAccess);
+					RT_COLORMAP, DixWriteAccess);
     if (pcmp)
     {
 	xAllocColorPlanesReply	acpr;
@@ -2861,7 +2861,7 @@ ProcFreeColors(register ClientPtr client
 
     REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					RT_COLORMAP, SecurityWriteAccess);
+					RT_COLORMAP, DixWriteAccess);
     if (pcmp)
     {
 	int	count;
@@ -2896,7 +2896,7 @@ ProcStoreColors (ClientPtr client)
 
     REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					RT_COLORMAP, SecurityWriteAccess);
+					RT_COLORMAP, DixWriteAccess);
     if (pcmp)
     {
 	int	count;
@@ -2930,7 +2930,7 @@ ProcStoreNamedColor (register ClientPtr 
 
     REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					RT_COLORMAP, SecurityWriteAccess);
+					RT_COLORMAP, DixWriteAccess);
     if (pcmp)
     {
 	xColorItem	def;
@@ -2964,7 +2964,7 @@ ProcQueryColors(register ClientPtr clien
 
     REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					RT_COLORMAP, SecurityReadAccess);
+					RT_COLORMAP, DixReadAccess);
     if (pcmp)
     {
 	int			count, retval;
@@ -3015,7 +3015,7 @@ ProcLookupColor(register ClientPtr clien
 
     REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes);
     pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap,
-					RT_COLORMAP, SecurityReadAccess);
+					RT_COLORMAP, DixReadAccess);
     if (pcmp)
     {
 	xLookupColorReply lcr;
@@ -3065,9 +3065,9 @@ ProcCreateCursor (register ClientPtr cli
     LEGAL_NEW_RESOURCE(stuff->cid, client);
 
     src = (PixmapPtr)SecurityLookupIDByType(client, stuff->source,
-					      RT_PIXMAP, SecurityReadAccess);
+					      RT_PIXMAP, DixReadAccess);
     msk = (PixmapPtr)SecurityLookupIDByType(client, stuff->mask,
-					      RT_PIXMAP, SecurityReadAccess);
+					      RT_PIXMAP, DixReadAccess);
     if (   src == (PixmapPtr)NULL)
     {
 	client->errorValue = stuff->source;
@@ -3167,7 +3167,7 @@ ProcFreeCursor (register ClientPtr clien
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->id,
-					RT_CURSOR, SecurityDestroyAccess);
+					RT_CURSOR, DixDestroyAccess);
     if (pCursor) 
     {
 	FreeResource(stuff->id, RT_NONE);
@@ -3197,7 +3197,7 @@ ProcQueryBestSize (register ClientPtr cl
         return(BadValue);
     }
     SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->drawable, client,
-				 SecurityReadAccess);
+				 DixReadAccess);
     if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW)
 	return (BadMatch);
     pScreen = pDraw->pScreen;
@@ -3321,7 +3321,7 @@ ProcListHosts(register ClientPtr client)
     REQUEST_SIZE_MATCH(xListHostsReq);
 
     /* untrusted clients can't list hosts */
-    if (!XaceHook(XACE_HOSTLIST_ACCESS, client, SecurityReadAccess))
+    if (!XaceHook(XACE_HOSTLIST_ACCESS, client, DixReadAccess))
 	return BadAccess;
 
     result = GetHosts(&pdata, &nHosts, &len, &reply.enabled);
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 7e2ed50..d5b42dc 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1178,7 +1178,7 @@ doPolyText(ClientPtr client, register PT
     if (c->slept &&
 	c->pDraw &&
 	c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did,
-					RC_DRAWABLE, SecurityWriteAccess))
+					RC_DRAWABLE, DixWriteAccess))
     {
 	/* Our drawable has disappeared.  Treat like client died... ask
 	   the FPE code to clean up after client and avoid further
@@ -1208,7 +1208,7 @@ doPolyText(ClientPtr client, register PT
 		 | ((Font)*(c->pElt+2)) << 16
 		 | ((Font)*(c->pElt+1)) << 24;
 	    pFont = (FontPtr)SecurityLookupIDByType(client, fid, RT_FONT,
-						    SecurityReadAccess);
+						    DixReadAccess);
 	    if (!pFont)
 	    {
 		client->errorValue = fid;
@@ -1463,7 +1463,7 @@ doImageText(ClientPtr client, register I
     if (c->slept &&
 	c->pDraw &&
 	c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did,
-					RC_DRAWABLE, SecurityWriteAccess))
+					RC_DRAWABLE, DixWriteAccess))
     {
 	/* Our drawable has disappeared.  Treat like client died... ask
 	   the FPE code to clean up after client. */
@@ -2016,7 +2016,7 @@ FontPtr
 find_old_font(XID id)
 {
     return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE,
-					    SecurityUnknownAccess);
+					    DixUnknownAccess);
 }
 
 Font
diff --git a/dix/dixutils.c b/dix/dixutils.c
index af7e1c8..fca55d9 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -236,13 +236,13 @@ SecurityLookupDrawable(XID rid, ClientPt
 _X_EXPORT WindowPtr
 LookupWindow(XID rid, ClientPtr client)
 {
-    return SecurityLookupWindow(rid, client, SecurityUnknownAccess);
+    return SecurityLookupWindow(rid, client, DixUnknownAccess);
 }
 
 _X_EXPORT pointer
 LookupDrawable(XID rid, ClientPtr client)
 {
-    return SecurityLookupDrawable(rid, client, SecurityUnknownAccess);
+    return SecurityLookupDrawable(rid, client, DixUnknownAccess);
 }
 
 #else /* not XACE */
@@ -293,7 +293,7 @@ _X_EXPORT ClientPtr
 LookupClient(XID rid, ClientPtr client)
 {
     pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY,
-						    SecurityReadAccess);
+						    DixReadAccess);
     int clientIndex = CLIENT_ID(rid);
 
     if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT))
diff --git a/dix/events.c b/dix/events.c
index 0a39dcd..c7cf73e 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2235,7 +2235,7 @@ XineramaWarpPointer(ClientPtr client)
 
     if (stuff->dstWid != None)
     {
-	dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess);
+	dest = SecurityLookupWindow(stuff->dstWid, client, DixReadAccess);
 	if (!dest)
 	    return BadWindow;
     }
@@ -2248,7 +2248,7 @@ XineramaWarpPointer(ClientPtr client)
  	XID 	winID = stuff->srcWid;
         WindowPtr source;
 	
-	source = SecurityLookupWindow(winID, client, SecurityReadAccess);
+	source = SecurityLookupWindow(winID, client, DixReadAccess);
 	if (!source) return BadWindow;
 
 	winX = source->drawable.x;
@@ -2315,7 +2315,7 @@ ProcWarpPointer(ClientPtr client)
 
     if (stuff->dstWid != None)
     {
-	dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess);
+	dest = SecurityLookupWindow(stuff->dstWid, client, DixReadAccess);
 	if (!dest)
 	    return BadWindow;
     }
@@ -2328,7 +2328,7 @@ ProcWarpPointer(ClientPtr client)
  	XID 	winID = stuff->srcWid;
         WindowPtr source;
 	
-	source = SecurityLookupWindow(winID, client, SecurityReadAccess);
+	source = SecurityLookupWindow(winID, client, DixReadAccess);
 	if (!source) return BadWindow;
 
 	winX = source->drawable.x;
@@ -3551,7 +3551,7 @@ SetInputFocus(
     else if ((focusID == FollowKeyboard) && followOK)
 	focusWin = inputInfo.keyboard->focus->win;
     else if (!(focusWin = SecurityLookupWindow(focusID, client,
-					       SecurityReadAccess)))
+					       DixReadAccess)))
 	return BadWindow;
     else
     {
@@ -3671,7 +3671,7 @@ ProcGrabPointer(ClientPtr client)
 	client->errorValue = stuff->eventMask;
         return BadValue;
     }
-    pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess);
+    pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
     if (!pWin)
 	return BadWindow;
     if (stuff->confineTo == None)
@@ -3679,7 +3679,7 @@ ProcGrabPointer(ClientPtr client)
     else 
     {
 	confineTo = SecurityLookupWindow(stuff->confineTo, client,
-					 SecurityReadAccess);
+					 DixReadAccess);
 	if (!confineTo)
 	    return BadWindow;
     }
@@ -3688,7 +3688,7 @@ ProcGrabPointer(ClientPtr client)
     else
     {
 	cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
-						RT_CURSOR, SecurityReadAccess);
+						RT_CURSOR, DixReadAccess);
 	if (!cursor)
 	{
 	    client->errorValue = stuff->cursor;
@@ -3762,7 +3762,7 @@ ProcChangeActivePointerGrab(ClientPtr cl
     else
     {
 	newCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
-						RT_CURSOR, SecurityReadAccess);
+						RT_CURSOR, DixReadAccess);
 	if (!newCursor)
 	{
 	    client->errorValue = stuff->cursor;
@@ -3832,7 +3832,7 @@ GrabDevice(register ClientPtr client, re
 	client->errorValue = ownerEvents;
         return BadValue;
     }
-    pWin = SecurityLookupWindow(grabWindow, client, SecurityReadAccess);
+    pWin = SecurityLookupWindow(grabWindow, client, DixReadAccess);
     if (!pWin)
 	return BadWindow;
     time = ClientTimeToServerTime(ctime);
@@ -3920,7 +3920,7 @@ ProcQueryPointer(ClientPtr client)
     DeviceIntPtr mouse = inputInfo.pointer;
 
     REQUEST_SIZE_MATCH(xResourceReq);
-    pWin = SecurityLookupWindow(stuff->id, client, SecurityReadAccess);
+    pWin = SecurityLookupWindow(stuff->id, client, DixReadAccess);
     if (!pWin)
 	return BadWindow;
     if (mouse->valuator->motionHintWindow)
@@ -4087,7 +4087,7 @@ ProcSendEvent(ClientPtr client)
     }
     else
 	pWin = SecurityLookupWindow(stuff->destination, client,
-				    SecurityReadAccess);
+				    DixReadAccess);
     if (!pWin)
 	return BadWindow;
     if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue))
@@ -4125,7 +4125,7 @@ ProcUngrabKey(ClientPtr client)
     DeviceIntPtr keybd = inputInfo.keyboard;
 
     REQUEST_SIZE_MATCH(xUngrabKeyReq);
-    pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess);
+    pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
     if (!pWin)
 	return BadWindow;
 
@@ -4196,7 +4196,7 @@ ProcGrabKey(ClientPtr client)
 	client->errorValue = stuff->modifiers;
 	return BadValue;
     }
-    pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess);
+    pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
     if (!pWin)
 	return BadWindow;
 
@@ -4248,14 +4248,14 @@ ProcGrabButton(ClientPtr client)
 	client->errorValue = stuff->eventMask;
         return BadValue;
     }
-    pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess);
+    pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
     if (!pWin)
 	return BadWindow;
     if (stuff->confineTo == None)
        confineTo = NullWindow;
     else {
 	confineTo = SecurityLookupWindow(stuff->confineTo, client,
-					 SecurityReadAccess);
+					 DixReadAccess);
 	if (!confineTo)
 	    return BadWindow;
     }
@@ -4264,7 +4264,7 @@ ProcGrabButton(ClientPtr client)
     else
     {
 	cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
-						RT_CURSOR, SecurityReadAccess);
+						RT_CURSOR, DixReadAccess);
 	if (!cursor)
 	{
 	    client->errorValue = stuff->cursor;
@@ -4297,7 +4297,7 @@ ProcUngrabButton(ClientPtr client)
 	client->errorValue = stuff->modifiers;
 	return BadValue;
     }
-    pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess);
+    pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
     if (!pWin)
 	return BadWindow;
     tempGrab.resource = client->clientAsMask;
@@ -4451,7 +4451,7 @@ ProcRecolorCursor(ClientPtr client)
 
     REQUEST_SIZE_MATCH(xRecolorCursorReq);
     pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
-					RT_CURSOR, SecurityWriteAccess);
+					RT_CURSOR, DixWriteAccess);
     if ( !pCursor) 
     {
 	client->errorValue = stuff->cursor;
diff --git a/dix/gc.c b/dix/gc.c
index ed6bf26..5106fcd 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -271,7 +271,7 @@ dixChangeGC(ClientPtr client, register G
 		{
 		    NEXTVAL(XID, newpix);
 		    pPixmap = (PixmapPtr)SecurityLookupIDByType(client,
-					newpix, RT_PIXMAP, SecurityReadAccess);
+					newpix, RT_PIXMAP, DixReadAccess);
 		}
 		if (pPixmap)
 		{
@@ -307,7 +307,7 @@ dixChangeGC(ClientPtr client, register G
 		{
 		    NEXTVAL(XID, newstipple)
 		    pPixmap = (PixmapPtr)SecurityLookupIDByType(client,
-				newstipple, RT_PIXMAP, SecurityReadAccess);
+				newstipple, RT_PIXMAP, DixReadAccess);
 		}
 		if (pPixmap)
 		{
@@ -349,7 +349,7 @@ dixChangeGC(ClientPtr client, register G
 		{
 		    NEXTVAL(XID, newfont)
 		    pFont = (FontPtr)SecurityLookupIDByType(client, newfont,
-						RT_FONT, SecurityReadAccess);
+						RT_FONT, DixReadAccess);
 		}
 		if (pFont)
 		{
@@ -416,7 +416,7 @@ dixChangeGC(ClientPtr client, register G
 		    }
 		    else
 		        pPixmap = (PixmapPtr)SecurityLookupIDByType(client,
-					pid, RT_PIXMAP, SecurityReadAccess);
+					pid, RT_PIXMAP, DixReadAccess);
 		}
 
 		if (pPixmap)
diff --git a/dix/property.c b/dix/property.c
index 00d4856..5c1e957 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -105,7 +105,7 @@ ProcRotateProperties(ClientPtr client)
     REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2);
     UpdateCurrentTime();
     pWin = (WindowPtr) SecurityLookupWindow(stuff->window, client,
-					    SecurityWriteAccess);
+					    DixWriteAccess);
     if (!pWin)
         return(BadWindow);
     if (!stuff->nAtoms)
@@ -117,7 +117,7 @@ ProcRotateProperties(ClientPtr client)
     for (i = 0; i < stuff->nAtoms; i++)
     {
 	char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i],
-				SecurityReadAccess|SecurityWriteAccess);
+				DixReadAccess|DixWriteAccess);
 
         if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) {
             DEALLOCATE_LOCAL(props);
@@ -209,7 +209,7 @@ ProcChangeProperty(ClientPtr client)
     REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize);
 
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityWriteAccess);
+					   DixWriteAccess);
     if (!pWin)
 	return(BadWindow);
     if (!ValidAtom(stuff->property))
@@ -224,7 +224,7 @@ ProcChangeProperty(ClientPtr client)
     }
 
     switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
-		     SecurityWriteAccess))
+		     DixWriteAccess))
     {
     case XaceErrorOperation:
 	client->errorValue = stuff->property;
@@ -448,14 +448,14 @@ ProcGetProperty(ClientPtr client)
     unsigned long n, len, ind;
     WindowPtr pWin;
     xGetPropertyReply reply;
-    Mask access_mode = SecurityReadAccess;
+    Mask access_mode = DixReadAccess;
     REQUEST(xGetPropertyReq);
 
     REQUEST_SIZE_MATCH(xGetPropertyReq);
     if (stuff->delete)
 	UpdateCurrentTime();
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
 	return BadWindow;
 
@@ -491,7 +491,7 @@ ProcGetProperty(ClientPtr client)
 	return NullPropertyReply(client, None, 0, &reply);
 
     if (stuff->delete)
-	access_mode |= SecurityDestroyAccess;
+	access_mode |= DixDestroyAccess;
     switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
 		     access_mode))
     {
@@ -592,7 +592,7 @@ ProcListProperties(ClientPtr client)
 
     REQUEST_SIZE_MATCH(xResourceReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
 
@@ -637,7 +637,7 @@ ProcDeleteProperty(register ClientPtr cl
     REQUEST_SIZE_MATCH(xDeletePropertyReq);
     UpdateCurrentTime();
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityWriteAccess);
+					   DixWriteAccess);
     if (!pWin)
         return(BadWindow);
     if (!ValidAtom(stuff->property))
@@ -647,7 +647,7 @@ ProcDeleteProperty(register ClientPtr cl
     }
 
     switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property,
-		     SecurityDestroyAccess))
+		     DixDestroyAccess))
     {
     case XaceErrorOperation:
 	client->errorValue = stuff->property;
diff --git a/dix/resource.c b/dix/resource.c
index c204460..4468f45 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -944,12 +944,12 @@ _X_EXPORT pointer
 LookupIDByType(XID id, RESTYPE rtype)
 {
     return SecurityLookupIDByType(NullClient, id, rtype,
-				  SecurityUnknownAccess);
+				  DixUnknownAccess);
 }
 
 _X_EXPORT pointer
 LookupIDByClass(XID id, RESTYPE classes)
 {
     return SecurityLookupIDByClass(NullClient, id, classes,
-				   SecurityUnknownAccess);
+				   DixUnknownAccess);
 }
diff --git a/dix/window.c b/dix/window.c
index fa6906f..e33140d 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -1062,7 +1062,7 @@ ChangeWindowAttributes(register WindowPt
 	    else
 	    {	
 		pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID,
-						RT_PIXMAP, SecurityReadAccess);
+						RT_PIXMAP, DixReadAccess);
 		if (pPixmap != (PixmapPtr) NULL)
 		{
 		    if	((pPixmap->drawable.depth != pWin->drawable.depth) ||
@@ -1123,7 +1123,7 @@ ChangeWindowAttributes(register WindowPt
 	    else
 	    {	
 		pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID,
-					RT_PIXMAP, SecurityReadAccess);
+					RT_PIXMAP, DixReadAccess);
 		if (pPixmap)
 		{
 		    if	((pPixmap->drawable.depth != pWin->drawable.depth) ||
@@ -1333,7 +1333,7 @@ ChangeWindowAttributes(register WindowPt
 		goto PatchUp;
 	    }
 	    pCmap = (ColormapPtr)SecurityLookupIDByType(client, cmap,
-					      RT_COLORMAP, SecurityReadAccess);
+					      RT_COLORMAP, DixReadAccess);
 	    if (!pCmap)
 	    {
 		error = BadColor;
@@ -1409,7 +1409,7 @@ ChangeWindowAttributes(register WindowPt
 	    else
 	    {
 		pCursor = (CursorPtr)SecurityLookupIDByType(client, cursorID,
-						RT_CURSOR, SecurityReadAccess);
+						RT_CURSOR, DixReadAccess);
 		if (!pCursor)
 		{
 		    error = BadCursor;
@@ -2299,7 +2299,7 @@ ConfigureWindow(register WindowPtr pWin,
 	    sibwid = (Window ) *pVlist;
 	    pVlist++;
 	    pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid,
-						RT_WINDOW, SecurityReadAccess);
+						RT_WINDOW, DixReadAccess);
 	    if (!pSib)
 	    {
 		client->errorValue = sibwid;
diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c
index 6db036f..a9d8b56 100644
--- a/hw/darwin/quartz/applewm.c
+++ b/hw/darwin/quartz/applewm.c
@@ -268,7 +268,7 @@ ProcAppleWMSelectInput (client)
 
     REQUEST_SIZE_MATCH (xAppleWMSelectInputReq);
     pHead = (WMEventPtr *)SecurityLookupIDByType(client,
-                        eventResource, EventType, SecurityWriteAccess);
+                        eventResource, EventType, DixWriteAccess);
     if (stuff->mask != 0) {
         if (pHead) {
             /* check for existing entry. */
@@ -491,7 +491,7 @@ ProcAppleWMSetWindowLevel(
     REQUEST_SIZE_MATCH(xAppleWMSetWindowLevelReq);
 
     if (!(pWin = SecurityLookupWindow((Drawable)stuff->window,
-                                      client, SecurityReadAccess)))
+                                      client, DixReadAccess)))
     {
         return BadValue;
     }
@@ -603,7 +603,7 @@ ProcAppleWMFrameDraw(
     REQUEST_AT_LEAST_SIZE(xAppleWMFrameDrawReq);
 
     if (!(pWin = SecurityLookupWindow((Drawable)stuff->window,
-                                      client, SecurityReadAccess)))
+                                      client, DixReadAccess)))
     {
         return BadValue;
     }
diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c
index 6d9bae1..585d7e1 100644
--- a/hw/darwin/quartz/xpr/appledri.c
+++ b/hw/darwin/quartz/xpr/appledri.c
@@ -223,7 +223,7 @@ ProcAppleDRICreateSurface(
     if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable(
                                                 (Drawable)stuff->drawable,
                                                 client, 
-                                                SecurityReadAccess))) {
+                                                DixReadAccess))) {
         return BadValue;
     }
 
@@ -256,7 +256,7 @@ ProcAppleDRIDestroySurface(
     if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable(
                                                 (Drawable)stuff->drawable,
                                                 client, 
-                                                SecurityReadAccess))) {
+                                                DixReadAccess))) {
         return BadValue;
     }
 
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index 75623e6..02e8b1e 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -282,12 +282,12 @@ static int ProcDMXForceWindowCreation(Cl
         int          i;
 
         if (!(win = SecurityLookupIDByType(client, stuff->window, XRT_WINDOW,
-                                           SecurityReadAccess)))
+                                           DixReadAccess)))
             return -1;           /* BadWindow */
 
         FOR_NSCREENS(i) {
             if (!(pWin = SecurityLookupWindow(win->info[i].id, client,
-                                              SecurityReadAccess)))
+                                              DixReadAccess)))
                 return -1;       /* BadWindow */
 
             dmxForceWindowCreation(pWin);
@@ -297,7 +297,7 @@ static int ProcDMXForceWindowCreation(Cl
 #endif
 
     if (!(pWin = SecurityLookupWindow(stuff->window, client,
-                                      SecurityReadAccess)))
+                                      DixReadAccess)))
         return -1;               /* BadWindow */
 
     dmxForceWindowCreation(pWin);
@@ -556,12 +556,12 @@ static int dmxPopulatePanoramiX(ClientPt
     DMXWindowAttributesRec attr;
     
     if (!(win = SecurityLookupIDByType(client, window, XRT_WINDOW,
-                                       SecurityReadAccess)))
+                                       DixReadAccess)))
         return -1;               /* BadWindow */
     
     FOR_NSCREENS(i) {
         if (!(pWin = SecurityLookupWindow(win->info[i].id, client,
-                                          SecurityReadAccess)))
+                                          DixReadAccess)))
             return -1;          /* BadWindow */
         if (dmxGetWindowAttributes(pWin, &attr)) {
             screens[count] = attr.screen;
@@ -587,7 +587,7 @@ static int dmxPopulate(ClientPtr client,
                                     pos, vis);
 #endif
     
-    if (!(pWin = SecurityLookupWindow(window, client, SecurityReadAccess)))
+    if (!(pWin = SecurityLookupWindow(window, client, DixReadAccess)))
         return -1;               /* BadWindow */
 
     dmxGetWindowAttributes(pWin, &attr);
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index 9cdd123..3396925 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -247,7 +247,7 @@ static int dmxProcRenderCreateGlyphSet(C
 	/* Make sure we handle all errors here!! */
 	
 	glyphSet = SecurityLookupIDByType(client, stuff->gsid, GlyphSetType,
-					  SecurityDestroyAccess);
+					  DixDestroyAccess);
 	glyphPriv = xalloc(sizeof(dmxGlyphPrivRec));
 	if (!glyphPriv) return BadAlloc;
         glyphPriv->glyphSets = NULL;
@@ -255,7 +255,7 @@ static int dmxProcRenderCreateGlyphSet(C
 	DMX_SET_GLYPH_PRIV(glyphSet, glyphPriv);
 
 	pFmt = SecurityLookupIDByType(client, stuff->format, PictFormatType,
-				      SecurityReadAccess);
+				      DixReadAccess);
 
 	oldErrorHandler = XSetErrorHandler(dmxGlyphErrorHandler);
 
@@ -315,7 +315,7 @@ static int dmxProcRenderFreeGlyphSet(Cli
 
     REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
     glyphSet = SecurityLookupIDByType(client, stuff->glyphset, GlyphSetType,
-				      SecurityDestroyAccess);
+				      DixDestroyAccess);
 
     if (glyphSet && glyphSet->refcnt == 1) {
 	dmxGlyphPrivPtr  glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
@@ -358,7 +358,7 @@ static int dmxProcRenderAddGlyphs(Client
 	int              nbytes;
 
 	glyphSet = SecurityLookupIDByType(client, stuff->glyphset,
-					  GlyphSetType, SecurityReadAccess);
+					  GlyphSetType, DixReadAccess);
 	glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
 
 	nglyphs = stuff->nglyphs;
@@ -401,7 +401,7 @@ static int dmxProcRenderFreeGlyphs(Clien
 
     REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
     glyphSet = SecurityLookupIDByType(client, stuff->glyphset, GlyphSetType,
-				      SecurityWriteAccess);
+				      DixWriteAccess);
 
     if (glyphSet) {
 	dmxGlyphPrivPtr  glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
@@ -473,13 +473,13 @@ static int dmxProcRenderCompositeGlyphs(
 	dmxGlyphPrivPtr    glyphPriv;
 
 	pSrc = SecurityLookupIDByType(client, stuff->src, PictureType,
-				      SecurityReadAccess);
+				      DixReadAccess);
 	pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
 	if (!pSrcPriv->pict)
 	    return ret;
 
 	pDst = SecurityLookupIDByType(client, stuff->dst, PictureType,
-				      SecurityWriteAccess);
+				      DixWriteAccess);
 	pDstPriv = DMX_GET_PICT_PRIV(pDst);
 	if (!pDstPriv->pict)
 	    return ret;
@@ -496,7 +496,7 @@ static int dmxProcRenderCompositeGlyphs(
 
 	if (stuff->maskFormat)
 	    pFmt = SecurityLookupIDByType(client, stuff->maskFormat,
-					  PictFormatType, SecurityReadAccess);
+					  PictFormatType, DixReadAccess);
 	else
 	    pFmt = NULL;
 
@@ -547,7 +547,7 @@ static int dmxProcRenderCompositeGlyphs(
 	curElt = elts;
 
 	glyphSet = SecurityLookupIDByType(client, stuff->glyphset,
-					  GlyphSetType, SecurityReadAccess);
+					  GlyphSetType, DixReadAccess);
 	glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
 
 	while (buffer + sizeof(xGlyphElt) < end) {
@@ -558,7 +558,7 @@ static int dmxProcRenderCompositeGlyphs(
 		glyphSet = SecurityLookupIDByType(client,
 						  *((CARD32 *)buffer),
 						  GlyphSetType,
-						  SecurityReadAccess);
+						  DixReadAccess);
 		glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
 		buffer += 4;
 	    } else {
@@ -622,7 +622,7 @@ static int dmxProcRenderSetPictureTransf
     REQUEST(xRenderSetPictureTransformReq);
 
     REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
-    VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess,
 		   RenderErrBase + BadPicture);
 
     /* For the following to work with PanoramiX, it assumes that Render
@@ -663,7 +663,7 @@ static int dmxProcRenderSetPictureFilter
     REQUEST(xRenderSetPictureFilterReq);
 
     REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
-    VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess,
 		   RenderErrBase + BadPicture);
 
     /* For the following to work with PanoramiX, it assumes that Render
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 78cb34e..20a02a1 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -1105,13 +1105,13 @@ static int MakeCurrent(__GLXclientState 
 
        if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) {
 	  pXinDraw = (PanoramiXRes *)
-	     SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess);
+	     SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
        }
 
        if (pReadDraw && pReadDraw != pDraw && 
 	     new_reply.readType != GLX_PBUFFER_TYPE) {
 	  pXinReadDraw = (PanoramiXRes *)
-	     SecurityLookupIDByClass(client, pReadDraw->id, XRC_DRAWABLE, SecurityReadAccess);
+	     SecurityLookupIDByClass(client, pReadDraw->id, XRC_DRAWABLE, DixReadAccess);
        }
        else {
 	  pXinReadDraw = pXinDraw;
@@ -1139,7 +1139,7 @@ static int MakeCurrent(__GLXclientState 
        else if (pXinDraw) {
 	  pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[s].id,
 		                                 client,
-                                                 SecurityReadAccess);
+                                                 DixReadAccess);
        }
 #endif
        else if (pGlxWindow) {
@@ -1197,7 +1197,7 @@ static int MakeCurrent(__GLXclientState 
 	  else if (pXinReadDraw) {
    	     pReadWin = (WindowPtr)SecurityLookupWindow(pXinReadDraw->info[s].id,
 		   client,
-		   SecurityReadAccess);
+		   DixReadAccess);
    	  }
 #endif
 	  else if (pGlxReadWindow) {
@@ -1768,7 +1768,7 @@ static int CreateGLXPixmap(__GLXclientSt
        to_screen = screenInfo.numScreens - 1;
 
        pXinDraw = (PanoramiXRes *)
-	  SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess);
+	  SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
     }
 #endif
 
@@ -2014,7 +2014,7 @@ int __glXDoSwapBuffers(__GLXclientState 
        from_screen = 0;
        to_screen = screenInfo.numScreens - 1;
        pXinDraw = (PanoramiXRes *)
-        SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess);
+        SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
     }
 #endif
 
@@ -2060,7 +2060,7 @@ int __glXDoSwapBuffers(__GLXclientState 
        else if (pXinDraw) {
 	  pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[s].id,
 		                                 client,
-                                                 SecurityReadAccess);
+                                                 DixReadAccess);
        }
 #endif
        else if (pGlxWindow) {
@@ -3069,7 +3069,7 @@ int __glXQueryContextInfoEXT(__GLXclient
     int nReplyBytes;
 
     req = (xGLXQueryContextInfoEXTReq *)pc;
-    ctx = (__GLXcontext *) SecurityLookupIDByType(client, req->context, __glXContextRes, SecurityReadAccess);
+    ctx = (__GLXcontext *) SecurityLookupIDByType(client, req->context, __glXContextRes, DixReadAccess);
     if (!ctx) {
         client->errorValue = req->context;
         return __glXBadContext;
@@ -3353,7 +3353,7 @@ int __glXGetDrawableAttributes(__GLXclie
 #ifdef PANORAMIX
        if (!noPanoramiXExtension) {
 	  pXinDraw = (PanoramiXRes *)
-	     SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess);
+	     SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
 	  if (!pXinDraw) {
 	     client->errorValue = drawId;
 	     return __glXBadDrawable;
@@ -3361,7 +3361,7 @@ int __glXGetDrawableAttributes(__GLXclie
 
 	  pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[screen].id,
 		client,
-		SecurityReadAccess);
+		DixReadAccess);
        }
 #endif
 
@@ -3515,7 +3515,7 @@ int __glXChangeDrawableAttributes(__GLXc
 #ifdef PANORAMIX
        if (!noPanoramiXExtension) {
 	  pXinDraw = (PanoramiXRes *)
-	     SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess);
+	     SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
 	  if (!pXinDraw) {
 	     client->errorValue = drawId;
 	     return __glXBadDrawable;
@@ -3523,7 +3523,7 @@ int __glXChangeDrawableAttributes(__GLXc
 
 	  pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[screen].id,
 		client,
-		SecurityReadAccess);
+		DixReadAccess);
        }
 #endif
 
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index d14b3d8..03e6725 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -401,7 +401,7 @@ ProcXF86DRICreateDrawable(
     if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable(
 						(Drawable)stuff->drawable,
 						client, 
-						SecurityReadAccess))) {
+						DixReadAccess))) {
 	return BadValue;
     }
 
@@ -432,7 +432,7 @@ ProcXF86DRIDestroyDrawable(
     if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable(
 						(Drawable)stuff->drawable,
 						client, 
-						SecurityReadAccess))) {
+						DixReadAccess))) {
 	return BadValue;
     }
 
@@ -471,7 +471,7 @@ ProcXF86DRIGetDrawableInfo(
     if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable(
 						(Drawable)stuff->drawable,
 						client, 
-						SecurityReadAccess))) {
+						DixReadAccess))) {
 	return BadValue;
     }
 
diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c
index 8801f6c..e9bcea9 100755
--- a/hw/xwin/winclipboardwrappers.c
+++ b/hw/xwin/winclipboardwrappers.c
@@ -345,7 +345,7 @@ winProcSetSelectionOwner (ClientPtr clie
     {
       /* Grab the Window from the request */
       pWindow = (WindowPtr) SecurityLookupWindow (stuff->window, client,
-						  SecurityReadAccess);
+						  DixReadAccess);
       if (!pWindow)
 	{
 	  ErrorF ("winProcSetSelectionOwner - Found BadWindow, aborting.\n");
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index 81a1610..ac92e26 100755
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -203,7 +203,7 @@ ProcWindowsWMSelectInput (register Clien
 
   REQUEST_SIZE_MATCH (xWindowsWMSelectInputReq);
   pHead = (WMEventPtr *)SecurityLookupIDByType(client, eventResource,
-					       EventType, SecurityWriteAccess);
+					       EventType, DixWriteAccess);
   if (stuff->mask != 0)
     {
       if (pHead)
@@ -451,7 +451,7 @@ ProcWindowsWMFrameDraw (register ClientP
   ErrorF ("ProcWindowsWMFrameDraw\n");
 #endif
   if (!(pWin = SecurityLookupWindow((Drawable)stuff->window,
-				    client, SecurityReadAccess)))
+				    client, DixReadAccess)))
     {
       return BadValue;
     }
@@ -546,7 +546,7 @@ ProcWindowsWMFrameSetTitle(
   REQUEST_AT_LEAST_SIZE(xWindowsWMFrameSetTitleReq);
 
   if (!(pWin = SecurityLookupWindow((Drawable)stuff->window,
-				    client, SecurityReadAccess)))
+				    client, DixReadAccess)))
     {
       return BadValue;
     }
diff --git a/include/dix.h b/include/dix.h
index a5a570a..2c87a48 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -122,13 +122,13 @@ SOFTWARE.
     }
 
 #define VERIFY_DRAWABLE(pDraw, did, client)\
-	SECURITY_VERIFY_DRAWABLE(pDraw, did, client, SecurityUnknownAccess)
+	SECURITY_VERIFY_DRAWABLE(pDraw, did, client, DixUnknownAccess)
 
 #define VERIFY_GEOMETRABLE(pDraw, did, client)\
-	SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, SecurityUnknownAccess)
+	SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, DixUnknownAccess)
 
 #define VERIFY_GC(pGC, rid, client)\
-	SECURITY_VERIFY_GC(pGC, rid, client, SecurityUnknownAccess)
+	SECURITY_VERIFY_GC(pGC, rid, client, DixUnknownAccess)
 
 #else /* not XACE */
 
@@ -239,8 +239,8 @@ SOFTWARE.
     if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
 	(client->lastDrawableID != drawID))\
     {\
-	SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, SecurityWriteAccess);\
-	SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityReadAccess);\
+	SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, DixWriteAccess);\
+	SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);\
 	if ((pGC->depth != pDraw->depth) ||\
 	    (pGC->pScreen != pDraw->pScreen))\
 	    return (BadMatch);\
diff --git a/include/resource.h b/include/resource.h
index fd0caae..3231e8c 100644
--- a/include/resource.h
+++ b/include/resource.h
@@ -220,10 +220,11 @@ extern pointer LookupClientResourceCompl
  * simultaneously.
  */
 
-#define SecurityUnknownAccess	0	/* don't know intentions */
-#define SecurityReadAccess	(1<<0)	/* inspecting the object */
-#define SecurityWriteAccess	(1<<1)	/* changing the object */
-#define SecurityDestroyAccess	(1<<2)	/* destroying the object */
+#define DixUnknownAccess	0	/* don't know intentions */
+#define DixReadAccess		(1<<0)	/* inspecting the object */
+#define DixWriteAccess		(1<<1)	/* changing the object */
+#define DixReadWriteAccess	(DixReadAccess|DixWriteAccess)
+#define DixDestroyAccess	(1<<2)	/* destroying the object */
 
 extern pointer SecurityLookupIDByType(
     ClientPtr /*client*/,
diff --git a/os/access.c b/os/access.c
index d61edef..db5ca31 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1528,7 +1528,7 @@ AuthorizedClient(ClientPtr client)
 	return TRUE;
 
     /* untrusted clients can't change host access */
-    if (!XaceHook(XACE_HOSTLIST_ACCESS, client, SecurityWriteAccess))
+    if (!XaceHook(XACE_HOSTLIST_ACCESS, client, DixWriteAccess))
 	return FALSE;
 
     return LocalClient(client);
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index e8a7b79..d4c96f6 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -457,7 +457,7 @@ ProcRRGetCrtcInfo (ClientPtr client)
     int				i, j, k, n;
     
     REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
-    crtc = LookupCrtc(client, stuff->crtc, SecurityReadAccess);
+    crtc = LookupCrtc(client, stuff->crtc, DixReadAccess);
 
     if (!crtc)
 	return RRErrorBase + BadRRCrtc;
@@ -766,7 +766,7 @@ ProcRRGetCrtcGammaSize (ClientPtr client
     int				n;
 
     REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
-    crtc = LookupCrtc (client, stuff->crtc, SecurityReadAccess);
+    crtc = LookupCrtc (client, stuff->crtc, DixReadAccess);
     if (!crtc)
 	return RRErrorBase + BadRRCrtc;
     
@@ -793,7 +793,7 @@ ProcRRGetCrtcGamma (ClientPtr client)
     unsigned long		len;
     
     REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq);
-    crtc = LookupCrtc (client, stuff->crtc, SecurityReadAccess);
+    crtc = LookupCrtc (client, stuff->crtc, DixReadAccess);
     if (!crtc)
 	return RRErrorBase + BadRRCrtc;
     
@@ -826,7 +826,7 @@ ProcRRSetCrtcGamma (ClientPtr client)
     CARD16			*red, *green, *blue;
     
     REQUEST_SIZE_MATCH(xRRSetCrtcGammaReq);
-    crtc = LookupCrtc (client, stuff->crtc, SecurityWriteAccess);
+    crtc = LookupCrtc (client, stuff->crtc, DixWriteAccess);
     if (!crtc)
 	return RRErrorBase + BadRRCrtc;
     
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index 6b61b9c..b1ec68b 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -72,12 +72,12 @@ ProcRRSelectInput (ClientPtr client)
     XID		clientResource;
 
     REQUEST_SIZE_MATCH(xRRSelectInputReq);
-    pWin = SecurityLookupWindow (stuff->window, client, SecurityWriteAccess);
+    pWin = SecurityLookupWindow (stuff->window, client, DixWriteAccess);
     if (!pWin)
 	return BadWindow;
     pHead = (RREventPtr *)SecurityLookupIDByType(client,
 						 pWin->drawable.id, RREventType,
-						 SecurityWriteAccess);
+						 DixWriteAccess);
 
     if (stuff->enable & (RRScreenChangeNotifyMask|
 			 RRCrtcChangeNotifyMask|
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 430f8bd..33c4ba5 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -378,7 +378,7 @@ ProcRRGetOutputInfo (ClientPtr client)
     int				i, n;
     
     REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
-    output = LookupOutput(client, stuff->output, SecurityReadAccess);
+    output = LookupOutput(client, stuff->output, DixReadAccess);
 
     if (!output)
 	return RRErrorBase + BadRROutput;
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 13e8483..56bb39a 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -313,7 +313,7 @@ ProcRRListOutputProperties (ClientPtr cl
     
     REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq);
 
-    output = LookupOutput (client, stuff->output, SecurityReadAccess);
+    output = LookupOutput (client, stuff->output, DixReadAccess);
     
     if (!output)
         return RRErrorBase + BadRROutput;
@@ -358,7 +358,7 @@ ProcRRQueryOutputProperty (ClientPtr cli
     
     REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq);
 
-    output = LookupOutput (client, stuff->output, SecurityReadAccess);
+    output = LookupOutput (client, stuff->output, DixReadAccess);
     
     if (!output)
         return RRErrorBase + BadRROutput;
@@ -398,7 +398,7 @@ ProcRRConfigureOutputProperty (ClientPtr
     
     REQUEST_SIZE_MATCH(xRRConfigureOutputPropertyReq);
 
-    output = LookupOutput (client, stuff->output, SecurityReadAccess);
+    output = LookupOutput (client, stuff->output, DixReadAccess);
     
     if (!output)
         return RRErrorBase + BadRROutput;
@@ -443,7 +443,7 @@ ProcRRChangeOutputProperty (ClientPtr cl
     totalSize = len * sizeInBytes;
     REQUEST_FIXED_SIZE(xRRChangeOutputPropertyReq, totalSize);
 
-    output = LookupOutput (client, stuff->output, SecurityWriteAccess);
+    output = LookupOutput (client, stuff->output, DixWriteAccess);
     if (!output)
 	return RRErrorBase + BadRROutput;
     
@@ -475,7 +475,7 @@ ProcRRDeleteOutputProperty (ClientPtr cl
               
     REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
     UpdateCurrentTime();
-    output = LookupOutput (client, stuff->output, SecurityWriteAccess);
+    output = LookupOutput (client, stuff->output, DixWriteAccess);
     if (!output)
         return RRErrorBase + BadRROutput;
     
@@ -504,8 +504,8 @@ ProcRRGetOutputProperty (ClientPtr clien
     if (stuff->delete)
 	UpdateCurrentTime();
     output = LookupOutput (client, stuff->output, 
-			   stuff->delete ? SecurityWriteAccess :
-			   SecurityReadAccess);
+			   stuff->delete ? DixWriteAccess :
+			   DixReadAccess);
     if (!output)
 	return RRErrorBase + BadRROutput;
 
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 76c16b0..b4004a3 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -220,7 +220,7 @@ ProcRRGetScreenSizeRange (ClientPtr clie
     
     REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
 
     if (!pWin)
 	return BadWindow;
@@ -273,7 +273,7 @@ ProcRRSetScreenSize (ClientPtr client)
     
     REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
 
     if (!pWin)
 	return BadWindow;
@@ -332,7 +332,7 @@ ProcRRGetScreenResources (ClientPtr clie
     
     REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
 
     if (!pWin)
 	return BadWindow;
@@ -557,7 +557,7 @@ ProcRRGetScreenInfo (ClientPtr client)
 
     REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
 
     if (!pWin)
 	return BadWindow;
@@ -731,7 +731,7 @@ ProcRRSetScreenConfig (ClientPtr client)
     }
     
     SECURITY_VERIFY_DRAWABLE(pDraw, stuff->drawable, client,
-			     SecurityWriteAccess);
+			     DixWriteAccess);
 
     pScreen = pDraw->pScreen;
 
diff --git a/render/picture.c b/render/picture.c
index a3443c2..e7901e8 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -1209,7 +1209,7 @@ ChangePicture (PicturePtr	pPicture,
 			pAlpha = (PicturePtr) SecurityLookupIDByType(client,
 								     pid, 
 								     PictureType, 
-								     SecurityWriteAccess|SecurityReadAccess);
+								     DixWriteAccess|DixReadAccess);
 			if (!pAlpha)
 			{
 			    client->errorValue = pid;
@@ -1271,7 +1271,7 @@ ChangePicture (PicturePtr	pPicture,
 			pPixmap = (PixmapPtr)SecurityLookupIDByType(client,
 								    pid, 
 								    RT_PIXMAP,
-								    SecurityReadAccess);
+								    DixReadAccess);
 			if (!pPixmap)
 			{
 			    client->errorValue = pid;
diff --git a/render/render.c b/render/render.c
index e4d8d6b..51a3fa6 100644
--- a/render/render.c
+++ b/render/render.c
@@ -554,7 +554,7 @@ ProcRenderQueryPictIndexValues (ClientPt
     pFormat = (PictFormatPtr) SecurityLookupIDByType (client, 
 						      stuff->format,
 						      PictFormatType,
-						      SecurityReadAccess);
+						      DixReadAccess);
 
     if (!pFormat)
     {
@@ -622,11 +622,11 @@ ProcRenderCreatePicture (ClientPtr clien
 
     LEGAL_NEW_RESOURCE(stuff->pid, client);
     SECURITY_VERIFY_DRAWABLE(pDrawable, stuff->drawable, client,
-			     SecurityWriteAccess);
+			     DixWriteAccess);
     pFormat = (PictFormatPtr) SecurityLookupIDByType (client, 
 						      stuff->format,
 						      PictFormatType,
-						      SecurityReadAccess);
+						      DixReadAccess);
     if (!pFormat)
     {
 	client->errorValue = stuff->format;
@@ -660,7 +660,7 @@ ProcRenderChangePicture (ClientPtr clien
     int len;
 
     REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
-    VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess,
 		    RenderErrBase + BadPicture);
 
     len = client->req_len - (sizeof(xRenderChangePictureReq) >> 2);
@@ -680,7 +680,7 @@ ProcRenderSetPictureClipRectangles (Clie
     int		    result;
 
     REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
-    VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess,
 		    RenderErrBase + BadPicture);
     if (!pPicture->pDrawable)
         return BadDrawable;
@@ -706,7 +706,7 @@ ProcRenderFreePicture (ClientPtr client)
 
     REQUEST_SIZE_MATCH(xRenderFreePictureReq);
 
-    VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityDestroyAccess,
+    VERIFY_PICTURE (pPicture, stuff->picture, client, DixDestroyAccess,
 		    RenderErrBase + BadPicture);
     FreeResource (stuff->picture, RT_NONE);
     return(client->noClientException);
@@ -736,13 +736,13 @@ ProcRenderComposite (ClientPtr client)
 	client->errorValue = stuff->op;
 	return BadValue;
     }
-    VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess,
 		    RenderErrBase + BadPicture);
     if (!pDst->pDrawable)
         return BadDrawable;
-    VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, 
+    VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, 
 		    RenderErrBase + BadPicture);
-    VERIFY_ALPHA (pMask, stuff->mask, client, SecurityReadAccess, 
+    VERIFY_ALPHA (pMask, stuff->mask, client, DixReadAccess, 
 		  RenderErrBase + BadPicture);
     if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) ||
 	(pMask && pMask->pDrawable && pDst->pDrawable->pScreen != pMask->pDrawable->pScreen))
@@ -782,9 +782,9 @@ ProcRenderTrapezoids (ClientPtr client)
 	client->errorValue = stuff->op;
 	return BadValue;
     }
-    VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, 
+    VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, 
 		    RenderErrBase + BadPicture);
-    VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, 
+    VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, 
 		    RenderErrBase + BadPicture);
     if (!pDst->pDrawable)
         return BadDrawable;
@@ -795,7 +795,7 @@ ProcRenderTrapezoids (ClientPtr client)
 	pFormat = (PictFormatPtr) SecurityLookupIDByType (client,
 							  stuff->maskFormat,
 							  PictFormatType,
-							  SecurityReadAccess);
+							  DixReadAccess);
 	if (!pFormat)
 	{
 	    client->errorValue = stuff->maskFormat;
@@ -829,9 +829,9 @@ ProcRenderTriangles (ClientPtr client)
 	client->errorValue = stuff->op;
 	return BadValue;
     }
-    VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, 
+    VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, 
 		    RenderErrBase + BadPicture);
-    VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, 
+    VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, 
 		    RenderErrBase + BadPicture);
     if (!pDst->pDrawable)
         return BadDrawable;
@@ -842,7 +842,7 @@ ProcRenderTriangles (ClientPtr client)
 	pFormat = (PictFormatPtr) SecurityLookupIDByType (client,
 							  stuff->maskFormat,
 							  PictFormatType,
-							  SecurityReadAccess);
+							  DixReadAccess);
 	if (!pFormat)
 	{
 	    client->errorValue = stuff->maskFormat;
@@ -876,9 +876,9 @@ ProcRenderTriStrip (ClientPtr client)
 	client->errorValue = stuff->op;
 	return BadValue;
     }
-    VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, 
+    VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, 
 		    RenderErrBase + BadPicture);
-    VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, 
+    VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, 
 		    RenderErrBase + BadPicture);
     if (!pDst->pDrawable)
         return BadDrawable;
@@ -889,7 +889,7 @@ ProcRenderTriStrip (ClientPtr client)
 	pFormat = (PictFormatPtr) SecurityLookupIDByType (client,
 							  stuff->maskFormat,
 							  PictFormatType,
-							  SecurityReadAccess);
+							  DixReadAccess);
 	if (!pFormat)
 	{
 	    client->errorValue = stuff->maskFormat;
@@ -923,9 +923,9 @@ ProcRenderTriFan (ClientPtr client)
 	client->errorValue = stuff->op;
 	return BadValue;
     }
-    VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, 
+    VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, 
 		    RenderErrBase + BadPicture);
-    VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, 
+    VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, 
 		    RenderErrBase + BadPicture);
     if (!pDst->pDrawable)
         return BadDrawable;
@@ -936,7 +936,7 @@ ProcRenderTriFan (ClientPtr client)
 	pFormat = (PictFormatPtr) SecurityLookupIDByType (client,
 							  stuff->maskFormat,
 							  PictFormatType,
-							  SecurityReadAccess);
+							  DixReadAccess);
 	if (!pFormat)
 	{
 	    client->errorValue = stuff->maskFormat;
@@ -988,7 +988,7 @@ ProcRenderCreateGlyphSet (ClientPtr clie
     format = (PictFormatPtr) SecurityLookupIDByType (client,
 						     stuff->format,
 						     PictFormatType,
-						     SecurityReadAccess);
+						     DixReadAccess);
     if (!format)
     {
 	client->errorValue = stuff->format;
@@ -1036,7 +1036,7 @@ ProcRenderReferenceGlyphSet (ClientPtr c
     glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
 						     stuff->existing,
 						     GlyphSetType,
-						     SecurityWriteAccess);
+						     DixWriteAccess);
     if (!glyphSet)
     {
 	client->errorValue = stuff->existing;
@@ -1061,7 +1061,7 @@ ProcRenderFreeGlyphSet (ClientPtr client
     glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
 						     stuff->glyphset,
 						     GlyphSetType,
-						     SecurityDestroyAccess);
+						     DixDestroyAccess);
     if (!glyphSet)
     {
 	client->errorValue = stuff->glyphset;
@@ -1095,7 +1095,7 @@ ProcRenderAddGlyphs (ClientPtr client)
     glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
 						     stuff->glyphset,
 						     GlyphSetType,
-						     SecurityWriteAccess);
+						     DixWriteAccess);
     if (!glyphSet)
     {
 	client->errorValue = stuff->glyphset;
@@ -1196,7 +1196,7 @@ ProcRenderFreeGlyphs (ClientPtr client)
     glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
 						     stuff->glyphset,
 						     GlyphSetType,
-						     SecurityWriteAccess);
+						     DixWriteAccess);
     if (!glyphSet)
     {
 	client->errorValue = stuff->glyphset;
@@ -1251,9 +1251,9 @@ ProcRenderCompositeGlyphs (ClientPtr cli
 	client->errorValue = stuff->op;
 	return BadValue;
     }
-    VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess,
+    VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess,
 		    RenderErrBase + BadPicture);
-    VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess,
 		    RenderErrBase + BadPicture);
     if (!pDst->pDrawable)
         return BadDrawable;
@@ -1264,7 +1264,7 @@ ProcRenderCompositeGlyphs (ClientPtr cli
 	pFormat = (PictFormatPtr) SecurityLookupIDByType (client,
 							  stuff->maskFormat,
 							  PictFormatType,
-							  SecurityReadAccess);
+							  DixReadAccess);
 	if (!pFormat)
 	{
 	    client->errorValue = stuff->maskFormat;
@@ -1277,7 +1277,7 @@ ProcRenderCompositeGlyphs (ClientPtr cli
     glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
 						     stuff->glyphset,
 						     GlyphSetType,
-						     SecurityReadAccess);
+						     DixReadAccess);
     if (!glyphSet)
     {
 	client->errorValue = stuff->glyphset;
@@ -1339,7 +1339,7 @@ ProcRenderCompositeGlyphs (ClientPtr cli
 		glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
 								 gs,
 								 GlyphSetType,
-								 SecurityReadAccess);
+								 DixReadAccess);
 		if (!glyphSet)
 		{
 		    client->errorValue = gs;
@@ -1420,7 +1420,7 @@ ProcRenderFillRectangles (ClientPtr clie
 	client->errorValue = stuff->op;
 	return BadValue;
     }
-    VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, 
+    VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, 
 		    RenderErrBase + BadPicture);
     if (!pDst->pDrawable)
         return BadDrawable;
@@ -1486,7 +1486,7 @@ ProcRenderCreateCursor (ClientPtr client
     REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
     LEGAL_NEW_RESOURCE(stuff->cid, client);
     
-    VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, 
+    VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, 
 		    RenderErrBase + BadPicture);
     if (!pSrc->pDrawable)
         return BadDrawable;
@@ -1668,7 +1668,7 @@ ProcRenderSetPictureTransform (ClientPtr
     int		result;
 
     REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
-    VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess,
 		    RenderErrBase + BadPicture);
     result = SetPictureTransform (pPicture, (PictTransform *) &stuff->transform);
     if (client->noClientException != Success)
@@ -1694,7 +1694,7 @@ ProcRenderQueryFilters (ClientPtr client
     char			*names;
 
     REQUEST_SIZE_MATCH(xRenderQueryFiltersReq);
-    SECURITY_VERIFY_DRAWABLE(pDrawable, stuff->drawable, client, SecurityReadAccess);
+    SECURITY_VERIFY_DRAWABLE(pDrawable, stuff->drawable, client, DixReadAccess);
     
     pScreen = pDrawable->pScreen;
     nbytesName = 0;
@@ -1797,7 +1797,7 @@ ProcRenderSetPictureFilter (ClientPtr cl
     char	*name;
     
     REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq);
-    VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess,
 		    RenderErrBase + BadPicture);
     name = (char *) (stuff + 1);
     params = (xFixed *) (name + ((stuff->nbytes + 3) & ~3));
@@ -1831,7 +1831,7 @@ ProcRenderCreateAnimCursor (ClientPtr cl
     for (i = 0; i < ncursor; i++)
     {
 	cursors[i] = (CursorPtr)SecurityLookupIDByType(client, elt->cursor,
-						       RT_CURSOR, SecurityReadAccess);
+						       RT_CURSOR, DixReadAccess);
 	if (!cursors[i])
 	{
 	    xfree (cursors);
@@ -1859,7 +1859,7 @@ ProcRenderAddTraps (ClientPtr client)
     REQUEST(xRenderAddTrapsReq);
 
     REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq);
-    VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess, 
+    VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess, 
 		    RenderErrBase + BadPicture);
     if (!pPicture->pDrawable)
         return BadDrawable;
@@ -2614,7 +2614,7 @@ PanoramiXRenderCreatePicture (ClientPtr 
 
     REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
     if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass(
-		client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
+		client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
 	return BadDrawable;
     if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes))))
 	return BadAlloc;
@@ -2656,7 +2656,7 @@ PanoramiXRenderChangePicture (ClientPtr 
 
     REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
     
-    VERIFY_XIN_PICTURE(pict, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess,
 		       RenderErrBase + BadPicture);
     
     FOR_NSCREENS_BACKWARD(j) {
@@ -2677,7 +2677,7 @@ PanoramiXRenderSetPictureClipRectangles 
 
     REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
     
-    VERIFY_XIN_PICTURE(pict, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess,
 		       RenderErrBase + BadPicture);
     
     FOR_NSCREENS_BACKWARD(j) {
@@ -2698,7 +2698,7 @@ PanoramiXRenderSetPictureTransform (Clie
 
     REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq);
     
-    VERIFY_XIN_PICTURE(pict, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess,
 		       RenderErrBase + BadPicture);
     
     FOR_NSCREENS_BACKWARD(j) {
@@ -2719,7 +2719,7 @@ PanoramiXRenderSetPictureFilter (ClientP
 
     REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
     
-    VERIFY_XIN_PICTURE(pict, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess,
 		       RenderErrBase + BadPicture);
     
     FOR_NSCREENS_BACKWARD(j) {
@@ -2742,7 +2742,7 @@ PanoramiXRenderFreePicture (ClientPtr cl
 
     client->errorValue = stuff->picture;
 
-    VERIFY_XIN_PICTURE(pict, stuff->picture, client, SecurityDestroyAccess,
+    VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess,
 		       RenderErrBase + BadPicture);
     
 
@@ -2768,11 +2768,11 @@ PanoramiXRenderComposite (ClientPtr clie
 
     REQUEST_SIZE_MATCH(xRenderCompositeReq);
     
-    VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess, 
+    VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess, 
 			RenderErrBase + BadPicture);
-    VERIFY_XIN_ALPHA (msk, stuff->mask, client, SecurityReadAccess, 
+    VERIFY_XIN_ALPHA (msk, stuff->mask, client, DixReadAccess, 
 		      RenderErrBase + BadPicture);
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess, 
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, 
 			RenderErrBase + BadPicture);
     
     orig = *stuff;
@@ -2816,9 +2816,9 @@ PanoramiXRenderCompositeGlyphs (ClientPt
     INT16	    xSrc, ySrc;
 
     REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq);
-    VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+    VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess,
 			RenderErrBase + BadPicture);
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess,
 			RenderErrBase + BadPicture);
 
     if (client->req_len << 2 >= (sizeof (xRenderCompositeGlyphsReq) +
@@ -2859,7 +2859,7 @@ PanoramiXRenderFillRectangles (ClientPtr
     int		    extra_len;
 
     REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess, 
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, 
 			RenderErrBase + BadPicture);
     extra_len = (client->req_len << 2) - sizeof (xRenderFillRectanglesReq);
     if (extra_len &&
@@ -2906,9 +2906,9 @@ PanoramiXRenderTrapezoids(ClientPtr clie
     
     REQUEST_AT_LEAST_SIZE (xRenderTrapezoidsReq);
     
-    VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+    VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess,
 			RenderErrBase + BadPicture);
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess,
 			RenderErrBase + BadPicture);
 
     extra_len = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq);
@@ -2968,9 +2968,9 @@ PanoramiXRenderTriangles(ClientPtr clien
     
     REQUEST_AT_LEAST_SIZE (xRenderTrianglesReq);
     
-    VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+    VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess,
 			RenderErrBase + BadPicture);
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess,
 			RenderErrBase + BadPicture);
 
     extra_len = (client->req_len << 2) - sizeof (xRenderTrianglesReq);
@@ -3026,9 +3026,9 @@ PanoramiXRenderTriStrip(ClientPtr client
     
     REQUEST_AT_LEAST_SIZE (xRenderTriStripReq);
     
-    VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+    VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess,
 			RenderErrBase + BadPicture);
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess,
 			RenderErrBase + BadPicture);
 
     extra_len = (client->req_len << 2) - sizeof (xRenderTriStripReq);
@@ -3080,9 +3080,9 @@ PanoramiXRenderTriFan(ClientPtr client)
     
     REQUEST_AT_LEAST_SIZE (xRenderTriFanReq);
     
-    VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+    VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess,
 			RenderErrBase + BadPicture);
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess,
 			RenderErrBase + BadPicture);
 
     extra_len = (client->req_len << 2) - sizeof (xRenderTriFanReq);
@@ -3136,7 +3136,7 @@ PanoramiXRenderColorTrapezoids(ClientPtr
     
     REQUEST_AT_LEAST_SIZE (xRenderColorTrapezoidsReq);
     
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess,
 			RenderErrBase + BadPicture);
 
     extra_len = (client->req_len << 2) - sizeof (xRenderColorTrapezoidsReq);
@@ -3180,7 +3180,7 @@ PanoramiXRenderColorTriangles(ClientPtr 
     
     REQUEST_AT_LEAST_SIZE (xRenderColorTrianglesReq);
     
-    VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+    VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess,
 			RenderErrBase + BadPicture);
 
     extra_len = (client->req_len << 2) - sizeof (xRenderColorTrianglesReq);
@@ -3226,7 +3226,7 @@ PanoramiXRenderAddTraps (ClientPtr clien
     INT16    	    x_off, y_off;
 
     REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq);
-    VERIFY_XIN_PICTURE (picture, stuff->picture, client, SecurityWriteAccess, 
+    VERIFY_XIN_PICTURE (picture, stuff->picture, client, DixWriteAccess, 
 			RenderErrBase + BadPicture);
     extra_len = (client->req_len << 2) - sizeof (xRenderAddTrapsReq);
     if (extra_len &&
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index c75e744..21dbcc2 100755
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -242,7 +242,7 @@ ProcXFixesSelectCursorInput (ClientPtr c
 
     REQUEST_SIZE_MATCH (xXFixesSelectCursorInputReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     if (stuff->eventMask & ~CursorAllEvents)
@@ -415,7 +415,7 @@ ProcXFixesSetCursorName (ClientPtr clien
     Atom atom;
 
     REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq);
-    VERIFY_CURSOR(pCursor, stuff->cursor, client, SecurityWriteAccess);
+    VERIFY_CURSOR(pCursor, stuff->cursor, client, DixWriteAccess);
     tchar = (char *) &stuff[1];
     atom = MakeAtom (tchar, stuff->nbytes, TRUE);
     if (atom == BAD_RESOURCE)
@@ -448,7 +448,7 @@ ProcXFixesGetCursorName (ClientPtr clien
     int len;
 
     REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq);
-    VERIFY_CURSOR(pCursor, stuff->cursor, client, SecurityReadAccess);
+    VERIFY_CURSOR(pCursor, stuff->cursor, client, DixReadAccess);
     if (pCursor->name)
 	str = NameForAtom (pCursor->name);
     else
@@ -679,8 +679,8 @@ ProcXFixesChangeCursor (ClientPtr client
     REQUEST(xXFixesChangeCursorReq);
 
     REQUEST_SIZE_MATCH(xXFixesChangeCursorReq);
-    VERIFY_CURSOR (pSource, stuff->source, client, SecurityReadAccess);
-    VERIFY_CURSOR (pDestination, stuff->destination, client, SecurityWriteAccess);
+    VERIFY_CURSOR (pSource, stuff->source, client, DixReadAccess);
+    VERIFY_CURSOR (pDestination, stuff->destination, client, DixWriteAccess);
 
     ReplaceCursor (pSource, TestForCursor, (pointer) pDestination);
     return (client->noClientException);
@@ -714,7 +714,7 @@ ProcXFixesChangeCursorByName (ClientPtr 
     REQUEST(xXFixesChangeCursorByNameReq);
 
     REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes);
-    VERIFY_CURSOR(pSource, stuff->source, client, SecurityReadAccess);
+    VERIFY_CURSOR(pSource, stuff->source, client, DixReadAccess);
     tchar = (char *) &stuff[1];
     name = MakeAtom (tchar, stuff->nbytes, FALSE);
     if (name)
diff --git a/xfixes/region.c b/xfixes/region.c
index 68c7015..a004fc0 100755
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -118,7 +118,7 @@ ProcXFixesCreateRegionFromBitmap (Client
 
     pPixmap = (PixmapPtr) SecurityLookupIDByType (client, stuff->bitmap,
 						  RT_PIXMAP,
-						  SecurityReadAccess);
+						  DixReadAccess);
     if (!pPixmap)
     {
 	client->errorValue = stuff->bitmap;
@@ -225,7 +225,7 @@ ProcXFixesCreateRegionFromGC (ClientPtr 
     REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq);
     LEGAL_NEW_RESOURCE (stuff->region, client);
 
-    SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityReadAccess);
+    SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);
     
     switch (pGC->clientClipType) {
     case CT_PIXMAP:
@@ -273,7 +273,7 @@ ProcXFixesCreateRegionFromPicture (Clien
     REQUEST_SIZE_MATCH (xXFixesCreateRegionFromPictureReq);
     LEGAL_NEW_RESOURCE (stuff->region, client);
 
-    VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityReadAccess,
+    VERIFY_PICTURE(pPicture, stuff->picture, client, DixReadAccess,
 		   RenderErrBase + BadPicture);
     
     switch (pPicture->clientClipType) {
@@ -321,7 +321,7 @@ ProcXFixesDestroyRegion (ClientPtr clien
     RegionPtr	pRegion;
 
     REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq);
-    VERIFY_REGION(pRegion, stuff->region, client, SecurityWriteAccess);
+    VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
     FreeResource (stuff->region, RT_NONE);
     return(client->noClientException);
 }
@@ -346,7 +346,7 @@ ProcXFixesSetRegion (ClientPtr client)
     REQUEST (xXFixesSetRegionReq);
 
     REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq);
-    VERIFY_REGION(pRegion, stuff->region, client, SecurityWriteAccess);
+    VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
     
     things = (client->req_len << 2) - sizeof (xXFixesCreateRegionReq);
     if (things & 4)
@@ -384,8 +384,8 @@ ProcXFixesCopyRegion (ClientPtr client)
     RegionPtr	pSource, pDestination;
     REQUEST (xXFixesCopyRegionReq);
     
-    VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
-    VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
+    VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
+    VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
     
     if (!REGION_COPY(pScreen, pDestination, pSource))
 	return BadAlloc;
@@ -414,9 +414,9 @@ ProcXFixesCombineRegion (ClientPtr clien
     REQUEST (xXFixesCombineRegionReq);
 
     REQUEST_SIZE_MATCH (xXFixesCombineRegionReq);
-    VERIFY_REGION(pSource1, stuff->source1, client, SecurityReadAccess);
-    VERIFY_REGION(pSource2, stuff->source2, client, SecurityReadAccess);
-    VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
+    VERIFY_REGION(pSource1, stuff->source1, client, DixReadAccess);
+    VERIFY_REGION(pSource2, stuff->source2, client, DixReadAccess);
+    VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
     
     switch (stuff->xfixesReqType) {
     case X_XFixesUnionRegion:
@@ -461,8 +461,8 @@ ProcXFixesInvertRegion (ClientPtr client
     REQUEST(xXFixesInvertRegionReq);
 
     REQUEST_SIZE_MATCH(xXFixesInvertRegionReq);
-    VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
-    VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
+    VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
+    VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
 
     /* Compute bounds, limit to 16 bits */
     bounds.x1 = stuff->x;
@@ -509,7 +509,7 @@ ProcXFixesTranslateRegion (ClientPtr cli
     REQUEST(xXFixesTranslateRegionReq);
 
     REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq);
-    VERIFY_REGION(pRegion, stuff->region, client, SecurityWriteAccess);
+    VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
 
     REGION_TRANSLATE(pScreen, pRegion, stuff->dx, stuff->dy);
     return (client->noClientException);
@@ -536,8 +536,8 @@ ProcXFixesRegionExtents (ClientPtr clien
     REQUEST(xXFixesRegionExtentsReq);
 
     REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq);
-    VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
-    VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
+    VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
+    VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
 
     REGION_RESET (0, pDestination, REGION_EXTENTS (0, pSource));
 
@@ -569,7 +569,7 @@ ProcXFixesFetchRegion (ClientPtr client)
     REQUEST(xXFixesFetchRegionReq);
 
     REQUEST_SIZE_MATCH(xXFixesFetchRegionReq);
-    VERIFY_REGION(pRegion, stuff->region, client, SecurityReadAccess);
+    VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess);
 
     pExtent = REGION_EXTENTS (0, pRegion);
     pBox = REGION_RECTS (pRegion);
@@ -633,8 +633,8 @@ ProcXFixesSetGCClipRegion (ClientPtr cli
     REQUEST(xXFixesSetGCClipRegionReq);
 
     REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
-    SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityWriteAccess);
-    VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, SecurityReadAccess);
+    SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixWriteAccess);
+    VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, DixReadAccess);
 
     if (pRegion)
     {
@@ -685,7 +685,7 @@ ProcXFixesSetWindowShapeRegion (ClientPt
 	client->errorValue = stuff->dest;
 	return BadWindow;
     }
-    VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, SecurityWriteAccess);
+    VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixWriteAccess);
     pScreen = pWin->drawable.pScreen;
     switch (stuff->destKind) {
     case ShapeBounding:
@@ -775,11 +775,11 @@ ProcXFixesSetPictureClipRegion (ClientPt
     REQUEST(xXFixesSetPictureClipRegionReq);
     
     REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
-    VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityWriteAccess,
+    VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess,
 		   RenderErrBase + BadPicture);
     pScreen = pPicture->pDrawable->pScreen;
     ps = GetPictureScreen (pScreen);
-    VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, SecurityReadAccess);
+    VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess);
     
     return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin,
 				 pRegion);
@@ -815,8 +815,8 @@ ProcXFixesExpandRegion (ClientPtr client
     int		i;
 
     REQUEST_SIZE_MATCH (xXFixesExpandRegionReq);
-    VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
-    VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
+    VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
+    VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
     
     nBoxes = REGION_NUM_RECTS(pSource);
     pSrc = REGION_RECTS(pSource);
diff --git a/xfixes/saveset.c b/xfixes/saveset.c
index 9ebf245..9ad2627 100755
--- a/xfixes/saveset.c
+++ b/xfixes/saveset.c
@@ -38,7 +38,7 @@ ProcXFixesChangeSaveSet(ClientPtr client
 		  
     REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id)))
diff --git a/xfixes/select.c b/xfixes/select.c
index 4c7a49d..a718715 100755
--- a/xfixes/select.c
+++ b/xfixes/select.c
@@ -196,7 +196,7 @@ ProcXFixesSelectSelectionInput (ClientPt
 
     REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq);
     pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
-					   SecurityReadAccess);
+					   DixReadAccess);
     if (!pWin)
         return(BadWindow);
     if (stuff->eventMask & ~SelectionAllEvents)



More information about the xorg-commit mailing list