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 /dix/property.c | |
parent | 8d9ccc90a54c786ca4ba5620ab0a965e3f3bc8ea (diff) |
Replace XC-SECURITY code with XACE security hooks
(cherry picked from 8526cd6395490b03b279f1962df777fb0e4a9878 commit)
Diffstat (limited to 'dix/property.c')
-rw-r--r-- | dix/property.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/dix/property.c b/dix/property.c index e074c68dd..e69b8d8ed 100644 --- a/dix/property.c +++ b/dix/property.c @@ -60,9 +60,8 @@ SOFTWARE. #include "dixstruct.h" #include "dispatch.h" #include "swaprep.h" -#ifdef XCSECURITY -#define _SECURITY_SERVER -#include <X11/extensions/security.h> +#ifdef XACE +#include "xace.h" #endif /***************************************************************** @@ -121,12 +120,12 @@ ProcRotateProperties(ClientPtr client) return(BadAlloc); for (i = 0; i < stuff->nAtoms; i++) { -#ifdef XCSECURITY - char action = SecurityCheckPropertyAccess(client, pWin, atoms[i], +#ifdef XACE + char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i], SecurityReadAccess|SecurityWriteAccess); #endif if (!ValidAtom(atoms[i]) -#ifdef XCSECURITY +#ifdef XACE || (SecurityErrorOperation == action) #endif ) @@ -135,7 +134,7 @@ ProcRotateProperties(ClientPtr client) client->errorValue = atoms[i]; return BadAtom; } -#ifdef XCSECURITY +#ifdef XACE if (SecurityIgnoreOperation == action) { DEALLOCATE_LOCAL(props); @@ -236,8 +235,8 @@ ProcChangeProperty(ClientPtr client) return(BadAtom); } -#ifdef XCSECURITY - switch (SecurityCheckPropertyAccess(client, pWin, stuff->property, +#ifdef XACE + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, SecurityWriteAccess)) { case SecurityErrorOperation: @@ -504,13 +503,13 @@ ProcGetProperty(ClientPtr client) if (!pProp) return NullPropertyReply(client, None, 0, &reply); -#ifdef XCSECURITY +#ifdef XACE { Mask access_mode = SecurityReadAccess; if (stuff->delete) access_mode |= SecurityDestroyAccess; - switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, + switch(XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, access_mode)) { case SecurityErrorOperation: @@ -666,8 +665,8 @@ ProcDeleteProperty(register ClientPtr client) return (BadAtom); } -#ifdef XCSECURITY - switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, +#ifdef XACE + switch(XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, SecurityDestroyAccess)) { case SecurityErrorOperation: |