diff options
author | Eamon Walsh <ewalsh@epoch.ncsc.mil> | 2004-05-05 20:04:52 +0000 |
---|---|---|
committer | Alan Coopersmith <alanc@alf.(none)> | 2006-06-19 17:09:37 -0700 |
commit | 37f0ae02457bd22b27f8f30a373e5cb19f2fbaea (patch) | |
tree | 94127e7ba8d70ead4ee3a0c47e56e965d0a7c685 /include | |
parent | 8d9ccc90a54c786ca4ba5620ab0a965e3f3bc8ea (diff) |
Replace XC-SECURITY code with XACE security hooks
(cherry picked from 8526cd6395490b03b279f1962df777fb0e4a9878 commit)
Diffstat (limited to 'include')
-rw-r--r-- | include/dix.h | 19 | ||||
-rw-r--r-- | include/dixstruct.h | 11 | ||||
-rw-r--r-- | include/extnsionst.h | 3 | ||||
-rw-r--r-- | include/resource.h | 6 |
4 files changed, 12 insertions, 27 deletions
diff --git a/include/dix.h b/include/dix.h index 01777213d..56c55b3da 100644 --- a/include/dix.h +++ b/include/dix.h @@ -89,12 +89,9 @@ SOFTWARE. ((client->lastDrawableID == did) ? \ client->lastDrawable : (DrawablePtr)LookupDrawable(did, client)) -#ifdef XCSECURITY +#ifdef XACE #define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\ - if (client->lastDrawableID == did && !client->trustLevel)\ - pDraw = client->lastDrawable;\ - else \ {\ pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \ RC_DRAWABLE, mode);\ @@ -108,9 +105,6 @@ SOFTWARE. } #define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\ - if (client->lastDrawableID == did && !client->trustLevel)\ - pDraw = client->lastDrawable;\ - else \ {\ pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \ RC_DRAWABLE, mode);\ @@ -122,9 +116,6 @@ SOFTWARE. } #define SECURITY_VERIFY_GC(pGC, rid, client, mode)\ - if (client->lastGCID == rid && !client->trustLevel)\ - pGC = client->lastGC;\ - else\ pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\ if (!pGC)\ {\ @@ -141,7 +132,7 @@ SOFTWARE. #define VERIFY_GC(pGC, rid, client)\ SECURITY_VERIFY_GC(pGC, rid, client, SecurityUnknownAccess) -#else /* not XCSECURITY */ +#else /* not XACE */ #define VERIFY_DRAWABLE(pDraw, did, client)\ if (client->lastDrawableID == did)\ @@ -191,7 +182,7 @@ SOFTWARE. #define SECURITY_VERIFY_GC(pGC, rid, client, mode)\ VERIFY_GC(pGC, rid, client) -#endif /* XCSECURITY */ +#endif /* XACE */ /* * We think that most hardware implementations of DBE will want @@ -386,7 +377,7 @@ extern int CompareISOLatin1Lowered( unsigned char * /*b*/, int blen); -#ifdef XCSECURITY +#ifdef XACE extern WindowPtr SecurityLookupWindow( XID /*rid*/, @@ -422,7 +413,7 @@ extern pointer LookupDrawable( #define SecurityLookupDrawable(rid, client, access_mode) \ LookupDrawable(rid, client) -#endif /* XCSECURITY */ +#endif /* XACE */ extern ClientPtr LookupClient( XID /*rid*/, diff --git a/include/dixstruct.h b/include/dixstruct.h index f38a64d07..1ac7d84b6 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -130,15 +130,8 @@ typedef struct _Client { int requestLogIndex; #endif unsigned long replyBytesRemaining; -#ifdef XCSECURITY - XID authId; - unsigned int trustLevel; - pointer (* CheckAccess)( - ClientPtr /*pClient*/, - XID /*id*/, - RESTYPE /*classes*/, - Mask /*access_mode*/, - pointer /*resourceval*/); +#ifdef XACE + pointer securityState[4]; /* 4 slots for use */ #endif #ifdef XAPPGROUP struct _AppGroupRec* appgroup; diff --git a/include/extnsionst.h b/include/extnsionst.h index daf37bf43..8532b69b7 100644 --- a/include/extnsionst.h +++ b/include/extnsionst.h @@ -71,7 +71,7 @@ typedef struct _ExtensionEntry { unsigned short (* MinorOpcode)( /* called for errors */ ClientPtr /* client */); #ifdef XCSECURITY - Bool secure; /* extension visible to untrusted clients? */ + pointer securityState[4]; /* 4 slots for use */ #endif } ExtensionEntry; @@ -129,6 +129,7 @@ extern Bool AddExtensionAlias( ExtensionEntry * /*extension*/); extern ExtensionEntry *CheckExtension(const char *extname); +extern ExtensionEntry *GetExtensionEntry(int major); extern ExtensionLookupProc LookupProc( char* /*name*/, diff --git a/include/resource.h b/include/resource.h index 49c189869..c08998c9f 100644 --- a/include/resource.h +++ b/include/resource.h @@ -227,7 +227,7 @@ extern pointer LookupClientResourceComplex( #define SecurityWriteAccess (1<<1) /* changing the object */ #define SecurityDestroyAccess (1<<2) /* destroying the object */ -#ifdef XCSECURITY +#ifdef XACE extern pointer SecurityLookupIDByType( ClientPtr /*client*/, @@ -241,7 +241,7 @@ extern pointer SecurityLookupIDByClass( RESTYPE /*classes*/, Mask /*access_mode*/); -#else /* not XCSECURITY */ +#else /* not XACE */ #define SecurityLookupIDByType(client, id, rtype, access_mode) \ LookupIDByType(id, rtype) @@ -249,7 +249,7 @@ extern pointer SecurityLookupIDByClass( #define SecurityLookupIDByClass(client, id, classes, access_mode) \ LookupIDByClass(id, classes) -#endif /* XCSECURITY */ +#endif /* XACE */ extern void GetXIDRange( int /*client*/, |