tsolpolicy.c revision 250
561N/A#pragma ident "@(#)tsolpolicy.c 1.20 07/11/16 SMI"
561N/A#ifdef HAVE_DIX_CONFIG_H
911N/A#include <dix-config.h>
561N/A#define NEED_REPLIES
561N/A#define NEED_EVENTS
#include <stdio.h>
#include <unistd.h>
#include "auditwrite.h"
#include "misc.h"
#include "scrnintstr.h"
#include "os.h"
#include "regionstr.h"
#include "validate.h"
#include "windowstr.h"
#include "propertyst.h"
#include "input.h"
#include "inputstr.h"
#include "resource.h"
#include "colormapst.h"
#include "cursorstr.h"
#include "dixstruct.h"
#include "selection.h"
#include "gcstruct.h"
#include "servermd.h"
#include <syslog.h>
#include "tsolinfo.h"
#include "tsolpolicy.h"
extern int tsolWindowPrivateIndex;
extern int tsolPixmapPrivateIndex;
extern char *ProtoNames[];
extern int tsolMultiLevel;
#ifdef DEBUG
0, (void *) xid)
int status = 0;
int audit_status = 0;
audit_status = 0;
if (!logopened)
#ifdef DEBUG
if (do_audit)
return (status);
return (PASSED);
return PASSED;
if (do_audit)
return (ret_stat);
return PASSED;
if (do_audit)
return (ret_stat);
return (PASSED);
return (err_code);
if (do_audit)
return (ret_stat);
return (err_code);
if (do_audit)
return (ret_stat);
int obj_code = 0;
return (err_code);
if (do_audit)
return (ret_stat);
int obj_code = 0;
return (PASSED);
return (PASSED);
return (err_code);
if (do_audit)
return (ret_stat);
if (do_audit)
return (ret_stat);
if (do_audit)
return (ret_stat);
if (do_audit)
return (ret_stat);
return (BadValue);
return (PASSED);
return (BadValue);
if (do_audit)
return (ret_stat);
if (priv_win_config)
return (PASSED);
if (do_audit)
return (ret_stat);
return (BadValue);
return (BadValue);
if (do_audit)
return (ret_stat);
#if TBD
priv =
if (do_audit)
return (ret_stat);
return (PASSED);
if (priv_win_colormap)
return (PASSED);
if (priv_win_colormap)
return (PASSED);
#ifdef TBD
if (priv_win_colormap)
return (PASSED);
return (PASSED);
return (PASSED);
return (PASSED);
return (PASSED);
return (PASSED);
if (priv_win_colormap)
return (PASSED);
return (ret_stat);
int object_code = 0;
switch (res_type) {
case RT_PIXMAP:
case RT_FONT:
case RT_GC:
case RT_CURSOR:
case RT_COLORMAP:
if (!tsolinfo)
return (err_code);
if (do_audit)
return (ret_stat);
if (priv_win_fontpath)
return (PASSED);
if (do_audit)
return (ret_stat);
if (priv_win_devices)
return (PASSED);
if (do_audit)
return (ret_stat);
if (priv_win_devices)
return (PASSED);
if (do_audit)
return (ret_stat);
if (priv_win_config)
return (PASSED);
if (do_audit)
return (ret_stat);
return PASSED;
int i, status;
#ifdef DEBUG
if (do_audit)
return (ret_stat);
return(BadAlloc);
if (do_audit)
return (ret_stat);
return(BadAlloc);
if (do_audit)
return (ret_stat);
return(BadAlloc);
if (do_audit)
return (ret_stat);
return (PASSED);
if (do_audit)
return (ret_stat);
return (PASSED);
if (do_audit)
return (ret_stat);
if (priv_win_config)
return (PASSED);
if (priv_win_config)
return (PASSED);
if (do_audit)
return (ret_stat);
return (NULL);
return slstring;
if (do_audit)
return (ret_stat);
return (PASSED);
if (do_audit)
return (ret_stat);
if (grab)
return (err_code);
if (do_audit)
return (ret_stat);
return (PASSED);
if (do_audit)
return (ret_stat);
#ifdef DEBUG
if (isstring)
return (PASSED);
if (do_audit)
return (ret_stat);
* requires win_upgrade/downgrade_sl privs
if (priv_win_config)
return (ret_stat);
#ifdef DEBUG
if (do_audit)
return (ret_stat);
#ifdef DEBUG
#ifdef DEBUG
if (do_audit)
return (ret_stat);
return (PASSED);
if (do_audit)
return (ret_stat);
return (err_code);
return (PASSED);
return (err_code);
return (PASSED);
#ifdef DEBUG
if (do_audit)
return (ret_stat);
#ifdef DEBUG
if (do_audit)
return (ret_stat);
return (PASSED);
return BadAccess;
return PASSED;
return BadAccess;
#ifdef DEBUG
return (PASSED);
struct xpolicy_cache {
void *resource;
void *subject;
int ret_value;
int count;
int res_type;
int ret_value;
return ret_value;
static priv_set_t *
return pset;