tsolprotocol.c revision 606
98N/A#pragma ident "@(#)tsolprotocol.c 1.25 09/01/14 SMI"
493N/A#ifdef HAVE_DIX_CONFIG_H
493N/A#include <dix-config.h>
493N/A#include "auditwrite.h"
#include "inputstr.h"
#define NEED_REPLIES
#include "selection.h"
#include "osdep.h"
#include "tsolpolicy.h"
#include "swaprep.h"
#include "swapreq.h"
#include "servermd.h"
#ifdef PANORAMIX
#include "../Xext/panoramiXsrv.h"
#ifdef XCSECURITY
#include "../Xext/securitysrv.h"
#include "xace.h"
#include "xacestr.h"
* The event # here match those in /usr/include/bsm/audit_uevents.h.
extern int tsol_nodelength;
extern int tsolMultiLevel;
extern char *ConnectionInfo;
extern int connBlockScreenStart;
static Atom
GetLastAtom(void)
while (ValidAtom(a)) {
UpdateTsolNode(void)
tsol_lastAtom = 0;
char *tchar;
return(BadValue);
return (BadAlloc);
char *str;
int len;
return (BadAtom);
int newsize;
return (newAtom);
return newAtom;
return newAtom;
int rc;
#ifdef TSOL
return Success;
return rc;
return BadAtom;
#ifdef TSOL
return(BadAtom);
while (tsolseln)
== EARLIER)
return Success;
&event,
NullGrab);
else if (tsolseln)
return Success;
#ifdef TSOL
if (!pSel)
return BadAlloc;
return rc;
return rc;
#ifdef TSOL
if (!tsolseln)
if (!tsolseln)
return BadAlloc;
if (prevtsolseln)
#ifdef TSOL
int rc;
return BadAtom;
#ifdef TSOL
while (tsolseln)
if (tsolseln)
return rc;
int rc;
return rc;
if (!paramsOkay) {
return BadAtom;
return rc;
#ifdef TSOL
while (tsolseln)
if (!tsolseln)
return (BadAtom);
NullGrab))
AllocTsolProp(void)
if (tsolprop)
return tsolprop;
AllocServerTsolProp(void)
if (tsolprop)
return tsolprop;
int format,
int mode,
unsigned long len,
int sizeInBytes;
int totalSize;
int result;
if (!polyprop)
return (result);
while (pProp )
return(BadAlloc);
return (result);
return(BadAlloc);
if (!pProp)
return(BadAlloc);
if (!(*tsolpropP))
return(BadAlloc);
return(BadAlloc);
if (len)
return(BadMatch);
return(BadMatch);
while (tsolprop)
if (!tsolprop)
if (!newtsol)
return(BadAlloc);
return(BadAlloc);
if (len)
switch (mode)
case PropModeReplace:
return(BadAlloc);
if (len)
case PropModeAppend:
if (len)
data =
if (!data)
return(BadAlloc);
case PropModePrepend:
if (len)
data =
if (!data)
return(BadAlloc);
return(Success);
return (Success);
return(Success);
while (pProp)
while (tsolprop)
if (pProp)
if (tsolprop)
if (prevtsolprop)
return(Success);
return rc;
return (rc);
numProps++;
return BadAlloc;
numProps = 0;
numProps++;
numProps++;
if (numProps)
int rc;
return rc;
return(BadAtom);
return(BadValue);
return(BadAtom);
return (rc);
while (pProp)
while (tsolprop)
return(Success);
if (n < ind)
return BadValue;
if (len)
return result;
int status;
if (!reportErrors) {
else if (makeTrusted)
return (status);
int inputMapLen;
int status;
int savedtrust;
return BadLength;
for (i = 0; i < inputMapLen; i++) {
return BadValue;
return (status);
#if defined(PANORAMIX)
if (!noPanoramiXExtension)
if (tpwin) {
if (tpwin)
int rc;
return rc;
return rc;
return rc;
int rc;
return rc;
return (rc);
return rc;
int result;
return result;
if (!pWin)
return BadWindow;
HandleHotKey(void)
extern unsigned int StripeHeight;
if (kbdgrab)
if (tsolinfo)
if (ptrgrab)
if (tsolinfo)
if (!trusted_grab)
int rc;
int rc;
return rc;
return Success;
while (p2)
CheckTPWin(void)
while (pWin)
return count;
++count;
int status;
if ( noPanoramiXExtension )
return status;
extern unsigned int StripeHeight;
return (status);
int result;
if (pMap)
return result;
int result;
return (BadValue);
while (tsolseln)
if (tsolseln)
if (SelectionCallback)
while (tsolseln)
if (tsolseln)
if (SelectionCallback)
return rc;
return rc;
sizeof(Colormap));
if(!preply)
return(BadAlloc);
#ifdef TSOL
int err_code, i;
#ifdef TSOL
return rc;
#ifdef TSOL
return(BadWindow);
#ifdef TSOL
numChildren++;
numChildren++;
if (numChildren)
int curChild = 0;
if (!childIDs)
return BadAlloc;
#ifdef TSOL
if (numChildren)
unsigned int protocol;
int xevent_num;
int count = 0;
int status = 0;
if (system_audit_on &&
* X audit events start from 9101 in audit_uevents.h. The first two
audit_ret = 0;
int rc;
return rc;
return rc;
return(Success);
int format,
register int linesDone;
char *pBuf;
#ifdef TSOL
return(BadValue);
return rc;
#ifdef TSOL
x = tmpx;
y = tmpy;
if (not_root_window)
while (tmpwin)
pDraw->x + x < 0 ||
pDraw->y + y < 0 ||
return(BadMatch);
return(BadMatch);
if (im_return) {
if (!pBuf)
return (BadAlloc);
if (widthBytesLine == 0)
linesPerBuf = 0;
linesPerBuf = 0;
linesPerBuf--;
linesPerBuf++;
return (BadAlloc);
if (linesPerBuf == 0)
linesDone = 0;
y + linesDone,
#ifdef TSOL
if (not_root_window)
if (over_win &&
if (overlap)
if (!im_return)
pBuf);
linesDone = 0;
y + linesDone,
#ifdef TSOL
if (not_root_window)
if (over_win &&
if (overlap)
if (im_return) {
pBuf);
if (!im_return)
int status;
return (status);
int savedtrust;
int status;
return (BadGC);
return (status);
int savedtrust;
int status;
return (BadGC);
return (status);
int savedtrust;
int status;
int rc;
return rc;
return (BadMatch);
return (BadGC);
return (status);
int savedtrust;
int status;
int rc;
return rc;
return (BadMatch);
return (BadGC);
return (status);