Naming change: Security*Operation -> Xace*Operation

This commit is contained in:
Eamon Walsh 2006-12-01 21:12:21 -05:00 committed by Eamon Walsh
parent f44f14fe56
commit ac90ce58ba
4 changed files with 21 additions and 21 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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

View File

@ -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;
}