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