security: remove debugging code.
This commit is contained in:
parent
1f06d32ef5
commit
47bd311e3d
|
@ -1281,9 +1281,6 @@ static char *SecurityKeywords[] = {
|
||||||
|
|
||||||
#define NUMKEYWORDS (sizeof(SecurityKeywords) / sizeof(char *))
|
#define NUMKEYWORDS (sizeof(SecurityKeywords) / sizeof(char *))
|
||||||
|
|
||||||
#undef PROPDEBUG
|
|
||||||
/*#define PROPDEBUG 1*/
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SecurityFreePropertyAccessList(void)
|
SecurityFreePropertyAccessList(void)
|
||||||
{
|
{
|
||||||
|
@ -1638,32 +1635,6 @@ SecurityLoadPropertyAccessList(void)
|
||||||
lineNumber, SecurityPolicyFile);
|
lineNumber, SecurityPolicyFile);
|
||||||
} /* end while more input */
|
} /* end while more input */
|
||||||
|
|
||||||
#ifdef PROPDEBUG
|
|
||||||
{
|
|
||||||
PropertyAccessPtr pacl;
|
|
||||||
char *op = "aie";
|
|
||||||
for (pacl = PropertyAccessList; pacl; pacl = pacl->next)
|
|
||||||
{
|
|
||||||
ErrorF("property %s ", NameForAtom(pacl->name));
|
|
||||||
switch (pacl->windowRestriction)
|
|
||||||
{
|
|
||||||
case SecurityAnyWindow: ErrorF("any "); break;
|
|
||||||
case SecurityRootWindow: ErrorF("root "); break;
|
|
||||||
case SecurityWindowWithProperty:
|
|
||||||
{
|
|
||||||
ErrorF("%s ", NameForAtom(pacl->mustHaveProperty));
|
|
||||||
if (pacl->mustHaveValue)
|
|
||||||
ErrorF(" = \"%s\" ", pacl->mustHaveValue);
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ErrorF("%cr %cw %cd\n", op[pacl->readAction],
|
|
||||||
op[pacl->writeAction], op[pacl->destroyAction]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* PROPDEBUG */
|
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
} /* SecurityLoadPropertyAccessList */
|
} /* SecurityLoadPropertyAccessList */
|
||||||
|
|
||||||
|
@ -1696,11 +1667,6 @@ SecurityMatchString(
|
||||||
&& (*cs == '\0') );
|
&& (*cs == '\0') );
|
||||||
} /* SecurityMatchString */
|
} /* SecurityMatchString */
|
||||||
|
|
||||||
#ifdef PROPDEBUG
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused,
|
SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused,
|
||||||
|
@ -1720,25 +1686,6 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused,
|
||||||
(TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) )
|
(TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef PROPDEBUG
|
|
||||||
/* For testing, it's more convenient if the property rules file gets
|
|
||||||
* reloaded whenever it changes, so we can rapidly try things without
|
|
||||||
* having to reset the server.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
struct stat buf;
|
|
||||||
static time_t lastmod = 0;
|
|
||||||
int ret = stat(SecurityPolicyFile , &buf);
|
|
||||||
if ( (ret == 0) && (buf.st_mtime > lastmod) )
|
|
||||||
{
|
|
||||||
ErrorF("reloading property rules\n");
|
|
||||||
SecurityFreePropertyAccessList();
|
|
||||||
SecurityLoadPropertyAccessList();
|
|
||||||
lastmod = buf.st_mtime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If the property atom is bigger than any atoms on the list,
|
/* If the property atom is bigger than any atoms on the list,
|
||||||
* we know we won't find it, so don't even bother looking.
|
* we know we won't find it, so don't even bother looking.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user