diff --git a/Xext/security.c b/Xext/security.c index ac762794a..572f81196 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1251,7 +1251,7 @@ typedef struct _PropertyAccessRec { } PropertyAccessRec, *PropertyAccessPtr; static PropertyAccessPtr PropertyAccessList = NULL; -static char SecurityDefaultAction = SecurityErrorOperation; +static char SecurityDefaultAction = XaceErrorOperation; static char *SecurityPolicyFile = DEFAULTPOLICYFILE; static ATOM SecurityMaxPropertyName = 0; @@ -1410,9 +1410,9 @@ SecurityParsePropertyAccessRule( { switch (c) { - case 'i': action = SecurityIgnoreOperation; break; - case 'a': action = SecurityAllowOperation; break; - case 'e': action = SecurityErrorOperation; break; + case 'i': action = XaceIgnoreOperation; break; + case 'a': action = XaceAllowOperation; break; + case 'e': action = XaceErrorOperation; break; case 'r': readAction = action; break; case 'w': writeAction = action; break; @@ -1797,7 +1797,7 @@ CALLBACK(SecurityCheckPropertyAccess) * If pacl doesn't apply, something above should have * executed a continue, which will skip the follwing code. */ - action = SecurityAllowOperation; + action = XaceAllowOperation; if (access_mode & SecurityReadAccess) action = max(action, pacl->readAction); if (access_mode & SecurityWriteAccess) @@ -1808,11 +1808,11 @@ CALLBACK(SecurityCheckPropertyAccess) } /* end for each pacl */ } /* end if propertyName <= SecurityMaxPropertyName */ - if (SecurityAllowOperation != action) + if (XaceAllowOperation != action) { /* audit the access violation */ int cid = CLIENT_ID(pWin->drawable.id); int reqtype = ((xReq *)client->requestBuffer)->reqType; - char *actionstr = (SecurityIgnoreOperation == action) ? + char *actionstr = (XaceIgnoreOperation == action) ? "ignored" : "error"; SecurityAudit("client %d attempted request %d with window 0x%x property %s (atom 0x%x) of client %d, %s\n", client->index, reqtype, pWin->drawable.id, diff --git a/Xext/xace.c b/Xext/xace.c index 7f7944a17..6fc5c12ee 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -99,7 +99,7 @@ int XaceHook(int hook, ...) va_arg(ap, WindowPtr), va_arg(ap, Atom), va_arg(ap, Mask), - SecurityAllowOperation /* default allow */ + XaceAllowOperation /* default allow */ }; calldata = &rec; prv = &rec.rval; diff --git a/Xext/xace.h b/Xext/xace.h index 6f998951e..7231b04bc 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -21,9 +21,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define _XACE_H /* Hook return codes */ -#define SecurityErrorOperation 0 -#define SecurityAllowOperation 1 -#define SecurityIgnoreOperation 2 +#define XaceErrorOperation 0 +#define XaceAllowOperation 1 +#define XaceIgnoreOperation 2 #ifdef XACE @@ -107,10 +107,10 @@ extern void XaceCensorImage( /* Define calls away when XACE is not being built. */ #ifdef __GNUC__ -#define XaceHook(args...) SecurityAllowOperation +#define XaceHook(args...) XaceAllowOperation #define XaceCensorImage(args...) { ; } #else -#define XaceHook(...) SecurityAllowOperation +#define XaceHook(...) XaceAllowOperation #define XaceCensorImage(...) { ; } #endif diff --git a/dix/property.c b/dix/property.c index 0946b65e1..00d485655 100644 --- a/dix/property.c +++ b/dix/property.c @@ -119,12 +119,12 @@ ProcRotateProperties(ClientPtr client) char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i], SecurityReadAccess|SecurityWriteAccess); - if (!ValidAtom(atoms[i]) || (SecurityErrorOperation == action)) { + if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) { DEALLOCATE_LOCAL(props); client->errorValue = atoms[i]; return BadAtom; } - if (SecurityIgnoreOperation == action) { + if (XaceIgnoreOperation == action) { DEALLOCATE_LOCAL(props); return Success; } @@ -226,10 +226,10 @@ ProcChangeProperty(ClientPtr client) switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, SecurityWriteAccess)) { - case SecurityErrorOperation: + case XaceErrorOperation: client->errorValue = stuff->property; return BadAtom; - case SecurityIgnoreOperation: + case XaceIgnoreOperation: return Success; } @@ -495,10 +495,10 @@ ProcGetProperty(ClientPtr client) switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, access_mode)) { - case SecurityErrorOperation: + case XaceErrorOperation: client->errorValue = stuff->property; return BadAtom;; - case SecurityIgnoreOperation: + case XaceIgnoreOperation: return NullPropertyReply(client, pProp->type, pProp->format, &reply); } @@ -649,10 +649,10 @@ ProcDeleteProperty(register ClientPtr client) switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, SecurityDestroyAccess)) { - case SecurityErrorOperation: + case XaceErrorOperation: client->errorValue = stuff->property; return BadAtom;; - case SecurityIgnoreOperation: + case XaceIgnoreOperation: return Success; }