tsolextension.c revision 606
1117N/A#pragma ident "@(#)tsolextension.c 1.31 09/01/14 SMI"
1117N/A#include "auditwrite.h"
1117N/A#define NEED_REPLIES
1117N/A#ifdef HAVE_DIX_CONFIG_H
1117N/A#include <dix-config.h>
1117N/A#include "inputstr.h"
1117N/A#include "extnsionst.h"
1117N/A#include "dixstruct.h"
1117N/A#include "../Xext/panoramiXsrv.h"
1117N/A#ifdef XCSECURITY
1117N/A#define _SECURITY_SERVER
1117N/A#include "security.h"
1117N/A#include "../Xext/securitysrv.h"
1117N/A#include "tsolpolicy.h"
1117N/A#define BadCmapCookie 0
1117N/Aextern void init_xtsol(void);
1117N/Astatic unsigned char TsolReqCode = 0;
1117N/Aextern unsigned int StripeHeight;
1117N/Aint OwnerUIDint;
1117N/Aextern void LoadTsolConfig(void);
1117N/Aextern void MakeTSOLAtoms(void);
1117N/Aextern void UpdateTsolNode(void);
1117N/ATsolExtensionInit(void)
1117N/A if (!is_system_labeled()) {
init_xtsol();
NULL);
NULL);
for (i = 0; i < PROCVECTORSIZE; i++) {
static CALLBACK(
int reqtype;
switch (rtype) {
case RT_GC:
case RT_PIXMAP:
switch (reqtype) {
case X_PolyPoint:
case X_PolyLine:
case X_PolyArc:
case X_FillPoly:
case X_PolyFillRectangle:
case X_PolyFillArc:
case X_PutImage:
case X_PolyText8:
case X_PolyText16:
case X_ImageText8:
case X_ImageText16:
(void *)MAJOROP))
(void *)MAJOROP))
case X_ChangeProperty:
case X_DeleteProperty:
case X_GetProperty:
case X_ListProperties:
case X_RotateProperties:
(void *)MAJOROP))
(void *)MAJOROP))
case ClientStateInitial:
case ClientStateRunning:
case ClientStateGone:
int retval;
case X_SetPolyInstInfo:
case X_SetPropLabel:
case X_SetPropUID:
case X_SetResLabel:
case X_SetResUID:
case X_GetClientAttributes:
case X_GetClientLabel:
case X_GetPropAttributes:
case X_GetResAttributes:
case X_MakeTPWindow:
case X_MakeTrustedWindow:
case X_MakeUntrustedWindow:
return (retval);
int retval;
case X_SetPolyInstInfo:
case X_SetPropLabel:
case X_SetPropUID:
case X_SetResLabel:
case X_SetResUID:
case X_GetClientAttributes:
case X_GetClientLabel:
case X_GetPropAttributes:
case X_GetResAttributes:
case X_MakeTPWindow:
case X_MakeTrustedWindow:
case X_MakeUntrustedWindow:
return (retval);
int err_code;
return (err_code);
int err_code;
if (!pWin)
return (BadWindow);
return (err_code);
return (BadAtom);
while (pProp)
if (!pProp)
return (BadAtom);
return(BadAlloc);
return (err_code);
int err_code;
if (!pWin)
return (BadWindow);
return (err_code);
return (BadAtom);
while (pProp)
if (!pProp)
return (BadAtom);
return (err_code);
return (BadAlloc);
int err_code;
return (err_code);
return (err_code);
case IsWindow:
if (pWin)
return (BadWindow);
return (err_code);
case IsPixmap:
if (pMap)
return (BadPixmap);
return (err_code);
return (err_code);
int ScreenNumber;
int err_code;
case STRIPEHEIGHT:
return (err_code);
case RES_OUID:
return (err_code);
case IsWindow:
if (pWin)
return (BadWindow);
return (err_code);
case IsPixmap:
if (pMap)
return (BadPixmap);
return (err_code);
return (BadValue);
return (err_code);
int err_code;
return (BadWindow);
return (BadWindow);
return (err_code);
int reply_length;
int err_code;
return (BadWindow);
return (BadWindow);
return (err_code);
return (BadAlloc);
int reply_length;
int err_code;
if (!pWin)
return (BadWindow);
return (err_code);
return (BadAtom);
while (pProp)
if (!pProp)
return (BadAtom);
while (tmp_prop)
if (!tsolprop)
return (BadAlloc);
int reply_length;
int err_code;
if (pWin)
return (BadWindow);
return (err_code);
if (pMap)
return (BadPixmap);
return (err_code);
return (BadAlloc);
int err_code;
#if defined(PANORAMIX)
if (!noPanoramiXExtension)
== NULL)
return BadWindow;
return (BadWindow);
return (err_code);
return (BadWindow);
return (err_code);
int err_code;
return (BadWindow);
return (err_code);
int err_code;
return (BadWindow);
return (err_code);
if (kbdgrab) {
if (ptrgrab) {
if (tsolMultiLevel) {
int errcode;
if (errcode) {
char *temp_inmsg;
struct svc_req r;
memset((char *)&r, 0, sizeof(r));
goto bad1;
goto bad2;
goto bad2;
#ifdef SVR4
goto bad2;
bad2:
bad1:
static Bool
char audit_ret;
int client_gidlen;
char *fullname;
extern int getdomainname(char *, int);
audit_val = 0;
if (system_audit_on &&
int status;
case AF_INET:
case AF_INET6:
if (!status)
return (auth_token);
static CALLBACK(
extern void HandleHotKey(void);
HandleHotKey();
static CALLBACK(
static CALLBACK(
#ifdef UNUSED
char *rhost;
return FALSE;
return TRUE;
return FALSE;