diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-26 10:58:45 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-26 10:58:45 +0000 |
commit | ddd650147fb204ab295c398966127129da577908 (patch) | |
tree | 8e7855f0d79470c9621286b73a9c8e28c3cf1d0d /app/xsystrace | |
parent | 24036b4111a1ec2f391e0f6d177c2bc1be92c515 (diff) |
Importing from XF4, plus BSD make infrastructure
Diffstat (limited to 'app/xsystrace')
-rw-r--r-- | app/xsystrace/.gitignore | 2 | ||||
-rw-r--r-- | app/xsystrace/Imakefile | 13 | ||||
-rw-r--r-- | app/xsystrace/Makefile | 18 | ||||
-rw-r--r-- | app/xsystrace/Xsystrace.ad | 416 | ||||
-rw-r--r-- | app/xsystrace/callbacks.c | 514 | ||||
-rw-r--r-- | app/xsystrace/callbacks.h | 51 | ||||
-rw-r--r-- | app/xsystrace/interface.c | 251 | ||||
-rw-r--r-- | app/xsystrace/interface.h | 43 | ||||
-rw-r--r-- | app/xsystrace/main.c | 211 | ||||
-rw-r--r-- | app/xsystrace/pixmaps/Imakefile | 11 | ||||
-rw-r--r-- | app/xsystrace/pixmaps/deny-always.xpm | 151 | ||||
-rw-r--r-- | app/xsystrace/pixmaps/deny.xpm | 121 | ||||
-rw-r--r-- | app/xsystrace/pixmaps/logo.xpm | 1112 | ||||
-rw-r--r-- | app/xsystrace/pixmaps/permit-always.xpm | 148 | ||||
-rw-r--r-- | app/xsystrace/pixmaps/permit.xpm | 102 | ||||
-rw-r--r-- | app/xsystrace/pixmaps/skull.xpm | 364 | ||||
-rw-r--r-- | app/xsystrace/policy.c | 263 | ||||
-rw-r--r-- | app/xsystrace/policy.h | 42 | ||||
-rw-r--r-- | app/xsystrace/xsystrace.1 | 56 |
19 files changed, 3889 insertions, 0 deletions
diff --git a/app/xsystrace/.gitignore b/app/xsystrace/.gitignore new file mode 100644 index 000000000..a87b1b25c --- /dev/null +++ b/app/xsystrace/.gitignore @@ -0,0 +1,2 @@ +obj +*~ diff --git a/app/xsystrace/Imakefile b/app/xsystrace/Imakefile new file mode 100644 index 000000000..c9482dce7 --- /dev/null +++ b/app/xsystrace/Imakefile @@ -0,0 +1,13 @@ +XCOMM $OpenBSD: Imakefile,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ + +#define IHaveSubdirs +SUBDIRS= pixmaps + +DEPLIBS= XawClientDepLibs +LOCAL_LIBRARIES= XawClientLibs +SRCS= main.c interface.c callbacks.c policy.c +OBJS= main.o interface.o callbacks.o policy.o + +ComplexProgramTarget(xsystrace) +InstallAppDefaults(Xsystrace) + diff --git a/app/xsystrace/Makefile b/app/xsystrace/Makefile new file mode 100644 index 000000000..e28a348e5 --- /dev/null +++ b/app/xsystrace/Makefile @@ -0,0 +1,18 @@ +# $OpenBSD: Makefile,v 1.1 2006/11/26 10:58:43 matthieu Exp $ + +PROG= xsystrace +MAN= xsystrace.1 + +CPPFLAGS+= -I${X11BASE}/include +LDADD+= -L${X11BASE}/lib -lXaw -lXt -lXmu -lX11 -lXext + +SRCS= main.c interface.c callbacks.c policy.c + +beforeinstall: + ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \ + ${.CURDIR}/Xsystrace.ad ${PREFIX}/${LIBDIR}/X11/app-defaults + +.include <bsd.prog.mk> +.include <bsd.xorg.mk> + + diff --git a/app/xsystrace/Xsystrace.ad b/app/xsystrace/Xsystrace.ad new file mode 100644 index 000000000..f6bdfd687 --- /dev/null +++ b/app/xsystrace/Xsystrace.ad @@ -0,0 +1,416 @@ +! $OpenBSD: Xsystrace.ad,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ +! +! Copyright (c) 2002 Matthieu Herrb and Niels Provos +! All rights reserved. +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! +! - Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! - Redistributions in binary form must reproduce the above +! copyright notice, this list of conditions and the following +! disclaimer in the documentation and/or other materials provided +! with the distribution. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +! COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! + +*background: #d7d7d7 +*.font: -*-helvetica-medium-r-*--12-*-*-*-*-*-iso8859-1 +*borderWidth: 0 + +! +! 3D frame for Forms +! +*.Form.displayList:\ +foreground gray90;\ +lines 1,-2,1,16,-2,16;\ +lines 0,-1,-1,-1,-1,15;\ +foreground gray40;\ +lines 0,-2,0,15,-2,15;\ +lines 1,-2,-2,-2,-2,16 + +*.tip.background: #ffffc0 +*.tip.font: -*-helvetica-medium-r-*--10-*-*-*-*-*-iso8859-1 + +! +! Generic 3D Menu +! +*MenuButton.foreground: gray20 +*MenuButton.displayList:\ +line-style solid;\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1;\ +line-style onoffdash;\ +foreground gray80;\ +draw-rect 1,1,-2,-2 +! +*SimpleMenu.?.foreground: gray20 +*SimpleMenu.displayList:\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1 +! +! Generic 3D Text field +! +*Text.?.foreground: gray20 +*Text.borderWidth: 0 +*Text.background: gray96 +*Text.?.cursorColor: rgb:d/5/5 +*Text.displayList:\ +foreground gray90;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray40;\ +lines -1,0,0,0,0,-1 +! +! Generic 3D buttons +! +*Command.displayList:\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1 + +! +! Widgets placement +! +*date-label.fromHoriz: title-label +*processInfo-form.fromVert: title-form +*processInfo-form.vertDistance: 0 +*syscallInfo-form.fromVert: processInfo-form +*syscallInfo-form.vertDistance: 0 +*status-form.fromVert: syscallInfo-form +*status-form.vertDistance: 0 +*errorCode-form.fromVert: status-form +*errorCode-form.vertDistance: 0 +*specialProc-form.fromHoriz: errorCode-form +*specialProc-form.fromVert: status-form +*specialProc-form.vertDistance: 0 +*buttons-form.fromVert: specialProc-form +*buttons-form.vertDistance: 0 +! +*processName-label.fromVert: processInfo-label +*processName-value.fromHoriz: processName-label +*processName-value.fromVert: processInfo-label +*processPid-label.fromVert: processName-label +*processPid-value.fromHoriz: processPid-label +*processPid-value.fromVert: processName-value +*policyName-label.fromVert: processPid-label +*policyName-value.fromVert: processPid-value +*policyName-value.fromHoriz: policyName-label +! +*syscallInfo-value.fromVert: syscallInfo-label +*filter-label.fromVert: syscallInfo-value +*filter-text.fromHoriz: filter-label +*filter-text.fromVert: syscallInfo-value +*filter-menu-button.fromHoriz: filter-text +*filter-menu-button.fromVert: syscallInfo-value +*filter-button.fromHoriz: filter-menu-button +*filter-button.fromVert: syscallInfo-value +*status-value.fromVert: status-label +*errorCode-text.fromVert: errorCode-label +*errorCode-button.fromHoriz: errorCode-text +*errorCode-button.fromVert: errorCode-label +*kill-button.fromVert: specialProc-label +*review-button.fromHoriz: kill-button +*review-button.fromVert: specialProc-label +*auto-button.fromHoriz: review-button +*auto-button.fromVert: specialProc-label +*allow-button.fromHoriz: deny-button +*deny-all-button.fromHoriz: allow-button +*deny-all-button.horizDistance: 15 +*allow-all-button.fromHoriz: deny-all-button +! +*review-text.fromVert: review-label +*done-button.fromVert: review-text +! +*wizard-help-text.fromVert: wizard-help-label +*wizard-form.fromVert: wizard-help-form +*wizard-form.vertDistance: 0 +*wizard-text.fromVert: wizard-label +*wizard-ok-button.fromVert: wizard-text +*wizard-cancel-button.fromHoriz: wizard-ok-button +*wizard-cancel-button.fromVert: wizard-text +! +! Main form +! +*.form.displayList: +*.wizard-top.displayList: +! +! Logo Display +! +*title-form.displayList: +*title-label.label: +*title-label.width: 209 +*title-label.height: 28 +*title-label.displayList:\ +image xpm:logo.xpm,0,0,0,0 +! +*date-label.width: 200 +! +! Process Information +! +*processName-label.width: 120 +*processName-label.justify: left +!*processName-value.font: -*-helvetica-bold-r-*--14-*-*-*-*-*-iso8859-1 +*processName-value.foreground: red2 +*processName-value.justify: left +*processName-value.width: 335 +*processPid-label.width: 120 +*processPid-label.justify: left +!*processPid-value.font: -*-helvetica-bold-r-*--14-*-*-*-*-*-iso8859-1 +*processPid-value.foreground: red2 +*processPid-value.justify: left +*processPid-value.width: 335 +*policyName-label.width: 120 +*policyName-label.justify: left +!*policyName-value.font: -*-helvetica-bold-r-*--14-*-*-*-*-*-iso8859-1 +*policyName-value.foreground: red2 +*policyName-value.width: 335 +*policyName-value.justify: left +! +! Syscall Information +! +*syscallInfo-value.font: -*-helvetica-bold-r-*--14-*-*-*-*-*-iso8859-1 +*syscallInfo-value.foreground: red2 +*syscallInfo-value.width: 460 +! +! Syscall Filter text entry +! +*filter-text.width: 270 +*filter-text.background: gray90 +*filter-text.translations: #override \ +<Key>Return: filter-changed() +! +*status-value.width: 460 +*status-value.label: +! +! Special processing buttons +! +*kill-button.width: 65 +*kill-button.height: 40 +*kill-button.displayList:\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1;\ +image xpm:skull.xpm,5,5,0,0;\ +foreground black;\ +font -*-helvetica-medium-r-*--12-*-*-*-*-*-iso8859-1;\ +draw-string 40,25,Kill +! +*review-button.height: 40 +! +*auto-button.height: 40 +! +*buttons-form.displayList: +! +! Permit button +! +*allow-button.width: 100 +*allow-button.height: 50 +*allow-button.displayList:\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1;\ +image xpm:permit.xpm,0,0,0,0;\ +foreground black;\ +font -*-helvetica-medium-r-*--12-*-*-*-*-*-iso8859-1;\ +draw-string 55,30,Permit +! +! Deny button +! +*deny-button.width: 100 +*deny-button.height: 50 +*deny-button.displayList:\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1;\ +image xpm:deny.xpm,0,0,0,0;\ +foreground black;\ +font -*-helvetica-medium-r-*--12-*-*-*-*-*-iso8859-1;\ +draw-string 55,30,Deny +! +! Permit Always button +! +*allow-all-button.width: 120 +*allow-all-button.height: 50 +*allow-all-button.displayList:\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1;\ +image xpm:permit-always.xpm,5,0,0,0;\ +foreground black;\ +font -*-helvetica-medium-r-*--12-*-*-*-*-*-iso8859-1;\ +draw-string 55,20,"Permit";\ +draw-string 60,35,"Always" +! +! Deny Always button +! +*deny-all-button.width: 120 +*deny-all-button.height: 50 +*deny-all-button.displayList:\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +foreground gray90;\ +lines -1,0,0,0,0,-1;\ +image xpm:deny-always.xpm,5,0,0,0;\ +foreground black;\ +font -*-helvetica-medium-r-*--12-*-*-*-*-*-iso8859-1;\ +draw-string 55,20,"Deny";\ +draw-string 60,35,"Always"; +! +! +*review-text.width: 380 +*review-text.height: 70 +*review-text.scrollVertical: Always +*review-text*borderwidth: 1 +! +*wizard-text.width: 100 +*wizard-text.height: 100 +*wizard-text.verticalList: True +*wizard-text.forceColumns: True +*wizard-text.defaultColumns: 1 +*wizard-text.background: white +*wizard-text*borderwidth: 1 +! +! Various labels +! +*processInfo-label.label: Process Information +*processName-label.label: Process Name: +*processPid-label.label: Process Id: +*policyName-label.label: Policy Name: +*syscallInfo-label.label: System Call Information +*filter-label.label: Filter Expression: +*filter-button.label: Wizard +*status-label.label: Status: +*kill-button.label: +*review-button.label: Review Filter +*auto-button.label: Automatic +*allow-button.label: +*deny-button.label: +*allow-all-button.label: +*deny-all-button.label: +*review-label.label: Filter List +*done-button.label: OK +! +*filter-menu-button.width: 25 +*filter-menu-button.label: +*filter-menu-button.displayList:\ +foreground gray90;\ +lines -1,0,0,0,0,-1;\ +lines 12,15,5,5,20,5;\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +lines 12,15,20,5 +! +*wizard-help-label.label: Systrace Notification +*wizard-help-text.label: \ +This dialog allows the selection of default policies\n\ +for the current application. The following list \n\ +describes potential templates that can be used as \n\ +a quick start for a new policy. +*wizard-label.label: Templates +*wizard-ok-button.label: OK +*wizard-cancel-button.label: Cancel +! +*errorCode-label.label: Error Code: +*errorCode-button.label: +*errorCode-text.width: 200 +*errorCode-text.background: gray90 +*errorCode-text.translations: #override \ +<Key>Return: errorcode-changed() +*errorCode-button.width: 25 +*errorCode-button.displayList:\ +foreground gray90;\ +lines -1,0,0,0,0,-1;\ +lines 12,15,5,5,20,5;\ +foreground gray40;\ +lines 1,-1,-1,-1,-1,1;\ +lines 12,15,20,5 +! +*specialProc-label.label: Special Processing +! +! +! Tips +! +*filter-text.tip: \ +Enter a filter expression that will \n\ +be added to the current policy. \n\ +A sample policy can be choosed from the \n\ +pull-down list. + +*filter-menu-button.tip: \ +Give a choice of sample policies \n\ +for the current system call. + +*filter-button.tip: \ +Pops up a dialog that allows to \n\ +select a template policy. + +*errorCode-button.tip: \ +Configure the error code that is \n\ +returned to the application when \n\ +the system call is denied. + +*errorCode-text.tip: \ +You can enter an error code here\n\ +that's not listed in the menu on\n\ +the right. + +*kill-button.tip: \ +This button will terminate\n\ +the current application. + +*review-button.tip: \ +Review the configured policy\n\ +for this system call. + +*auto-button.tip: \ +Detaches the interactive monitoring from\n\ +the current policy. If a policy exists, all\n\ +system calls not covered by it will be\n\ +denied. Otherwise, if no policy exists,\n\ +all system calls for this process will be\n\ +allowed. + +*allow-button.tip: \ +Allows the current system call. If the\n\ +application attempts the system call again,\n\ +a new warning will be generated. + +*deny-button.tip: \ +Denies the current system call. \n\ +The error code above is returned to the\n\ +application. The application is allowed\n\ +to attempt the system call again + +*allow-all-button.tip: \ +Permits this system call forever. No more\n\ +monitoring of this system call is happening.\n\ +Use this option very carefully. + +*deny-all-button.tip: \ +Denies the application to execute the system\n\ +call ever again. The error configured above\n\ +will be returned. Use this option carefully. + diff --git a/app/xsystrace/callbacks.c b/app/xsystrace/callbacks.c new file mode 100644 index 000000000..d90a1a874 --- /dev/null +++ b/app/xsystrace/callbacks.c @@ -0,0 +1,514 @@ +/* $OpenBSD: callbacks.c,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ */ +/* + * Copyright (c) 2002 Matthieu Herrb and Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <X11/Intrinsic.h> +#include <X11/StringDefs.h> +#include <X11/Xaw/AsciiText.h> +#include <X11/Xaw/Cardinals.h> +#include <X11/Xaw/Command.h> +#include <X11/Xaw/Form.h> +#include <X11/Xaw/Label.h> +#include <X11/Xaw/List.h> +#include <X11/Xaw/SmeBSB.h> +#include <X11/Xaw/SimpleMenu.h> +#include <X11/Shell.h> + +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h> +#include <stdlib.h> +#include <unistd.h> +#include <limits.h> +#include <errno.h> +#include <err.h> + +#include "callbacks.h" +#include "interface.h" +#include "policy.h" + +#define MAX_WIZARDS 100 + +typedef enum { + WAIT_SYSCALL, + WAIT_POLICY, + WAIT_ACK, + WAIT_WIZARD, +} notificatition_state_t; + +static notificatition_state_t state = WAIT_SYSCALL; +static Widget policyText, wizardText; +static char *errorcode; +static String templateList[MAX_WIZARDS]; +static int nTemplates = 0; + +static void TextAppend(Widget, char *, int); +static void TextReplace(Widget, int, int, XawTextBlock *); +static long TextLength(Widget); +static void make_wizard(Widget); + +XtInputId inputId; + +static void +dprintf(char *format, ...) +{ + va_list ap; + + va_start(ap, format); + if (getenv("NOTIFICATION_DEBUG") != NULL) { + vfprintf(stderr, format, ap); + } + va_end(ap); +} + +static char * +freadline(char *line, size_t size, int fd) +{ + char *p = line; + ssize_t n; + + for (;;) { + if (size == 0) + return NULL; + + if ((n = read(fd, p, 1)) <= 0) { + dprintf("got null line n=%ld state %d\n", n, state); + XtRemoveInput(inputId); + return NULL; + } + if (*p == '\n') + break; + + size--; + p++; + } + + *p = '\0'; + + dprintf("state %d got line: %s\n", state, line); + return (line); +} + +void +getInput(XtPointer clientData, int *file, XtInputId *inputId) +{ + char line[_POSIX2_LINE_MAX], *p; + char *name, *id, *polname, *filters; + time_t curtime; + int nfilters; + Widget sme; + struct policy_list *pl, *next; + struct plist *items; + + if (freadline(line, sizeof(line), *file) == NULL) { + done = True; + return; + } + + switch (state) { + case WAIT_POLICY: + /* Reading policy for current syscall */ + if (strcmp(line, "WRONG") == 0) { + state = WAIT_ACK; + return; + } + TextAppend(policyText, line, strlen(line)); + TextAppend(policyText, "\n", 1); + return; + + case WAIT_WIZARD: + /* Reading template list */ + if (strcmp(line, "WRONG") == 0) { + if (nTemplates != 0) { + make_wizard(wizardButton); + } + state = WAIT_ACK; + return; + } + if (!isdigit(line[0])) { + return; + } + templateList[nTemplates++] = XtNewString(line); + return; + + case WAIT_ACK: + /* Waiting for user action on current syscall */ + if (strcmp(line, "OKAY") == 0) { + XtUnmapWidget((Widget)clientData); + state = WAIT_SYSCALL; + return; + } + if (strcmp(line, "WRONG") == 0) { + return; + } + XtVaSetValues(status, XtNlabel, line, NULL); + return; + + case WAIT_SYSCALL: + /* Waiting for next syscall */ + p = line; + name = strsep(&p, ","); + if (p == NULL || *p == '\0') + errx(1, "Bad input line"); + p++; + strsep(&p, " "); + if (p == NULL || *p == '\0') + errx(1, "Bad input line"); + id = strsep(&p, "("); + if (p == NULL || *p == '\0') + errx(1, "Bad input line"); + strsep(&p, ":"); + if (p == NULL || *p == '\0') + errx(1, "Bad input line"); + p++; + polname = strsep(&p, ","); + if (p == NULL || *p == '\0') + errx(1, "Bad input line"); + strsep(&p, ":"); + if (p == NULL || *p == '\0') + errx(1, "Bad input line"); + p++; + filters = strsep(&p, ","); + if (p == NULL || *p == '\0') + errx(1, "Bad input line"); + nfilters = atoi(filters); + strsep(&p, ":"); + if (p == NULL || *p == '\0') + errx(1, "Bad input line"); + p++; + + XtVaSetValues(pName, XtNlabel, name, NULL); + XtVaSetValues(pId, XtNlabel, id, NULL); + XtVaSetValues(policyName, XtNlabel, polname, NULL); + XtVaSetValues(syscallName, XtNlabel, p, NULL); + XtVaSetValues(status, XtNlabel, "", NULL); + if (nfilters) { + XtVaSetValues(wizardButton, XtNsensitive, FALSE, + NULL); + XtVaSetValues(reviewButton, XtNsensitive, TRUE, + NULL); + } else { + XtVaSetValues(wizardButton, XtNsensitive, TRUE, + NULL); + XtVaSetValues(reviewButton, XtNsensitive, FALSE, + NULL); + } + XtDestroyWidget(filterPopup); + filterPopup = XtCreatePopupShell("menu", + simpleMenuWidgetClass, forms[2], NULL, 0); + + items = make_policy_suggestion(p); + pl = SIMPLEQ_FIRST(items); + on_filter_select(filterText, pl->line, + NULL); + for (pl = SIMPLEQ_FIRST(items); pl != SIMPLEQ_END(items); + pl = next) { + next = SIMPLEQ_NEXT(pl, next); + sme = XtCreateManagedWidget(pl->line, + smeBSBObjectClass, filterPopup, NULL, 0); + XtAddCallback(sme, XtNcallback, on_filter_select, + (XtPointer)XtNewString(pl->line)); + free_policy(pl); + } + free(items); + + curtime = time(NULL); + snprintf(line, sizeof(line), "%.25s", ctime(&curtime)); + XtVaSetValues(timeline, XtNlabel, line, NULL); + + position_near_center((Widget)clientData); + XtMapWidget((Widget)clientData); + state = WAIT_ACK; + return; + } /* switch */ +} + +void +on_filter_select(Widget w, XtPointer userData, XtPointer clientData) +{ + char *filter; + XawTextBlock block; + + filter = (char *)userData; + dprintf("filter: %s\n", filter); + block.ptr = filter; + block.firstPos = 0; + block.length = strlen(filter); + block.format = FMT8BIT; + TextReplace(filterText, 0, TextLength(filterText), &block); +} + +void +on_error_select(Widget w, XtPointer userData, XtPointer clientData) +{ + XawTextBlock block; + + errorcode = (char *)userData; + block.ptr = errorcode; + block.firstPos = 0; + block.length = strlen(errorcode); + block.format = FMT8BIT; + TextReplace(errorCodeText, 0, TextLength(errorCodeText), &block); +} + +void +on_error_entry_changed(Widget w, XEvent *event, String *params, + Cardinal *num_params) +{ + Arg args[1]; + + XtSetArg(args[0], XtNstring, &errorcode); + XtGetValues(w, args, 1); + dprintf("new error code %s\n", errorcode); +} + +void +on_denyone_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + Arg args[1]; + + XtSetArg(args[0], XtNstring, &errorcode); + XtGetValues(w, args, 1); + + dprintf("deny-now[%s]\n", errorcode); + printf("deny-now[%s]\n", errorcode); +} + +void +on_permitonce_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + printf("permit-now\n"); +} + +void +on_deny_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + Arg args[1]; + + XtSetArg(args[0], XtNstring, &errorcode); + XtGetValues(w, args, 1); + + dprintf("deny[%s]\n", errorcode); + printf("deny[%s]\n", errorcode); +} + +void +on_permit_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + printf("permit\n"); +} + +void +on_filter_entry_changed(Widget w, XEvent *event, String *params, + Cardinal *num_params) +{ + Arg args[1]; + char *name; + + XtSetArg(args[0], XtNstring, &name); + XtGetValues(filterText, args, 1); + + printf("%s\n", name); +} + +void +on_detachbutton_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + printf("detach\n"); +} + +static long +TextLength(Widget w) +{ + return XawTextSourceScan (XawTextGetSource (w), + (XawTextPosition) 0, + XawstAll, XawsdRight, 1, TRUE); +} + +static void +TextReplace(Widget w, int start, int end, XawTextBlock *block) +{ + Arg arg; + Widget source; + XawTextEditType edit_mode; + + source = XawTextGetSource (w); + XtSetArg (arg, XtNeditType, &edit_mode); + XtGetValues (source, &arg, ONE); + XtSetArg (arg, XtNeditType, XawtextEdit); + XtSetValues (source, &arg, ONE); + XawTextReplace (w, start, end, block); + XtSetArg (arg, XtNeditType, edit_mode); + XtSetValues (source, &arg, ONE); +} + +static void +TextAppend(Widget w, char *s, int len) +{ + long last, current; + XawTextBlock block; + + current = XawTextGetInsertionPoint (w); + last = TextLength (w); + block.ptr = s; + block.firstPos = 0; + block.length = len; + block.format = FMT8BIT; + TextReplace (w, last, last, &block); + if (current == last) + XawTextSetInsertionPoint (w, last + block.length); +} + + +void +on_reviewbutton_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + Widget shell, form, b; + + printf("review\n"); + + XtVaSetValues(reviewButton, XtNsensitive, FALSE, NULL); + shell = XtVaCreatePopupShell("Review", transientShellWidgetClass, + w, NULL, 0); + form = XtCreateManagedWidget("review-form", formWidgetClass, shell, + NULL, 0); + XtCreateManagedWidget("review-label", labelWidgetClass, form, + NULL, 0); + policyText = XtCreateManagedWidget("review-text", asciiTextWidgetClass, + form, NULL, 0); + b = XtCreateManagedWidget("done-button", commandWidgetClass, form, + NULL, 0); + XtAddCallback(b, XtNcallback, on_done_button, (XtPointer)shell); + XtRealizeWidget(shell); + XSetWMProtocols(XtDisplay(shell), XtWindow(shell), + &wm_delete_window, 1); + XtPopup(shell, XtGrabNone); + state = WAIT_POLICY; +} + +void +on_done_button(Widget w, XtPointer closure, XtPointer clientData) +{ + Widget shell = (Widget)closure; + + XtVaSetValues(reviewButton, XtNsensitive, TRUE, NULL); + XtPopdown(shell); + XtDestroyWidget(shell); +} + +static void +make_wizard(Widget w) +{ + Widget shell, top, form, ok, cancel; + + XtVaSetValues(wizardButton, XtNsensitive, FALSE, NULL); + + shell = XtVaCreatePopupShell("Systrace - Wizard", + transientShellWidgetClass, w, NULL, 0); + top = XtCreateManagedWidget("wizard-top", formWidgetClass, + shell, NULL, 0); + form = XtCreateManagedWidget("wizard-help-form", formWidgetClass, + top, NULL, 0); + XtCreateManagedWidget("wizard-help-label", labelWidgetClass, form, + NULL, 0); + XtCreateManagedWidget("wizard-help-text", labelWidgetClass, form, + NULL, 0); + form = XtCreateManagedWidget("wizard-form", formWidgetClass, top, + NULL, 0); + XtCreateManagedWidget("wizard-label", labelWidgetClass, form, + NULL, 0); + wizardText = XtCreateManagedWidget("wizard-text", listWidgetClass, + form, NULL, 0); + XawListChange(wizardText, templateList, + nTemplates, 0, True); + XawListHighlight(wizardText, nTemplates-1); + ok = XtCreateManagedWidget("wizard-ok-button", commandWidgetClass, + form, NULL, 0); + cancel = XtCreateManagedWidget("wizard-cancel-button", + commandWidgetClass, form, NULL, 0); + XtAddCallback(ok, XtNcallback, on_wizard_ok_clicked, (XtPointer)shell); + XtAddCallback(cancel, XtNcallback, on_wizard_cancel_clicked, + (XtPointer)shell); + XtRealizeWidget(shell); + XSetWMProtocols(XtDisplay(shell), XtWindow(shell), + &wm_delete_window, 1); + XtPopup(shell, XtGrabNone); +} + +void +on_wizard_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + + nTemplates = 0; + printf("templates\n"); + state = WAIT_WIZARD; +} + +static void +wizard_cleanup(Widget w) +{ + int i; + + for (i = 0; i < nTemplates; i++) { + XtFree(templateList[i]); + } + nTemplates = 0; + + XtVaSetValues(wizardButton, XtNsensitive, TRUE, NULL); + + XtPopdown(w); + XtDestroyWidget(w); +} + +void +on_wizard_ok_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + Widget shell = (Widget)closure; + XawListReturnStruct *lr; + + lr = XawListShowCurrent(wizardText); + if (lr != NULL && lr->list_index != XAW_LIST_NONE) { + printf("template %d\n", lr->list_index + 1); + } + wizard_cleanup(shell); +} + +void +on_wizard_cancel_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + Widget shell = (Widget)closure; + + wizard_cleanup(shell); +} + +void +on_killbutton_clicked(Widget w, XtPointer closure, XtPointer clientData) +{ + printf("kill\n"); +} diff --git a/app/xsystrace/callbacks.h b/app/xsystrace/callbacks.h new file mode 100644 index 000000000..813fab00c --- /dev/null +++ b/app/xsystrace/callbacks.h @@ -0,0 +1,51 @@ +/* $OpenBSD: callbacks.h,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ */ +/* + * Copyright (c) 2002 Matthieu Herrb + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +extern XtInputId inputId; + +extern void getInput(XtPointer, int *, XtInputId *); +extern void on_filter_select(Widget, XtPointer, XtPointer); +extern void on_error_select(Widget, XtPointer, XtPointer); +extern void on_error_entry_changed(Widget, XEvent *, String *, Cardinal *); +extern void on_denyone_clicked(Widget, XtPointer, XtPointer); +extern void on_permitonce_clicked(Widget, XtPointer, XtPointer); +extern void on_deny_clicked(Widget, XtPointer, XtPointer); +extern void on_permit_clicked(Widget, XtPointer, XtPointer); +extern void on_filter_entry_changed(Widget, XEvent *, String *, Cardinal *); +extern void on_detachbutton_clicked(Widget, XtPointer, XtPointer); +extern void on_reviewbutton_clicked(Widget, XtPointer, XtPointer); +extern void on_wizard_clicked(Widget, XtPointer, XtPointer); +extern void on_wizard_ok_clicked(Widget, XtPointer, XtPointer); +extern void on_wizard_cancel_clicked(Widget, XtPointer, XtPointer); +extern void on_killbutton_clicked(Widget, XtPointer, XtPointer); +extern void on_done_button(Widget, XtPointer, XtPointer); + + + diff --git a/app/xsystrace/interface.c b/app/xsystrace/interface.c new file mode 100644 index 000000000..daf5c78a3 --- /dev/null +++ b/app/xsystrace/interface.c @@ -0,0 +1,251 @@ +/* $OpenBSD: interface.c,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ */ +/* + * Copyright (c) 2002 Matthieu Herrb and Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <X11/Intrinsic.h> +#include <X11/Shell.h> +#include <X11/StringDefs.h> +#include <X11/Xatom.h> +#include <X11/Xaw/Form.h> +#include <X11/Xaw/Label.h> +#include <X11/Xaw/Command.h> +#include <X11/Xaw/AsciiText.h> +#include <X11/Xaw/Box.h> +#include <X11/Xaw/MenuButton.h> +#include <X11/Xaw/SmeBSB.h> +#include <X11/Xaw/SimpleMenu.h> +#include <time.h> + +#include "callbacks.h" +#include "interface.h" + +static String formNames[] = { + "title-form", + "processInfo-form", + "syscallInfo-form", + "status-form", + "errorCode-form", + "specialProc-form", + "buttons-form", +}; +#define NUM_FORMS (sizeof(formNames)/sizeof(char *)) + + +XtAppContext appContext; +Atom wm_delete_window; +Widget forms[NUM_FORMS], errorCodeMenu, errorCodeText, + filterText, filterMenu, filterPopup, + wizardButton, timeline, pName, + pId, policyName, syscallName, status, reviewButton; +volatile Boolean done; + +Widget +makeForm(Widget parent) +{ + Widget form; + Widget errorCodePopup, sme, w; + time_t when; + int i; + + form = XtVaCreateWidget("form", formWidgetClass, parent, NULL); + for (i = 0; i < NUM_FORMS; i++) { + forms[i] = XtCreateManagedWidget(formNames[i], + formWidgetClass, form, NULL, 0); + } + XtVaCreateManagedWidget("title-label", labelWidgetClass, + forms[0], NULL); + when = time(NULL); + timeline = XtVaCreateManagedWidget("date-label", labelWidgetClass, + forms[0], NULL); + XtVaCreateManagedWidget("processInfo-label", labelWidgetClass, + forms[1], NULL); + XtVaCreateManagedWidget("processName-label", labelWidgetClass, + forms[1], NULL); + pName = XtVaCreateManagedWidget("processName-value", labelWidgetClass, + forms[1], NULL); + XtVaCreateManagedWidget("processPid-label", labelWidgetClass, + forms[1], NULL); + pId = XtVaCreateManagedWidget("processPid-value", labelWidgetClass, + forms[1], NULL); + XtVaCreateManagedWidget("policyName-label", labelWidgetClass, + forms[1], NULL); + policyName = XtVaCreateManagedWidget("policyName-value", + labelWidgetClass, forms[1], NULL); + XtVaCreateManagedWidget("syscallInfo-label", labelWidgetClass, + forms[2], NULL); + syscallName = XtVaCreateManagedWidget("syscallInfo-value", + labelWidgetClass, forms[2], NULL); + XtVaCreateManagedWidget("filter-label", labelWidgetClass, + forms[2], NULL); + filterText = XtVaCreateManagedWidget("filter-text", + asciiTextWidgetClass, forms[2], XtNeditType, XawtextEdit, + NULL, 0); + filterMenu = XtCreateManagedWidget("filter-menu-button", + menuButtonWidgetClass, forms[2], NULL, 0); + filterPopup = XtCreatePopupShell("filter-menu", simpleMenuWidgetClass, + forms[2], NULL, 0); + + wizardButton = XtVaCreateManagedWidget("filter-button", + commandWidgetClass, forms[2], NULL, 0); + XtAddCallback(wizardButton, XtNcallback, on_wizard_clicked, NULL); + + XtVaCreateManagedWidget("status-label", labelWidgetClass, + forms[3], NULL); + status = XtVaCreateManagedWidget("status-value", labelWidgetClass, + forms[3], NULL); + XtVaCreateManagedWidget("errorCode-label", labelWidgetClass, + forms[4], NULL); + errorCodeText = XtVaCreateManagedWidget("errorCode-text", + asciiTextWidgetClass, forms[4], XtNeditType, XawtextEdit, + NULL, 0); + errorCodeMenu = XtCreateManagedWidget("errorCode-button", + menuButtonWidgetClass, forms[4], NULL, 0); + errorCodePopup = XtCreatePopupShell("menu", simpleMenuWidgetClass, + forms[4], NULL, 0); + sme = XtCreateManagedWidget("eperm", smeBSBObjectClass, + errorCodePopup, NULL, 0); + XtAddCallback(sme, XtNcallback, on_error_select, (XtPointer)"eperm"); + sme = XtCreateManagedWidget("enoent", smeBSBObjectClass, + errorCodePopup, NULL, 0); + XtAddCallback(sme, XtNcallback, on_error_select, (XtPointer)"enoent"); + sme = XtCreateManagedWidget("einval", smeBSBObjectClass, + errorCodePopup, NULL, 0); + XtAddCallback(sme, XtNcallback, on_error_select, (XtPointer)"einval"); + sme = XtCreateManagedWidget("enotdir", smeBSBObjectClass, + errorCodePopup, NULL, 0); + XtAddCallback(sme, XtNcallback, on_error_select, (XtPointer)"enotdir"); + sme = XtCreateManagedWidget("eio", smeBSBObjectClass, + errorCodePopup, NULL, 0); + XtAddCallback(sme, XtNcallback, on_error_select, (XtPointer)"eio"); + sme = XtCreateManagedWidget("enxio", smeBSBObjectClass, + errorCodePopup, NULL, 0); + XtAddCallback(sme, XtNcallback, on_error_select, (XtPointer)"enxio"); + sme = XtCreateManagedWidget("eaccess", smeBSBObjectClass, + errorCodePopup, NULL, 0); + XtAddCallback(sme, XtNcallback, on_error_select, (XtPointer)"eaccess"); + /* Initial value */ + on_error_select(errorCodeMenu, "eperm", NULL); + + XtVaCreateManagedWidget("specialProc-label", labelWidgetClass, + forms[5], NULL); + w = XtVaCreateManagedWidget("kill-button", commandWidgetClass, + forms[5], NULL); + XtAddCallback(w, XtNcallback, on_killbutton_clicked, NULL); + + reviewButton = XtVaCreateManagedWidget("review-button", + commandWidgetClass, forms[5], NULL); + XtAddCallback(reviewButton, XtNcallback, on_reviewbutton_clicked, + (XtPointer)parent); + + w = XtVaCreateManagedWidget("auto-button", commandWidgetClass, + forms[5], NULL); + XtAddCallback(w, XtNcallback, on_detachbutton_clicked, NULL); + + w = XtVaCreateManagedWidget("deny-button", commandWidgetClass, + forms[6], NULL); + XtAddCallback(w, XtNcallback, on_denyone_clicked, NULL); + w = XtVaCreateManagedWidget("allow-button", commandWidgetClass, + forms[6], NULL); + XtAddCallback(w, XtNcallback, on_permitonce_clicked, NULL); + + w = XtVaCreateManagedWidget("deny-all-button", commandWidgetClass, + forms[6], NULL); + XtAddCallback(w, XtNcallback, on_deny_clicked, NULL); + w = XtVaCreateManagedWidget("allow-all-button", commandWidgetClass, + forms[6], NULL); + XtAddCallback(w, XtNcallback, on_permit_clicked, NULL); + + XtManageChild(form); + + return form; +} + +/* + * Widget positionning + */ +static void +position_near(Widget shell, int x, int y) +{ + int max_x, max_y; + Dimension width, height, border; + int gravity; + + /* some of this is copied from CenterWidgetOnPoint in Xaw/TextPop.c */ + + XtVaGetValues(shell, XtNwidth, &width, XtNheight, &height, + XtNborderWidth, &border, NULL); + + width += 2 * border; + height += 2 * border; + + max_x = WidthOfScreen(XtScreen(shell)); + max_y = HeightOfScreen(XtScreen(shell)); + + /* set gravity hint based on position on screen */ + gravity = 1; + if (x > max_x/3) gravity += 1; + if (x > max_x*2/3) gravity += 1; + if (y > max_y/3) gravity += 3; + if (y > max_y*2/3) gravity += 3; + + max_x -= width; + max_y -= height; + + x -= ( (Position) width/2 ); + if (x < 0) x = 0; + if (x > max_x) x = max_x; + + y -= ( (Position) height/2 ); + if (y < 0) y = 0; + if ( y > max_y ) y = max_y; + + XtVaSetValues(shell, XtNx, (Position)x, XtNy, (Position)y, + XtNwinGravity, gravity, NULL); +} + +void +position_near_mouse(Widget shell) +{ + int x, y; + Window root, child; + int winx, winy; + unsigned int mask; + + XQueryPointer(XtDisplay(shell), XtWindow(shell), + &root, &child, &x, &y, &winx, &winy, &mask); + position_near(shell, x, y); +} + +void +position_near_center(Widget shell) +{ + position_near(shell, WidthOfScreen(XtScreen(shell))/2, + HeightOfScreen(XtScreen(shell))/2); +} + diff --git a/app/xsystrace/interface.h b/app/xsystrace/interface.h new file mode 100644 index 000000000..e6b1d7dfc --- /dev/null +++ b/app/xsystrace/interface.h @@ -0,0 +1,43 @@ +/* $OpenBSD: interface.h,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ */ +/* + * Copyright (c) 2002 Matthieu Herrb + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +extern XtAppContext appContext; +extern Atom wm_delete_window; +extern Widget forms[], errorCodeMenu, errorCodeText, filterText, + filterPopup, wizardButton, timeline, + pName, pId, policyName, syscallName, status, reviewButton; +extern volatile Boolean done; + +extern Widget makeForm(Widget); +extern void position_near_mouse(Widget); +void position_near_center(Widget); + + + diff --git a/app/xsystrace/main.c b/app/xsystrace/main.c new file mode 100644 index 000000000..697928616 --- /dev/null +++ b/app/xsystrace/main.c @@ -0,0 +1,211 @@ +/* $OpenBSD: main.c,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ */ +/* + * Copyright (c) 2002 Matthieu Herrb + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include <X11/Intrinsic.h> +#include <X11/StringDefs.h> +#include <X11/Shell.h> + +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <sys/param.h> + +#include <netinet/in.h> +#include <netinet/in_systm.h> + +#include <err.h> +#include <time.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +#include "callbacks.h" +#include "interface.h" +#include "policy.h" + +#define CRADLE_UI "cradle_ui" + +extern char *__progname; + +static void exitAction(Widget, XEvent *, String *, Cardinal *); + +static struct XsystraceResources { + Boolean center; + Boolean nearMouse; + int timeout_secs; + Dimension maxHeight; + Dimension maxWidth; +} nres; + +#define offset(field) XtOffsetOf(struct XsystraceResources, field) +static XtResource resources[] = { + { "center", "Center", XtRBoolean, sizeof (Boolean), + offset(center), XtRString, "false" }, + { "nearMouse", "NearMouse", XtRBoolean, sizeof (Boolean), + offset(nearMouse), XtRString, "false" }, + { "timeout", "Timeout", XtRInt, sizeof (int), + offset(timeout_secs), XtRInt, 0 }, + { "maxHeight", "Maximum", XtRDimension, sizeof (Dimension), + offset(maxHeight), XtRDimension, 0 }, + { "maxWidth", "Maximum", XtRDimension, sizeof (Dimension), + offset(maxWidth), XtRDimension, 0 }, +}; +#undef offset + +static XrmOptionDescRec optionList[] = { + { "-center", ".center", XrmoptionNoArg, (XPointer) "on" }, + { "-nearmouse", ".nearMouse", XrmoptionNoArg, (XPointer) "on" }, + { "-timeout", ".timeout", XrmoptionSepArg, (XPointer) NULL }, +}; + +static String fallbackResources[] = { + "*.allow*width: 100", + NULL, +}; + +static XtActionsRec actionsList[] = { + { "filter-changed", on_filter_entry_changed }, + { "errorcode-changed", on_error_entry_changed }, + { "exit", exitAction}, +}; + +static String topTranslations = +"<ClientMessage>WM_PROTOCOLS: exit(1)\n"; + +/* + * Handle ICCCM delete_window + */ + +static void +exitAction(Widget w, XEvent *event, String *params, Cardinal *numParams) +{ + int exitStatus = 0; + + if (event->type == ClientMessage + && event->xclient.data.l[0] != wm_delete_window) + return; + if (*numParams == 1) { + exitStatus = atoi(params[0]); + } + exit(exitStatus); +} + +/* + * Handle timeout + */ +static void +timeOut(XtPointer clientData, XtIntervalId *iid) +{ + exit(0); +} + +int +main(int argc, char *argv[]) +{ + Widget top; + + /* Set up required parameters */ + parameters(); + + XtSetLanguageProc(NULL, (XtLanguageProc)NULL, NULL); + top = XtAppInitialize(&appContext, "Xsystrace", + optionList, XtNumber(optionList), + &argc, argv, fallbackResources, NULL, 0); + XtGetApplicationResources(top, (XtPointer)&nres, resources, + XtNumber(resources), NULL, 0); + + wm_delete_window = XInternAtom(XtDisplay(top), "WM_DELETE_WINDOW", + False); + XtAppAddActions(appContext, actionsList, XtNumber(actionsList)); + XtOverrideTranslations(top, XtParseTranslationTable(topTranslations)); + + /* Create the form */ + if (makeForm(top) == NULL) { + fprintf(stderr, "%s: unable to create form\n", __progname); + exit(1); + } + + XtSetMappedWhenManaged(top, FALSE); + + XtRealizeWidget(top); + /* do WM_DELETE_WINDOW */ + XSetWMProtocols(XtDisplay(top), XtWindow(top), &wm_delete_window, 1); + + /* Register timeout */ + if (nres.timeout_secs) + XtAppAddTimeOut(appContext, 1000*nres.timeout_secs, + timeOut, NULL); + + if (argc == 2 && strcmp(argv[1], "-C") == 0) { + struct sockaddr_un sun; + int s; + char path[MAXPATHLEN]; + + snprintf(path, sizeof(path), "/tmp/systrace-%d/%s", + getuid(), CRADLE_UI); + + s = socket(AF_UNIX, SOCK_STREAM, 0); + if (s == -1) + err(1, "socket()"); + + memset(&sun, 0, sizeof(sun)); + sun.sun_family = AF_UNIX; + + if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) > + sizeof(sun.sun_path)) + errx(1, "Path too long: %s", path); + + if (connect(s, (struct sockaddr *)&sun, sizeof(sun)) == -1) + err(1, "connect()"); + + if (dup2(s, fileno(stdin)) == -1) + err(1, "dup2"); + if (dup2(s, fileno(stdout)) == -1) + err(1, "dup2"); + + + } + + setvbuf(stdin, NULL, _IOLBF, 0); + setvbuf(stdout, NULL, _IOLBF, 0); + + inputId = XtAppAddInput(appContext, fileno(stdin), + (XtPointer)XtInputReadMask, getInput, top); + + done = False; + while (!done) { + XEvent event; + + XtAppNextEvent(appContext, &event); + XtDispatchEvent(&event); + + } + + exit(0); +} diff --git a/app/xsystrace/pixmaps/Imakefile b/app/xsystrace/pixmaps/Imakefile new file mode 100644 index 000000000..636b4a406 --- /dev/null +++ b/app/xsystrace/pixmaps/Imakefile @@ -0,0 +1,11 @@ +XCOMM $OpenBSD: Imakefile,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ + +PIXMAPS= deny-always.xpm \ + deny.xpm \ + logo.xpm \ + permit-always.xpm \ + permit.xpm \ + skull.xpm + +InstallMultipleFlags($(PIXMAPS),$(INCDIR)/X11/pixmaps,$(INSTINCFLAGS)) + diff --git a/app/xsystrace/pixmaps/deny-always.xpm b/app/xsystrace/pixmaps/deny-always.xpm new file mode 100644 index 000000000..4d4742429 --- /dev/null +++ b/app/xsystrace/pixmaps/deny-always.xpm @@ -0,0 +1,151 @@ +/* XPM */ +static char * deny_always_xpm[] = { +"50 50 98 2", +" c None", +". c #E81212", +"+ c #E71212", +"@ c #E61212", +"# c #E21111", +"$ c #E51111", +"% c #9D0C0C", +"& c #9E0C0C", +"* c #DD1111", +"= c #E31111", +"- c #9F0C0C", +"; c #E01111", +"> c #940B0B", +", c #760909", +"' c #B90E0E", +") c #DF1111", +"! c #B80E0E", +"~ c #4F0606", +"{ c #5B0707", +"] c #AF0D0D", +"^ c #E11111", +"/ c #B70E0E", +"( c #510606", +"_ c #230303", +": c #BB0E0E", +"< c #CF1010", +"[ c #950B0B", +"} c #450505", +"| c #1C0202", +"1 c #BC0E0E", +"2 c #C70F0F", +"3 c #8E0B0B", +"4 c #540606", +"5 c #2C0303", +"6 c #D91111", +"7 c #D71010", +"8 c #A90D0D", +"9 c #5A0707", +"0 c #210202", +"a c #190202", +"b c #430505", +"c c #D01010", +"d c #730909", +"e c #320404", +"f c #320303", +"g c #230202", +"h c #5E0606", +"i c #C60F0F", +"j c #D31010", +"k c #D91010", +"l c #E71111", +"m c #730808", +"n c #A70C0C", +"o c #C10F0F", +"p c #500606", +"q c #240303", +"r c #B60D0D", +"s c #C80F0F", +"t c #590606", +"u c #1D0202", +"v c #6C0808", +"w c #1F0202", +"x c #E41111", +"y c #E41212", +"z c #A60C0C", +"A c #3E0505", +"B c #D11010", +"C c #600707", +"D c #A00C0C", +"E c #350404", +"F c #E61111", +"G c #1E0202", +"H c #CB0F0F", +"I c #880A0A", +"J c #DB1111", +"K c #910B0B", +"L c #CD0F0F", +"M c #4C0505", +"N c #CD1010", +"O c #A50C0C", +"P c #470505", +"Q c #CC0F0F", +"R c #D81010", +"S c #B10D0D", +"T c #560606", +"U c #C40F0F", +"V c #CE1010", +"W c #3B0404", +"X c #A30C0C", +"Y c #670707", +"Z c #5F0707", +"` c #4E0505", +" . c #AB0D0D", +".. c #840A0A", +"+. c #6B0808", +"@. c #C50F0F", +"#. c #620707", +"$. c #410404", +" ", +" ", +" ", +" ", +" ", +" . . . . . . ", +" . . . . . . . . ", +" . . . . . . . . . ", +" . + . . . . . . . . . . . . . . ", +" @ # $ . . . . . . . . . . . . . . . . ", +" % & * . . . . . . . . . . . . . . . . + = ", +" - ; . . . . . . . . . . . . . . . . . . # > ", +" , ' ) . . . . . . . . . . . . . . . . . . . + ! ~ ", +" { ] ) . . . . . . . . . . . . . . . . . . ^ / ( _ ", +" : + . . . . . . . . . . . . . . . $ < [ } | ", +" 1 + . . . . . . . . . . . . # 2 3 4 5 ", +" 6 . . . . . . . . . + 7 8 9 0 a b ", +" . . . . . . . . . . . c d e f g ", +" . . . . . . . . . . . . < h [ i . ", +" . . . . . . . . . . . . . + j . . . . ", +" . . . . . . . $ k ^ . . . . . l . . . . . . . . . . . ", +" . . . . . . + ! m n ^ . . . . . . . . . . . . . . . . . . . ", +" . . . . . . + o p q r + . . . . . . . . . . . . . . . . . . . + = ", +" . . . . . . . s t u < . . . . . . . . . . . . . . . . . . . . . . # > ", +" . . . . . . 6 v w x . . . . . . . . . . . . . . . . . . . . . . . . + ! ~ ", +" . . . . . . y z A = x . . . . . . . . . . . . . . . . . . . . . . . ^ / ( _ ", +" . . . . . . B C ; + . . . . . . . . . . . . . . . . . . . . $ < [ } | ", +" . . . . . . D E @ F . . . . . + . . . . . . . . . . . . # 2 3 4 5 ", +" . . . . . * } 1 F . . . . y = . . . . . . . . + 7 8 9 0 a b ", +" . . . . + : G = . . . . @ H ) . . . . . . . c d e | a ", +" . . . . * I ; J . . . ; K L . . . . . . . < M ", +" N # 6 O P Q R l ; S T U . . . . . . . + V ", +" d 9 W . X Y Z ` .. $ k ^ . . . . . l . ", +" a . . ..+.% . + ! m n ^ . . . . . . ", +" . . . . . . + o p q r + . . . . . . ", +" . . . . . . . s t u < . . . . . . . ", +" . . . . . . 6 v w x . . . . . . ", +" . . . . . . y z A = x . . . . . . ", +" . . . . . . B C ; + . . . . . . ", +" . . . . . . D E @ F . . . . . . ", +" . . . . . * } 1 F . . . . y ", +" . . . . + : G = . . . . @ : ", +" . . . . * I ; J . . . ; K ", +" N # 6 O P @.R l ; S T ", +" d 9 W #.Z $. ", +" a a ", +" ", +" ", +" ", +" "}; diff --git a/app/xsystrace/pixmaps/deny.xpm b/app/xsystrace/pixmaps/deny.xpm new file mode 100644 index 000000000..c8b856a98 --- /dev/null +++ b/app/xsystrace/pixmaps/deny.xpm @@ -0,0 +1,121 @@ +/* XPM */ +static char * deny[] = { +"50 50 68 1", +" c None", +". c #E81212", +"+ c #DF1111", +"@ c #D41010", +"# c #E71111", +"$ c #2D0303", +"% c #A10C0C", +"& c #E41111", +"* c #E01111", +"= c #8D0B0B", +"- c #DB1010", +"; c #C30F0F", +"> c #320303", +", c #660808", +"' c #E61111", +") c #DE1111", +"! c #780909", +"~ c #210202", +"{ c #410505", +"] c #830A0A", +"^ c #E31111", +"/ c #840A0A", +"( c #290303", +"_ c #8D0A0A", +": c #CC0F0F", +"< c #630707", +"[ c #190202", +"} c #A80D0D", +"| c #E51111", +"1 c #D81010", +"2 c #9B0C0C", +"3 c #480505", +"4 c #A40C0C", +"5 c #DC1111", +"6 c #B70E0E", +"7 c #4A0505", +"8 c #C90F0F", +"9 c #DD1111", +"0 c #E21111", +"a c #B30D0D", +"b c #590707", +"c c #A70D0D", +"d c #340404", +"e c #640707", +"f c #A20C0C", +"g c #9A0C0C", +"h c #9A0B0B", +"i c #A60C0C", +"j c #C10F0F", +"k c #D31010", +"l c #390404", +"m c #810A0A", +"n c #BE0E0E", +"o c #D21010", +"p c #660707", +"q c #B10D0D", +"r c #BC0E0E", +"s c #DB1111", +"t c #960B0B", +"u c #770909", +"v c #CB0F0F", +"w c #5E0707", +"x c #C50F0F", +"y c #C80F0F", +"z c #580606", +"A c #E11111", +"B c #7A0909", +"C c #750909", +" ", +" ", +" ", +" ", +" ", +" ", +" ...... ", +" ......... ", +" .......... ", +" ........... ", +" ............. ...... ", +" .+............ ........ ", +" .@#........... ........... ", +" $%&.......... ............* ", +" =-........... ..............;> ", +" ,;'.......... ...............)!~ ", +" {]^.........................+/( ", +" _&......................':<~[ ", +" }|...................'123[[ ", +" 4|...............#56/7~[ ", +" 8.............#923[[[] ", +" ..............0ab~[[ ", +" ..............'cd[[ ", +" ................+e ", +" ................... ", +" .........#'.......#. ", +" .........|%f|........ ", +" ........|%$$%|........ ", +" ........|g$[ h'......#. ", +" ........#i$[ j......... ", +" ........kl[ *........ ", +" ........|m[ .#........ ", +" ........n$ o.......#. ", +" ........*p[ *........ ", +" ........q$ .|........ ", +" .......*b[ r#......s ", +" .......j~ 9......| ", +" ......|t[ .'.....^u ", +" .....vw x.....yz ", +" xAAxB$ r&#&yC$ ", +" uuz$ zuuz$ ", +" [[ [[[ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/app/xsystrace/pixmaps/logo.xpm b/app/xsystrace/pixmaps/logo.xpm new file mode 100644 index 000000000..37ba3b38a --- /dev/null +++ b/app/xsystrace/pixmaps/logo.xpm @@ -0,0 +1,1112 @@ +/* XPM */ +static char * logo_xpm[] = { +"209 28 1081 2", +" c None", +". c #D4D7D4", +"+ c #D3D6D3", +"@ c #D2D5D2", +"# c #D1D4D1", +"$ c #D0D3D0", +"% c #CFD2CF", +"& c #B8BBCE", +"* c #8B8DCE", +"= c #898BCC", +"- c #888ACB", +"; c #C9CCC9", +"> c #C8CBC8", +", c #CACDCA", +"' c #CCCFCC", +") c #CFD1CF", +"! c #A2A4C0", +"~ c #8A8CB6", +"{ c #898BB5", +"] c #CBCECB", +"^ c #CDD0CD", +"/ c #8C8ECF", +"( c #1C1DCE", +"_ c #0606CE", +": c #5658C5", +"< c #A8ABBE", +"[ c #C0C2C0", +"} c #C3C6C3", +"| c #BBBED1", +"1 c #8D8FCE", +"2 c #8D8FC3", +"3 c #04048A", +"4 c #040489", +"5 c #B4B6C6", +"6 c #C7CAC7", +"7 c #4849A7", +"8 c #04047D", +"9 c #8A8CBC", +"0 c #CED1CE", +"a c #7677B2", +"b c #030363", +"c c #030362", +"d c #B5B7C4", +"e c #2F3084", +"f c #03035A", +"g c #030358", +"h c #8183AC", +"i c #41428D", +"j c #020255", +"k c #8284AD", +"l c #C5C7C5", +"m c #BBBDC8", +"n c #8C8EB1", +"o c #8B8CAE", +"p c #01012D", +"q c #46477C", +"r c #1B1BCC", +"s c #4242C7", +"t c #3F40C5", +"u c #2B2CC6", +"v c #1819CA", +"w c #9D9FB3", +"x c #B6B8B6", +"y c #BCBFBC", +"z c #C4C6C4", +"A c #A5A7D0", +"B c #1C1DC9", +"C c #4849CA", +"D c #CACCCA", +"E c #8C8EC1", +"F c #2E2E9D", +"G c #BBBEBB", +"H c #BEC1BE", +"I c #4748A6", +"J c #8688B8", +"K c #C2C5C2", +"L c #31318F", +"M c #030368", +"N c #C6C9C6", +"O c #595A9D", +"P c #03035B", +"Q c #40418D", +"R c #3E3F8A", +"S c #9E9FAD", +"T c #3C3D88", +"U c #797BA4", +"V c #BABCBA", +"W c #BFC1BF", +"X c #A4A6BE", +"Y c #191953", +"Z c #464780", +"` c #8789AA", +" . c #44457A", +".. c #C5C8C5", +"+. c #8082C3", +"@. c #B4B6B4", +"#. c #AAACAA", +"$. c #A1A3A1", +"%. c #9B9D9B", +"&. c #878A9D", +"*. c #1616C7", +"=. c #494BB8", +"-. c #A5A7A5", +";. c #AFB1AF", +">. c #B9BCB9", +",. c #8C8ECD", +"'. c #0606C8", +"). c #4647C8", +"!. c #C0C3C0", +"~. c #8A8CBF", +"{. c #040488", +"]. c #6162A6", +"^. c #A9ACA9", +"/. c #AEB1AE", +"(. c #B6B9B6", +"_. c #4647A4", +":. c #8082B2", +"<. c #B8BBB8", +"[. c #03036A", +"}. c #C1C4C1", +"|. c #40418F", +"1. c #66679E", +"2. c #ACAEAC", +"3. c #A3A6A3", +"4. c #9EA19E", +"5. c #9DA09D", +"6. c #A6A8A6", +"7. c #ADB0AD", +"8. c #B5B7B5", +"9. c #8B8DB0", +"0. c #020235", +"a. c #43447D", +"b. c #8C8ECE", +"c. c #2F30CA", +"d. c #B3B6B3", +"e. c #999B99", +"f. c #919391", +"g. c #8C8E8C", +"h. c #8A8C8A", +"i. c #6D6E98", +"j. c #1515C6", +"k. c #969896", +"l. c #888ACA", +"m. c #4344C4", +"n. c #B1B4B1", +"o. c #888ABD", +"p. c #171893", +"q. c #040487", +"r. c #040486", +"s. c #848596", +"t. c #9A9C9A", +"u. c #4445A3", +"v. c #797AAC", +"w. c #030369", +"x. c #B0B2B0", +"y. c #B2B5B2", +"z. c #3D3D8B", +"A. c #70719C", +"B. c #8D8F8D", +"C. c #939593", +"D. c #ACAFAC", +"E. c #8789AC", +"F. c #40417A", +"G. c #B1B3B1", +"H. c #B7BAB7", +"I. c #8A8CCD", +"J. c #4142C6", +"K. c #A8ABA8", +"L. c #989B98", +"M. c #868886", +"N. c #858685", +"O. c #858785", +"P. c #878987", +"Q. c #5C5E9F", +"R. c #5E5EA0", +"S. c #8E918E", +"T. c #87889D", +"U. c #3A3BBF", +"V. c #3F3FC4", +"W. c #494ACE", +"X. c #4849CE", +"Y. c #3132CC", +"Z. c #3030CB", +"`. c #6E70C7", +" + c #7072C7", +".+ c #3030C7", +"++ c #1919C4", +"@+ c #3B3CBD", +"#+ c #7E80A9", +"$+ c #A2A5A2", +"%+ c #8688B1", +"&+ c #4041BF", +"*+ c #9697C0", +"=+ c #5A5BC3", +"-+ c #0606BE", +";+ c #1B1BBE", +">+ c #8485C3", +",+ c #9C9EC5", +"'+ c #4647C0", +")+ c #0505B6", +"!+ c #0505B5", +"~+ c #0505B3", +"{+ c #2F2FB9", +"]+ c #6D6EBE", +"^+ c #7476C3", +"/+ c #1B1BAE", +"(+ c #0505A7", +"_+ c #0505A6", +":+ c #2F30B1", +"<+ c #989ABF", +"[+ c #B6B8C9", +"}+ c #5D5FBA", +"|+ c #1B1BA5", +"1+ c #04049A", +"2+ c #040499", +"3+ c #4344AF", +"4+ c #989ABD", +"5+ c #8688BC", +"6+ c #3B3C9F", +"7+ c #444598", +"8+ c #1F208D", +"9+ c #949694", +"0+ c #4243A0", +"a+ c #04047C", +"b+ c #7374A6", +"c+ c #A4A6A4", +"d+ c #9295B4", +"e+ c #2D2E92", +"f+ c #030374", +"g+ c #030373", +"h+ c #181982", +"i+ c #6D6FAC", +"j+ c #9B9DBB", +"k+ c #434499", +"l+ c #3A3B8D", +"m+ c #5B5C97", +"n+ c #9FA19F", +"o+ c #3B3B8C", +"p+ c #3C3D8D", +"q+ c #8789A5", +"r+ c #3A3B8A", +"s+ c #15156E", +"t+ c #242478", +"u+ c #30317D", +"v+ c #656783", +"w+ c #7D7F7D", +"x+ c #494A80", +"y+ c #30307A", +"z+ c #737590", +"A+ c #A7A9A7", +"B+ c #BBBDBB", +"C+ c #6D6FA2", +"D+ c #181865", +"E+ c #02024B", +"F+ c #02024A", +"G+ c #2D2D76", +"H+ c #989AB3", +"I+ c #B5B8C4", +"J+ c #5C5E96", +"K+ c #18195C", +"L+ c #02023E", +"M+ c #02023D", +"N+ c #171858", +"O+ c #57598F", +"P+ c #ACAEB9", +"Q+ c #6E6F9D", +"R+ c #2C2D69", +"S+ c #020234", +"T+ c #15154E", +"U+ c #393973", +"V+ c #7D7F96", +"W+ c #82839B", +"X+ c #3A3B72", +"Y+ c #62648E", +"Z+ c #9799AE", +"`+ c #2C2D60", +" @ c #010124", +".@ c #010123", +"+@ c #171743", +"@@ c #6C6E95", +"#@ c #454673", +"$@ c #454672", +"%@ c #5A5C84", +"&@ c #171739", +"*@ c #010113", +"=@ c #171737", +"-@ c #6C6E91", +";@ c #B5B8CB", +">@ c #5B5CB4", +",@ c #8F918F", +"'@ c #818381", +")@ c #898B89", +"!@ c #1717C8", +"~@ c #8D8FB8", +"{@ c #7374CB", +"]@ c #4647CC", +"^@ c #8284C5", +"/@ c #3F40C3", +"(@ c #4242C5", +"_@ c #0606C7", +":@ c #0606C5", +"<@ c #6162A2", +"[@ c #929492", +"}@ c #6A6BAA", +"|@ c #0606C1", +"1@ c #2C2DBD", +"2@ c #0606BF", +"3@ c #0505BC", +"4@ c #6768BA", +"5@ c #7D7FBB", +"6@ c #0505B8", +"7@ c #0505B7", +"8@ c #0505B4", +"9@ c #0505B1", +"0@ c #6465B4", +"a@ c #1B1BB0", +"b@ c #0505A9", +"c@ c #0505A8", +"d@ c #0505A5", +"e@ c #0505A3", +"f@ c #787AB2", +"g@ c #ABADBE", +"h@ c #1A1AA5", +"i@ c #05059D", +"j@ c #05059C", +"k@ c #040498", +"l@ c #040497", +"m@ c #787AB0", +"n@ c #8486BA", +"o@ c #38399C", +"p@ c #1E1E8D", +"q@ c #040484", +"r@ c #434487", +"s@ c #989A98", +"t@ c #3F409E", +"u@ c #6E70A0", +"v@ c #959795", +"w@ c #7072A2", +"x@ c #030376", +"y@ c #030372", +"z@ c #030371", +"A@ c #030370", +"B@ c #3D3E94", +"C@ c #7D7EAC", +"D@ c #030367", +"E@ c #313285", +"F@ c #8E908E", +"G@ c #030361", +"H@ c #A7AAA7", +"I@ c #70719D", +"J@ c #03035E", +"K@ c #03035C", +"L@ c #030359", +"M@ c #4E507A", +"N@ c #747674", +"O@ c #2B2B76", +"P@ c #020254", +"Q@ c #61638C", +"R@ c #161665", +"S@ c #02024E", +"T@ c #02024C", +"U@ c #020249", +"V@ c #020248", +"W@ c #7779A0", +"X@ c #ABADB9", +"Y@ c #18185C", +"Z@ c #020241", +"`@ c #020240", +" # c #02023C", +".# c #02023B", +"+# c #282968", +"@# c #3F407A", +"## c #010133", +"$# c #010131", +"%# c #5F6183", +"&# c #66678A", +"*# c #39396F", +"=# c #7A7B9C", +"-# c #010126", +";# c #010125", +"># c #010121", +",# c #010120", +"'# c #3C3D6D", +")# c #010119", +"!# c #010118", +"~# c #42436E", +"{# c #010116", +"]# c #010115", +"^# c #000011", +"/# c #646588", +"(# c #5859C7", +"_# c #2E2FB4", +":# c #57589A", +"<# c #77798D", +"[# c #939693", +"}# c #5051BE", +"|# c #191ACA", +"1# c #6264BB", +"2# c #5B5CB3", +"3# c #0606CD", +"4# c #0606CC", +"5# c #9092A6", +"6# c #8688B2", +"7# c #4F50BB", +"8# c #2526BB", +"9# c #5C5D9C", +"0# c #727387", +"a# c #6061A0", +"b# c #0606C0", +"c# c #3B3CB9", +"d# c #8182AA", +"e# c #0505B9", +"f# c #5151B7", +"g# c #999CAE", +"h# c #9093A5", +"i# c #3738AF", +"j# c #1616B0", +"k# c #5556B6", +"l# c #0505AA", +"m# c #191AAD", +"n# c #8F92B7", +"o# c #9597A8", +"p# c #393AAA", +"q# c #1616A5", +"r# c #ABADAB", +"s# c #2B2CA9", +"t# c #05059E", +"u# c #4041AD", +"v# c #5A5BA4", +"w# c #040495", +"x# c #8082A5", +"y# c #37389B", +"z# c #656777", +"A# c #6B6D7C", +"B# c #8B8D8B", +"C# c #3D3D9B", +"D# c #6A6C9C", +"E# c #747595", +"F# c #030377", +"G# c #50519D", +"H# c #9B9EAC", +"I# c #5B5D9A", +"J# c #14147C", +"K# c #03036F", +"L# c #494A94", +"M# c #9799A8", +"N# c #7374A2", +"O# c #5D5E8C", +"P# c #646584", +"Q# c #7E807E", +"R# c #8C8E9B", +"S# c #686994", +"T# c #232478", +"U# c #3A3B7D", +"V# c #4D4E79", +"W# c #5F606E", +"X# c #6C6E6C", +"Y# c #292A74", +"Z# c #60618B", +"`# c #A0A2A0", +" $ c #4C4E8C", +".$ c #8B8DA8", +"+$ c #9496A3", +"@$ c #38387C", +"#$ c #020247", +"$$ c #13145C", +"%$ c #3D3E7E", +"&$ c #2A2B6F", +"*$ c #8D8FA8", +"=$ c #5A5B8A", +"-$ c #020239", +";$ c #7B7D95", +">$ c #A2A4A2", +",$ c #4C4D81", +"'$ c #21225E", +")$ c #5A5B7E", +"!$ c #71737E", +"~$ c #808280", +"{$ c #5D5E80", +"]$ c #36376C", +"^$ c #84869C", +"/$ c #010127", +"($ c #515281", +"_$ c #9C9DA8", +":$ c #5B5C83", +"<$ c #12133D", +"[$ c #01011F", +"}$ c #494A76", +"|$ c #151538", +"1$ c #616286", +"2$ c #90929B", +"3$ c #363760", +"4$ c #24244A", +"5$ c #1617C8", +"6$ c #4647B4", +"7$ c #888A9E", +"8$ c #9D9F9D", +"9$ c #8F90A5", +"0$ c #A0A2B5", +"a$ c #4E50A7", +"b$ c #4F50A7", +"c$ c #7F8195", +"d$ c #6B6DAC", +"e$ c #3232B3", +"f$ c #7C7E7C", +"g$ c #767776", +"h$ c #585998", +"i$ c #75769E", +"j$ c #2626B4", +"k$ c #2728B4", +"l$ c #0505AF", +"m$ c #0505AB", +"n$ c #898BB1", +"o$ c #909290", +"p$ c #1414A4", +"q$ c #2324A3", +"r$ c #73769A", +"s$ c #797A9F", +"t$ c #2929A6", +"u$ c #4E4F98", +"v$ c #42439C", +"w$ c #37389A", +"x$ c #727472", +"y$ c #3B3C7F", +"z$ c #040483", +"A$ c #1C1D88", +"B$ c #828482", +"C$ c #3A3B98", +"D$ c #666899", +"E$ c #31328D", +"F$ c #4A4A98", +"G$ c #6F7190", +"H$ c #03036D", +"I$ c #737573", +"J$ c #7B7D7B", +"K$ c #30317E", +"L$ c #50517C", +"M$ c #6B6C6B", +"N$ c #656665", +"O$ c #6A6B6A", +"P$ c #292973", +"Q$ c #5E5F89", +"R$ c #02024F", +"S$ c #82849F", +"T$ c #9C9E9C", +"U$ c #11125A", +"V$ c #212168", +"W$ c #74758F", +"X$ c #38397A", +"Y$ c #999BA7", +"Z$ c #30306D", +"`$ c #5D5D82", +" % c #65668A", +".% c #2E2F68", +"+% c #7A7B7A", +"@% c #757675", +"#% c #56577A", +"$% c #01012C", +"%% c #333369", +"&% c #36376B", +"*% c #4B4D7B", +"=% c #6F7186", +"-% c #01011E", +";% c #5C5D82", +">% c #7C7E88", +",% c #000010", +"'% c #6E709A", +")% c #3D3EAC", +"!% c #2121BC", +"~% c #2829C4", +"{% c #5A5BB2", +"]% c #5F60B8", +"^% c #3D3DC2", +"/% c #1415C6", +"(% c #4B4CA4", +"_% c #797B79", +":% c #787A78", +"<% c #8A8B8A", +"[% c #6566A6", +"}% c #0606C6", +"|% c #3031B1", +"1% c #777977", +"2% c #6F706F", +"3% c #717271", +"4% c #545594", +"5% c #3233B0", +"6% c #838583", +"7% c #64658D", +"8% c #0505B0", +"9% c #848684", +"0% c #707298", +"a% c #2828AC", +"b% c #42439F", +"c% c #4647A3", +"d% c #65669E", +"e% c #606299", +"f% c #5A5C93", +"g% c #56578F", +"h% c #54558C", +"i% c #53548B", +"j% c #121296", +"k% c #888A88", +"l% c #8485B9", +"m% c #38389B", +"n% c #6C6D6C", +"o% c #1B1B87", +"p% c #040482", +"q% c #47498A", +"r% c #979997", +"s% c #373795", +"t% c #636496", +"u% c #121281", +"v% c #777998", +"w% c #111179", +"x% c #696B89", +"y% c #767876", +"z% c #6D6F6D", +"A% c #2E2E7C", +"B% c #686A68", +"C% c #292974", +"D% c #5C5D87", +"E% c #71728E", +"F% c #232470", +"G% c #747581", +"H% c #1D1D5D", +"I% c #535378", +"J% c #5C5D81", +"K% c #2B2C65", +"L% c #707170", +"M% c #535376", +"N% c #303167", +"O% c #111243", +"P% c #787A90", +"Q% c #0F103A", +"R% c #6B6D82", +"S% c #808180", +"T% c #7F817F", +"U% c #5A5C9D", +"V% c #2526C1", +"W% c #2627C2", +"X% c #6A6CAD", +"Y% c #5B5C9E", +"Z% c #1112C2", +"`% c #3435A2", +" & c #67687C", +".& c #6364A4", +"+& c #3030B1", +"@& c #545593", +"#& c #3131AE", +"$& c #777AA1", +"%& c #5556A7", +"&& c #3333AB", +"*& c #3031A8", +"=& c #0505AE", +"-& c #575993", +";& c #3435A7", +">& c #3233A0", +",& c #040496", +"'& c #040494", +")& c #7B7C7B", +"!& c #38399B", +"~& c #040481", +"{& c #040480", +"]& c #777989", +"^& c #333491", +"/& c #5E6091", +"(& c #030378", +"_& c #2E2E85", +":& c #575887", +"<& c #6E706E", +"[& c #030360", +"}& c #2C2D7A", +"|& c #4E4F7A", +"1& c #2A2B75", +"2& c #5B5C85", +"3& c #5C5D86", +"4& c #313278", +"5& c #8B8C99", +"6& c #68698F", +"7& c #333472", +"8& c #303170", +"9& c #101151", +"0& c #02023A", +"a& c #4C4D72", +"b& c #55577A", +"c& c #2A2B64", +"d& c #717371", +"e& c #535476", +"f& c #2F3066", +"g& c #010128", +"h& c #2D2E5D", +"i& c #595A79", +"j& c #010117", +"k& c #00000F", +"l& c #8587C8", +"m& c #77778D", +"n& c #1414C5", +"o& c #6D6F99", +"p& c #7C7E92", +"q& c #7B7C91", +"r& c #707286", +"s& c #393AA8", +"t& c #0606CB", +"u& c #505292", +"v& c #6263A3", +"w& c #3131B1", +"x& c #575897", +"y& c #4748AD", +"z& c #0505B2", +"A& c #1F1FA8", +"B& c #50518C", +"C& c #3131A4", +"D& c #22229E", +"E& c #2D2D99", +"F& c #292995", +"G& c #262792", +"H& c #262691", +"I& c #262791", +"J& c #272791", +"K& c #272891", +"L& c #272890", +"M& c #49498C", +"N& c #20218B", +"O& c #30318E", +"P& c #595A8C", +"Q& c #313288", +"R& c #595A88", +"S& c #51527D", +"T& c #2C2D77", +"U& c #020253", +"V& c #5B5D86", +"W& c #575982", +"X& c #2E2E75", +"Y& c #696B91", +"Z& c #131357", +"`& c #02023F", +" * c #0F1050", +".* c #0F0F4E", +"+* c #49496E", +"@* c #515376", +"#* c #565779", +"$* c #303160", +"%* c #01011D", +"&* c #A8AABD", +"** c #3030B5", +"=* c #595A9C", +"-* c #3536BA", +";* c #3F40AE", +">* c #4B4CA3", +",* c #2F30B5", +"'* c #4C4D8F", +")* c #3333A0", +"!* c #1111BF", +"~* c #0606CA", +"{* c #1212BF", +"]* c #6062A1", +"^* c #3232B1", +"/* c #5A5B9A", +"(* c #3232AE", +"_* c #787AA1", +":* c #4849AE", +"<* c #6364A0", +"[* c #6A6C93", +"}* c #676867", +"|* c #676967", +"1* c #4B4C87", +"2* c #2E2FA1", +"3* c #8E90A2", +"4* c #8082A6", +"5* c #3737A5", +"6* c #4C4C96", +"7* c #393A9B", +"8* c #21228D", +"9* c #04047F", +"0* c #3D3E8E", +"a* c #2E2E8B", +"b* c #535485", +"c* c #737584", +"d* c #242484", +"e* c #03036C", +"f* c #5C5E8C", +"g* c #555681", +"h* c #2E2F79", +"i* c #5D5D87", +"j* c #555780", +"k* c #2C2C73", +"l* c #8E909D", +"m* c #81829D", +"n* c #141459", +"o* c #242467", +"p* c #626389", +"q* c #5C5D83", +"r* c #292966", +"s* c #46476C", +"t* c #4F5174", +"u* c #595B7D", +"v* c #303066", +"w* c #6F717C", +"x* c #222352", +"y* c #5D5D7D", +"z* c #4849CD", +"A* c #5657C5", +"B* c #656591", +"C* c #74759F", +"D* c #2021BC", +"E* c #505293", +"F* c #6E6F84", +"G* c #4A4BA3", +"H* c #4D4EA5", +"I* c #606176", +"J* c #0606C9", +"K* c #5D5E9E", +"L* c #0606C4", +"M* c #5E5E9D", +"N* c #3333AF", +"O* c #3839B2", +"P* c #5E5FB0", +"Q* c #5D5D85", +"R* c #626462", +"S* c #636563", +"T* c #717385", +"U* c #4E4FAC", +"V* c #0505A1", +"W* c #4E4FAB", +"X* c #6D6EA6", +"Y* c #21219D", +"Z* c #626362", +"`* c #616374", +" = c #4B4C82", +".= c #393A9C", +"+= c #838594", +"@= c #111283", +"#= c #4C4E7F", +"$= c #2A2A85", +"%= c #030375", +"&= c #474987", +"*= c #8E909F", +"== c #03036E", +"-= c #2D2E7B", +";= c #585A84", +">= c #30317A", +",= c #6D6E7C", +"'= c #4D4E89", +")= c #020245", +"!= c #4F508B", +"~= c #73759B", +"{= c #020242", +"]= c #252569", +"^= c #0E0E4D", +"/= c #44456A", +"(= c #646664", +"_= c #4F5074", +":= c #2C2D66", +"<= c #5D5D80", +"[= c #303166", +"}= c #2A2B5F", +"|= c #44456E", +"1= c #8E909A", +"2= c #BDC0BD", +"3= c #9EA1CA", +"4= c #3838BD", +"5= c #1516C7", +"6= c #6062A3", +"7= c #4C4D8E", +"8= c #1111BD", +"9= c #585A99", +"0= c #0606C3", +"a= c #3132B0", +"b= c #5E609E", +"c= c #3233AF", +"d= c #393AB3", +"e= c #4C4DB1", +"f= c #6A6C7E", +"g= c #1111AA", +"h= c #696B69", +"i= c #1D1EA1", +"j= c #2D2E9F", +"k= c #8E8FA1", +"l= c #0505A2", +"m= c #0505A0", +"n= c #8587AB", +"o= c #282995", +"p= c #666766", +"q= c #606273", +"r= c #1C1D94", +"s= c #36378F", +"t= c #555698", +"u= c #04047B", +"v= c #48487A", +"w= c #424383", +"x= c #10117D", +"y= c #6F7180", +"z= c #878998", +"A= c #38388F", +"B= c #252583", +"C= c #03035F", +"D= c #2E2E7B", +"E= c #5A5C86", +"F= c #31327B", +"G= c #5F618A", +"H= c #1D1D69", +"I= c #2B2B71", +"J= c #8D8F9C", +"K= c #020246", +"L= c #898AA4", +"M= c #72739A", +"N= c #282965", +"O= c #434468", +"P= c #4F4F73", +"Q= c #2D2D67", +"R= c #5D5F81", +"S= c #454670", +"T= c #0E0E3D", +"U= c #6C6D79", +"V= c #878993", +"W= c #373868", +"X= c #232452", +"Y= c #3737BC", +"Z= c #3939BE", +"`= c #4647B5", +" - c #2929AE", +".- c #3233B7", +"+- c #2425BE", +"@- c #3031B4", +"#- c #2020B8", +"$- c #3E3F95", +"%- c #545695", +"&- c #0606C2", +"*- c #2F30AE", +"=- c #65668F", +"-- c #5E5F9D", +";- c #0606BD", +">- c #6F71AE", +",- c #2425AE", +"'- c #2F30A7", +")- c #1E1FA9", +"!- c #0505AD", +"~- c #57596B", +"{- c #68697C", +"]- c #1212A5", +"^- c #1213A5", +"/- c #2F30A0", +"(- c #3233A2", +"_- c #3B3BA9", +":- c #606199", +"<- c #05059B", +"[- c #0F0F97", +"}- c #252590", +"|- c #111195", +"1- c #6E7081", +"2- c #3A3A9C", +"3- c #23248C", +"4- c #464778", +"5- c #1D1E82", +"6- c #2C2D86", +"7- c #2F3087", +"8- c #13137B", +"9- c #14147B", +"0- c #868897", +"a- c #1E1F79", +"b- c #474882", +"c- c #2E2F7C", +"d- c #5C5E88", +"e- c #33337D", +"f- c #6F717E", +"g- c #0F105D", +"h- c #0F105C", +"i- c #2D2E72", +"j- c #313175", +"k- c #393A7C", +"l- c #111153", +"m- c #2B2C6B", +"n- c #292968", +"o- c #393A68", +"p- c #2D2D65", +"q- c #64667D", +"r- c #1C1C50", +"s- c #2B2C5D", +"t- c #2E2F5F", +"u- c #11113C", +"v- c #12133C", +"w- c #868892", +"x- c #7678B9", +"y- c #838599", +"z- c #8C8FA2", +"A- c #585984", +"B- c #3738BC", +"C- c #414298", +"D- c #1414BC", +"E- c #3C3CA5", +"F- c #5C5E9C", +"G- c #3233AE", +"H- c #4D4EB2", +"I- c #1D1DA5", +"J- c #646578", +"K- c #27289D", +"L- c #3B3B89", +"M- c #747688", +"N- c #2121A3", +"O- c #0505A4", +"P- c #10119A", +"Q- c #1E1F96", +"R- c #707283", +"S- c #3A3B9D", +"T- c #8C8E9D", +"U- c #2D2E87", +"V- c #222383", +"W- c #838593", +"X- c #3D3E86", +"Y- c #030366", +"Z- c #030365", +"`- c #11116F", +" ; c #30307D", +".; c #5E608A", +"+; c #33347D", +"@; c #020252", +"#; c #63648D", +"$; c #747582", +"%; c #1E1E69", +"&; c #454681", +"*; c #5F6187", +"=; c #111155", +"-; c #0E0E4F", +";; c #4B4B71", +">; c #4B4B70", +",; c #181956", +"'; c #0F1049", +"); c #010130", +"!; c #3A3B6E", +"~; c #5C5D7F", +"{; c #2C2C5F", +"]; c #212150", +"^; c #83848F", +"/; c #5E60A1", +"(; c #5E5FA0", +"_; c #5F60A2", +":; c #8284AE", +"<; c #8D8FA3", +"[; c #6566A7", +"}; c #5E5F9F", +"|; c #575899", +"1; c #5E5E9E", +"2; c #5B5C9B", +"3; c #666890", +"4; c #8E90A3", +"5; c #62639F", +"6; c #575995", +"7; c #696B7D", +"8; c #6C6D93", +"9; c #5A5B94", +"0; c #7A7C8D", +"a; c #5D5F83", +"b; c #4F5087", +"c; c #6B6D7E", +"d; c #7A7C8B", +"e; c #5A5A8A", +"f; c #585A89", +"g; c #686A89", +"h; c #70728F", +"i; c #5D5E8B", +"j; c #595A87", +"k; c #6A6B86", +"l; c #595A82", +"m; c #797B87", +"n; c #55577C", +"o; c #505177", +"p; c #595B74", +"q; c #5D5F82", +"r; c #5B5D7F", +"s; c #66687F", +"t; c #777984", +"u; c #585979", +"v; c #575978", +"w; c #68697F", +"x; c #5052BF", +"y; c #4243B1", +"z; c #9496AA", +"A; c #7778BA", +"B; c #6869C0", +"C; c #828498", +"D; c #4D4EBC", +". . . . . . . . . . + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . + @ # $ % % $ $ # @ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + . . . . . + + + + . . . . . . . . . . . . . . . . . . . + + + + + + + @ # $ $ $ # # @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . + # & * = - ; > ; , ' ) $ @ + . . . . . . . . . . . . . . . . . . . . . + + @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + @ # % % ) % # @ + + + @ # $ $ $ @ + . . . . . . . . . . . + + @ @ @ @ # # $ $ $ $ ! ~ { ] , , ] ^ ) $ # + . . . . . . . . . . . . . . . . . . . . . . + + @ @ @ @ # # $ # # + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . + / ( _ _ _ _ _ : < [ } > ' % # + . . . . . . . . . . . . . . . . . . . | 1 $ % % $ # + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + 2 3 4 5 > 6 ; ' ) # @ 7 8 9 ] , ' 0 $ @ . . . . . . . . . + a $ % ) ) b c ^ ] ] d e f f g h i j k l > ] 0 $ @ . . . . . . . . . . . . . . . . . . . . m n $ ) ) o p q ' ' ^ ) $ @ + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . + / _ _ r s t u _ _ v w x y z , ) # + . . . . . . . . . . . . . . . . + A B C ] D D ] ) $ @ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ E 3 4 F y G H z D 0 % I 8 J } K l > ^ $ @ + . . . . . . + L M ] ; > ; b c N l z O P f Q R S T j U V W l D 0 # + . . . . . . . . . . . . . . . . . + X Y Z , ; ; ` p .N ..N D ^ $ @ + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . + # _ _ +.@.#.$.%.&.*._ =.-.;.>.K D ) # + + . . . + + + + @ @ @ # # # # # ,.'.).K [ !.z ; ^ $ # @ @ @ @ @ + + @ @ # # # @ @ + + . . + + @ @ # # @ @ + + . + + @ @ @ @ @ + + . . . . + # ~.4 4 {.].^./.(.!.> ] _.8 :.<.(.V !.> ^ $ # # # # # @ # $ [.M z [ H [ }.!.W y G |.P 1.2.3.4.5.$.6.7.8.y z , ) # # # # # @ @ + + . + + @ @ # # # # # 9.0.a.K W W [ !.!.W H [ z D 0 $ # # # # @ @ + + + + + + @ @ # # # @ @ + . . . . . ", +". . @ b._ c.d.6.e.f.g.h.i._ j.k.$.7.V } D 0 $ @ @ @ @ # $ % % ) 0 ^ ' ' ^ ^ ^ l.'.m.x n.d.>.!.6 ] ^ 0 ^ 0 0 ) ) ) 0 ^ ' ] ' ^ ) % # @ @ # % 0 ^ ' ' ^ ) $ # # $ % 0 ^ ' ^ 0 ) $ @ + . . + $ o.4 p.q.r.s.t.6.@.[ ..u.8 v.2.#./.<.}.; ^ 0 ^ ' ' ^ ^ 0 ' w.M <.n.x.d.(.<.(.@.y.z.P A.%.f.g.B.C.t.3.D.x W N ] ^ ^ ' ' ' ^ ) $ # # $ % 0 ^ ' ' ' ^ ' E.0.F.x G.G.@.(.H.(.(.>.W .., ^ 0 ^ ' ' ^ 0 % $ # # $ % ) 0 ^ ' ' ^ ) $ @ + . . . ", +". + # I._ J.K.L.B.M.N.O.P.Q.R.S.T.U.V.G } ; ' ) & W.X.' , - Y._ _ Z.`.K } l +.+'.++@+#+$+%+&+*+=+-+;+>+l ..,+'+)+!+~+{+]+}.} N D ^ ) ^+/+(+_+:+<+K z 6 D [+}+|+1+2+3+4+K l > ] ) # + + @ ) 5+4 6+7+r.8+M.9+6.x H 0+a+b+$.4.c+;.d+e+f+g+h+i+K } l j+k+w.M l+m+n+c+o+p+;.q+r+s+P t+u+v+w+x+y+z+5.A+n.B+C+D+E+F+G+H+K z 6 D I+J+K+L+M+N+O+P+K z Q+R+S+T+U+V+$.W+X+Y+x.G.@.B+Z+`+ @.@+@@@K } N ; ' #@$@] %@&@*@=@-@K z 6 , 0 $ + . . ", +". + $ ;@_ _ >@,@N.'@N.)@g.B.B.S.9+!@_ ~@B+[ l > {@_ ]@z ^@_ _ _ _ _ _ /@@.H.(@'.'._@:@<@[@}@|@1@2@-+3@4@(.5@6@7@)+8@~+~+9@0@@.>.[ l a@b@c@(+_+d@e@f@x B+g@h@i@j@1+2+k@l@m@(.G K > ^ $ @ # 0 n@4 o@g.p@q@r@N.s@#.8.t@a+u@L.v@%.w@x@f+f+y@z@A@B@@.H.C@[.w.M D@E@F@9+c G@H@I@J@K@P f L@M@N@O@P@Q@%.3.7.R@S@T@E+F+U@V@W@x B+X@Y@Z@`@L+M+ #.#+#n.8.@#0.S+##$#%#,@&#p *##.2.x.=#-#;# @.@>#,#'#@.>.H } )#!#~#{#]#*@*@^#/#8.V !.6 ^ $ + . ", +". + $ D (#_ _ j._#:#<#S.[#v@9+9+s@=._ }#x.8.V [ Z._ +.<.|#_ 1#K.3.2#3#4#5#A+6#7#_@8#9#0#'@a#b#2@c#A+d#3.-.e#7@f#g#H@h#i#9@j#$.K.n.k#l#m#n#x.o#p#e@q#c+r#s#t#u#n 2.-.v#l@w#x#r#8.H N ^ $ $ ^ n@4 y#P.z#q@q@A#B#5.r#C#a+D#[@S.E#F#x@G#H#K.I#J#K#L#-.M#N#w.D@O#P#Q#M.c G@n+R#S#T#P U#V#W#X#Y#P@Z#s@`# $S@R@.$7.+$@$#$$$c+r#%$Z@&$*$7.6.=$.#-$;$>$W+,$S+'$)$!$~${$p ]$$+-.^$/$-#($_$^.:$<$[$}$H@;.(.)#!#|$1$A+2$3$^#4$$+#.d.H 6 0 # + ", +". + $ D H 1#5$_ _ _ _ j.6$7$e.t.8$9$_ _ 6.H@D.0$_ _ n.#._ _ 7$9+,@h.a$b$c$k.8$d$_@e$f$N@g$h$b#2@s@9+f.f.i$j$k$$.5.s@f.B#9@l$B.v@`#m$l#n$K.4.k.o$p$q$r$s$t#t$6.$.L.f.g.u$w#v$L.c+n.H > 0 % ^ n@4 w$M.x$y$z$A$B$[#$.C$a+D$F@h.E$F#F$3.4.s@f.G$K#H$[#L.%.w.D@Q#I$x$J$c G@k.9+f.K$P L$M$N$O$P$P@Q$C.e.R$S@S$3.T$v@,@U$V$W$T$X$Z@Y$A+4.v@F@Z$-$`$S.[# %S+.%+%x$@%#%$%%%e.T$&%/$*%6.n+s@f.=%[$-%k.4.H@)#!#;%T$[#F@>%^#,%o$L.-.d.!.D % + ", +". + $ , [ x.5.'%)%!%_ _ _ *.&.%.5.$.~%_ {%T$`#]%_ ^%3.t.*._ /%(%Y+_%:%J$'@<%[@[%}%|%1%2%3%4%2@5%h.O.6%O.g.[#L.L.[#g.N.7%8%l$f$9%0%l#a%$.e.o$<%M.O.P.h.b%t#c%d%e%f%g%h%i%w#j%k%9+c+@.K , 0 ' l%4 m%)@g$n%o%p%q%B#r%s%a+t%<%M.u%F#v%k.f.h.O.9%w%H$x%h.B.M D@y%z%z%y%c G@S.g.)@A%f V#B%N$O$C%P@D%B.E%R$F%e.9+F@)@O.O.P.g.C.%.`#$.%.[@)@G%H%-$I%Q#9%J%S+K%N@z%L%M%$%N%[@C.O%/$P%r%o$h.O.9%Q%-%R%o$L.)#!#k.B#6%S%T%^#,%6%h.s@^.V N 0 @ ", +". + # ' } 8.3.[#P.B$B$U%j._ j.9+e.5.2#_ V%[@[#W%_ X%k.F@Y%_ _ _ _ Z%`% &+%6%g..&}%+&:%L%x$@&2@#&9%Q#f$'@h.[#$&%&&&*&~+9@8%=&x$1%-&l#;&[#B.P.N.O.k%<%B#>&t#i@j@1+2+2+l@,&w#'&)&P.s@r#G 6 ^ ' n@4 !&g.J$I$z#~&{&]&F@^&a+/&O.6%(&x@S.B#P.9%9%N._&H$:&B$9%M D@N@z%<&1%c [&h.M.6%}&f |&M$B%2%1&P@2&k%3&R$4&B.)@N.6%N.k%h.F@C.s@5&6&7&8&9& #0&-$a&I$_%b&S+c&I$<&d&e&$%f&B#h.g&/$F@h.O.6%6%N.h&-%i&M.g.)#j&<%~$+%_%f$^#k&Q#6%S.$.d.} ' # ", +". + # I.l&V r#8$o$)@O.N.m&n&_ o&f.r%t._ _ p&q&_ _ ,@h.N.~$r&s&_ _ 4#4#t&u&S%<%v&:@w&f$g$1%x&2@#&B$f$f$N.o$y&7@!+8@~+z&A&l$=&M$z%B&l#C&)@O.9%M.B.C.k.v@`%t#D&E&F&G&H&I&J&K&L&x$w+S.3.(.l ] ] l%4 !&S.~$)&J$M&{&N&k%O&a+P&T%Q#F#x@M.9%'@6%k%B.Q&H$R&S%Q#M D@@%3%I$f$c [&)@6%~$}&f S&d&3%y%T&U&V&N.W&R$X&6%'@'@O.B.C.r%L.%.Y&Z&`@`&M+M+ *.*-$+*n%d&@*S+c&y%I$y%#*$%f&k%N.g&/$9%'@S%B$k%B.$*%*i&B$N.)#j&B$)&:%J$B$^#k&~$'@h.T$;.[ ] $ ", +". + # _ _ &*x.c+t.[#,@B#k%**_ =*k%S.9+-*_ ;*>*_ ,*B$S%Q#T%S%Q#1%'*)*!*~*{*J$O.]*:@^*~$)&w+/*2@(*9%T%'@g._*7@)+:*<*[*S%_%l$=&}*|*1*l#2*B$'@9%g.r%3*4*>$5*t#6*1%n%N$N$B%n%X#X#L%+%h.`#@.} , ] l%{.7*f.N.'@N.)@8*9*0*a*a+b*1%:%F#x@c*S%~$M.o$L.d*e*f*~$w+M D@1%@%:%B$G@[&<%6%S%}&f g*_%:%Q#h*U&i*9%j*R$k*w+w+'@h.k.l*m*6.-.n*Z@o*p*q*~$)&r*-$s*}*X#t*##K%J$_%w+u*$%v*P.'@g&/$w*f$Q#O.o$L.x*%*y*B$~$)#j&Q#+%)&B$B#^#k&P.9%<%e.7.H , $ ", +". + $ z*_ A*x.A+`#8$t.r%[@j._ B*'@k%,@C*_ n&D*_ E*y%1%F*G*H*M.S%1%L%I*J*'.y%S%K*L*^*6%S%B$M*-+N*P.6%P.C.O*7@P*8$,@9%J$Q*=&=&R*S*M$l#c@T*S%O.o$4.U*V*W*X*i@Y*N@|*Z*S*B%`*K& =x$J$g.`#@.} , ] n@{..=C.k%P.B.C.+=9*8 @=a+#=L%x$$=%=&=w+~$<%k.*===e*F@6%w+M D@)&_%w+M.G@[&h.9%'@-=f ;=T%T%N.>=U&Q$9%Q#S@S@,=f$6%,@5.'=)=!=~={=]=L.F@9%f$1%^=-$/=(=M$_=##:=S%Q#'@<=$%[=P.S%}=/$|=+%Q#)@k.1=[$%*F@9%T%!#j&w+J$T%)@9+,%k&B.P.h.L.2.2=D $ ", +". + % 3=_ _ }#3.`#`#$.`#4=_ /%'@T%N.F@[#5=_ _ _ z%z%d&F*_ _ 6=)@S%y%7=J*8=3%_%9=0=a=6%~$9%b=-+c=)@O.h.r%d=)+e=L.h.Q#f=g==&=&Z*Z*h=i=c@j=S%O.f.k=l=m=n=3*i@j@o=}*R*p=q=r='&s=:%'@o$3.(.z ] ] n@{..=9+h.B#[#%.8$t=8 a+u=v=B%X#w=%=x=y=~$h.z=A=H$B=S.9%T%D@D@w+J$S%k%G@C=B#9%B$D=f E=6%6%)@F=U&G=N.Q#H=S@I=f$9%o$J=K=)=L=M=Z@Z&f.M.w+1%N=0&-$O=S*O$P=##Q='@S%9%R=$%[=P.S%S=-#T=U=T%<%V=W=-%X=S.9%T%!#j&Q#Q#6%S.%.,%k&[@<%B#L.2.2=D $ ", +". @ % ; (#_ _ _ Y=4=Z=_ _ _ o&B$T%N.S.r%`=_ _ -}*}*2%f$.-_ 3#+-@-#-J*'.$-z%I$%-0=&-*-=-9%--;-c=<%k%B.e.>-)+!+,-'-)-8%l$=&!-~-R*O${-]-_+^-/-(-l=V*_-$+e.:-<-1+[-}-H&w#w#|-1-S%k%r%K.>...' ] n@q.2-v@B.S.L.3.A+$.3-a+u=4-(=h=I$5-f+g+6-7-8-==9-0-g.6%~$D@D@a-b-S%P.G@C=B#N.6%c-f d-O.O.B#e-U&Z#P.S%f-g-T@h-i-j-#$K=k-6.$.Z@Z@l-m-n- #.#-$-$o-(=M$t*##$#p-q-9%{$$%[=P.~$w+r-;# @s-t-u-,#v-w-g.6%~$!#j&'@~$M.[@n+,%k&9+B#B.e.D.2=D $ ", +". @ ) > 2=x-!@_ _ _ _ _ W%y-h.6%'@k%[#8$z-_ _ A-N$N$2%~$f.B-4#4#t&~*'.C-z%z%x$J$D-&-|@E-B$F-3@G-h.<%o$T$6.H-8@~+z&9@I-J-K-!-L-}*<&+%M-N-d@O-l=l=_.e.k.o$k%g%P-2+k@,&w#Q-R-~$N.B.T$D.y 6 ^ ' n@q.S-s@,@C.5.^.;.r#T-a+u=v=p=M$g$S%U-g+z@A@K#V-W-S.P.6%6%X-Y-Z-`-S%O.[&C=B#M.O. ;f .;)@<%S.+;@;#;h.9%B$$;%;F+F+U@#$&;t.L.9+*;=;`&L+M+-;;;>;-$,;|*z%_%';$#);!;B$~;$%[=k%6%'@'@{; @.@>#,#];^;S.P.6%6%!#j&M.O.h.k.$+,%k&s@,@o$T$7.H D $ ", +". + % ; W x.`#y-/;(;_;c$S.B#M.6%O.S.%.-.:;_ /%N@|*|*N@M.s@`#<;[;};|;+%N@d&d&1%~$k%1;2;3;6%k%B.S.F@S.9+n+K.^.4;5;6;7;x$d&3%<&n%<&y%B$h.g.8;9;9;0;B#B.B#<%M.6%w+a;b;b;c;f$T%'@P.f.`#G.W ; 0 ^ N B+2.8$v@L.3.x.H.8.#.s@N.@%2%I$Q#k%B#d;e;f;g;k%)@M.N.O.<%S.h;i;j;B$M.g.S.B.h.h.S.[@[@,@,@9+t.8$s@f.g.B#g.h.k;l;l;m;B#B.g.h.)@N.n;o;p;3%d&d&L%z%z%N@T%k%q;r;s;6%k%B.S.g.)@)@h.<%t;u;v;w;k%)@M.9%O.<%S.f.S.B.f.T$A+2.H@8$9+v@$.G.[ , $ ", +". + $ ] K x A+s@F@)@P.k%k%M.O.P.F@L.-./.x;_ y;+%z%2%f$,@`#H@c+t.F@9%w+_%:%)&'@B#[@[#,@<%k%B#o$[#9+k.8$A+/.;.6.s@k%w+_%1%1%y%g$+%B$F@k.s@[#B.k%M.M.P.k%h.g.B.h.O.~$Q#w+T%~$N.B#r%6.x K ] ) 0 ; H G.c+4.$.r#(.H H x 6.9+O.T%'@B#9+s@9+F@k%N.N.N.O.P.B.9+%.%.v@B.)@h.,@C.C.[@[#s@%.t.L.L.8$$+c+`#t.r%r%L.r%[@g.k%M.M.P.k%<%B#h.M.S%+%1%1%1%y%y%:%T%)@f.[#,@<%k%B#o$C.C.[@[#k.k.C.g.P.N.9%N.O.P.B.9+%.8$t.s@%.3.7.n.7.c+5.5.H@x } ' # ", +". . @ 0 6 2=G.3.s@o$g.h.h.h.B.[@t.z;A;B;_ _ C;S%g$:%P.t.^.x.D.3.r%B.M.9%N.<%f.t.$.>$8$k.C.9+L.8$n+>$H@x.(.(.x.$+v@h.O.9%9%N.M.B#[#8$c+6.>$t.C.F@B#g.S.[#e.8$8$s@f.B#k%P.)@B.v@$.;.y N ^ $ % ] } <./.#.2.@.H l ..[ @.6.e.[#v@T$c+A+3.%.[#B.h.h.B.[@t.3.^.K.$+e.9+9+s@T$5.4.$.c+A+A+-.-.K.D./.2.A+c+-.A+6.$.e.[@F@B#g.S.C.r%s@v@,@)@N.9%9%N.O.)@,@s@4.`#T$k.C.9+L.8$5.n+>$-.6.>$t.C.B.h.h.B.[@t.3.^.r#K.6.H@/.x >.x /.^.^.G.y N 0 @ ", +". . + $ ' ..y y.K.`#t.s@r%L.T$$+r#0$_ _ _ D;9+N.Q#6%C.-.d.V H.x.6.8$r%v@r%T$c+2.G.G.D.A+3.3.A+#.7.x.8.B+[ [ B+G.6.8$s@k.r%L.%.`#A+/.@.8.n.#.$+8$e.t.5.c+#./.;.r#c+4.e.s@L.8$c+/.V z ] % # # 0 > }.V (.<.H l , ] > !.(./.^.#./.@.x d.2.c+5.e.e.T$$+r#y.H.(.G.^.c+3.6.^.2.7.x.y.8.8.@.@.(.>.V <.8.@.8.(.x G.#.$+8$e.t.5.$+H@#.H@$+8$s@k.k.s@t.5.3.^./.;.r#6.$+3.A+#.D.;.n.8.8.n.r#3.5.e.e.T$$+#.y.H.>.(.@.x V W }.W V (.(.G } , % @ ", +". . . @ $ ' N [ <.y.7.#.^.r#/.d.V W }.H 8.A+r%h.P.,@4.x.y } K 2=x x.r##.2.x.x G W W G (.@.@.x >.B+2=}.l > > l H (.x.D.r#2.7.x.@.<.2=}.K W V @.;.D.7.x.x B+H W G (.n.D.r#2.;.8.y z , ) @ + @ $ ^ ; l K } 6 ] ) % 0 D z H B+B+H }.K !.G 8.x.D.2.;.@.V [ } K H >.8.@.8.<.V G H [ }.}.!.!.K z z } }.!.}.K K W V @.;.D.D.x.@.<.B+>.8.x.D.r#r#D.;.y.x V 2=2=V x d.@.x <.B+2=W }.}.[ B+8.x.D.2.;.@.V [ z z } }.}.z 6 ; 6 l K K ..D ) # + ", +". . . . @ $ ^ D ..}.H G G y W K ..6 N !.x H@t.[@C.T$r#>.l D , 6 } [ y G 2=[ z 6 D ; 6 z K }.} l N > D ' 0 0 ' ; z [ 2=y 2=W !.} ..> , , ; N K W 2=H [ } N ; D > l !.H y 2=[ } 6 ] % # + . + @ $ 0 ' , ] ^ % # @ # ) ' ; 6 6 ; , ] D 6 } [ H 2=W K N D ] ] ; ..K }.K z ..6 > D , , D D , ] ' ] , D , ] ] ; N K W 2=H [ } ..6 N z !.H 2=2=W !.K l N > > N z K }.} l N > ; , , D 6 } [ H 2=W K N D ] ' ] , , ' ^ 0 ^ ' , , ' ) # + . ", +". . . . . + # % 0 ] D ; > ; D ] ^ ' D } >.D.$+5.`#^.x }.D ) % ) ' , ; ; ; , ^ ) % % 0 ^ ] ] ' ^ 0 ) % # # # $ ) ^ , D ; D , ] ^ 0 % $ $ % 0 ' , D D , ' ) % % ) ^ ] D ; ; , ' ) $ @ + . . . . + @ $ $ $ # @ + + + @ # % ) ) % $ $ % ) ' , D D , ' 0 % $ $ ) ^ ' ] ] ' ^ 0 ) % % $ % % $ $ $ $ $ $ $ $ $ % 0 ' , D D , ' 0 ) 0 ^ ] D D D , ] ' ^ ) ) ) 0 ' ] ] ' ^ 0 ) % $ $ % ) ' , D D , ' 0 % $ # $ $ $ $ # # # $ $ $ # @ + . . ", +". . . . . . + + @ # $ % % % $ # # % ' N W x ;.D.;.(.!.> 0 # @ @ # $ % % $ $ # @ + + @ # # # # # @ @ + + + + + @ # $ $ $ $ $ # # @ + + + + @ # $ $ $ $ # @ + + + @ # $ % $ $ # @ + . . . . . . . . + + + + . . . . . + + + @ + + + + @ # $ $ $ $ # @ + + + @ # # # # # @ @ @ + + + + + + + + + + + + + + + @ # $ $ $ $ # @ @ @ @ # $ $ $ $ # # @ @ @ @ @ # # # # # @ @ + + + + @ # $ $ $ $ # @ + + + + + + + + + + + + + + . . . . ", +". . . . . . . . . . + + + + + + + @ % ] ..[ y B+2=} ; 0 # + . . . + + + + . . . . . . . . + . . . . . . . . . . . + + + + + . . . . . . . . . + + + + . . . . . . . + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + . . . . . . . + + + . . . . . . . . . . . . . . . . . . . . . + + + + + . . . . . + + + + . . . . . . . . . + . . . . . . . . . . + + + + . . . . . . . . . . . . . . . . . . . . "}; diff --git a/app/xsystrace/pixmaps/permit-always.xpm b/app/xsystrace/pixmaps/permit-always.xpm new file mode 100644 index 000000000..d01123920 --- /dev/null +++ b/app/xsystrace/pixmaps/permit-always.xpm @@ -0,0 +1,148 @@ +/* XPM */ +static char * permit_always_xpm[] = { +"43 42 103 2", +" c None", +". c #4CEA12", +"+ c #4BE316", +"@ c #4BD51D", +"# c #4ACA23", +"$ c #4AC526", +"% c #4AC625", +"& c #4ACD21", +"* c #4BD91B", +"= c #4CE813", +"- c #4CE614", +"; c #4AC923", +"> c #48A239", +", c #479640", +"' c #478D45", +") c #478947", +"! c #478A46", +"~ c #479043", +"{ c #48993E", +"] c #49AF32", +"^ c #4BDA1A", +"/ c #489F3B", +"( c #49B92C", +"_ c #4BE216", +": c #4BD61C", +"< c #489F3A", +"[ c #49BD2A", +"} c #48AB34", +"| c #49AE32", +"1 c #4BE215", +"2 c #4BDE19", +"3 c #489B3D", +"4 c #478A47", +"5 c #4BE713", +"6 c #49B62D", +"7 c #4CE414", +"8 c #4ACE20", +"9 c #4BE315", +"0 c #4CE713", +"a c #48B62E", +"b c #4BDC19", +"c c #4BD11F", +"d c #479341", +"e c #49C227", +"f c #49B72D", +"g c #48B031", +"h c #49B62E", +"i c #478A45", +"j c #4AD71B", +"k c #49BD29", +"l c #4CE316", +"m c #48A13A", +"n c #49BF28", +"o c #49C724", +"p c #49BA2B", +"q c #4BDF18", +"r c #479142", +"s c #47983D", +"t c #4BE116", +"u c #4BDD19", +"v c #478B46", +"w c #478946", +"x c #4CE415", +"y c #479540", +"z c #49B031", +"A c #48A03A", +"B c #49B82D", +"C c #49B230", +"D c #4AC824", +"E c #4CE714", +"F c #49B330", +"G c #478F43", +"H c #4ACB22", +"I c #4CE216", +"J c #48A836", +"K c #489E3A", +"L c #4BE813", +"M c #4AC227", +"N c #49AE33", +"O c #4BD71C", +"P c #48983F", +"Q c #4CE812", +"R c #49B82C", +"S c #4BD41E", +"T c #4BDE18", +"U c #489D3C", +"V c #4BD020", +"W c #4CE515", +"X c #4CE912", +"Y c #4BE117", +"Z c #4ABD2A", +"` c #489540", +" . c #49AD33", +".. c #4BD21F", +"+. c #4AC327", +"@. c #48A437", +"#. c #4AC724", +"$. c #4AD41D", +"%. c #4AD020", +"&. c #48A835", +"*. c #4ACE21", +"=. c #4AD31E", +"-. c #4AD21E", +" ", +" ", +" ", +" ", +" . . . . . . ", +" . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . ", +" . . . . . + @ # $ % & * = . . . . . ", +" . . . . - ; > , ' ) ! ~ { ] @ . . . . . ", +" . . . . ^ / ) ) ) ) ) ) ) ) ! ( _ . . . . ", +" . . . . : < ) ) [ } | = . . . 1 ", +" . . . . 2 3 4 ) . . . 5 6 6 - . . 7 8 9 ", +" . . . 0 ] ) ) . . . . . . . a # . . . ; b . . ", +" . . . c d ) . . . . . + @ # e f - . . _ g . . . ", +" . . . = h 4 . . . . - ; > , ' ) i j . . . k . . . . ", +" . . . l m ) . . . . ^ / ) ) ) ) ) n . . . o p . . . . ", +" . . . q r . . . . : < ) ) . . . : s = . . . t ", +" . . . u v . . . . 2 3 4 ) . . . u w h - . . x [ ", +" . . . u v . . . 0 ] ) ) . . . u ) y # . . . ; ", +" . . . q r . . . c d ) . . . : ) z - . . _ A ", +" . . . l m . . . = h 4 . . . . % ) ^ . . . B ", +" . . . = h . . . l m ) . . . . C ) $ . . . D ", +" * = . . c . . . q r . . . _ 3 ) . . . : ) ", +" E . . 0 F . . . u v . . . . ; G . . . u ) ", +" H . . . q . . . u v . . . I J ) . . . u ) ", +" K * . . . L . . . q r . . . . M ! ) . . . : ) ", +" N x . . . . . . . l m . . . . . O P ) . . . . % ) ", +" C + . . . . . . Q R . . . . . S 3 ) . . . . C ) ", +" C I . . . . . . t T . . . . . . . . O U ) . . . _ 3 ) ", +" m V W . . . . . . . . . . . X Y Z ` ) . . . . ; G ", +" r ...- . . . . . . . . Y +.@.) ) . . . I J ) ", +" ) r U h #.$.^ * %.M } P ' ) ) . . . . M ! ) ", +" ) ! w ) ) ) ) ) ) ) ) ) ) . . . . . O P ) ", +" ) &.*.=.=.=.-.H . . . . . S 3 ) ", +" C I . . . . . . . . . . . . . . . . O U ) ", +" m V W . . . . . . . . . . . X Y Z ` ) ", +" r ...- . . . . . . . . Y +.@.) ) ", +" ) r U h #.$.^ * %.M } P ' ) ) ", +" ) ) ) ) ) ) ) ) ) ) ) ) ) ", +" ", +" ", +" "}; diff --git a/app/xsystrace/pixmaps/permit.xpm b/app/xsystrace/pixmaps/permit.xpm new file mode 100644 index 000000000..aec8b6056 --- /dev/null +++ b/app/xsystrace/pixmaps/permit.xpm @@ -0,0 +1,102 @@ +/* XPM */ +static char * permit_xpm[] = { +"50 50 49 1", +" c None", +". c #4CEA12", +"+ c #4BDF17", +"@ c #49C128", +"# c #48A835", +"$ c #47973F", +"% c #478C44", +"& c #478947", +"* c #4BD81B", +"= c #48AB33", +"- c #49B82C", +"; c #4BE613", +"> c #48A636", +", c #4BE713", +"' c #48A039", +") c #4BDD18", +"! c #49BC2A", +"~ c #49BD2A", +"{ c #479241", +"] c #478A46", +"^ c #49B92C", +"/ c #49B32F", +"( c #4BDC19", +"_ c #4BE813", +": c #478D44", +"< c #489E3B", +"[ c #4AC923", +"} c #49B72D", +"| c #49B031", +"1 c #4ACA23", +"2 c #489D3B", +"3 c #4BDA1A", +"4 c #479042", +"5 c #4BE315", +"6 c #4BE912", +"7 c #478B45", +"8 c #48A736", +"9 c #49C227", +"0 c #49B62E", +"a c #48A239", +"b c #49B52E", +"c c #4BE216", +"d c #478A45", +"e c #49B130", +"f c #4AD41D", +"g c #47963F", +"h c #48AF32", +"i c #4AC426", +"j c #4BE017", +" ", +" ", +" ", +" ", +" ......... ", +" ............... ", +" ................... ", +" ....................... ", +" ......................... ", +" .........+@#$%&%$#@+......... ", +" ........*=&&&&&&&&&&&=*........ ", +" ........-&&&&&&&& &&&&&&-........ ", +" ......;>&&&& &&>;...... ", +" ......,'&&& &',.....) ", +" .......#&&& &#......! ", +" ......~&&& &~......{ ", +" ......+]&& ]+.....^ ", +" ....../&& /.....(& ", +" ....._:&& :_.....< ", +" .....[&& [.....} ", +" ......|&& |.....1& ", +" ......2& .....3& ", +" ......4& .....5& ", +" ......]& .....6& ", +" ......]& .....6& ", +" ......4& .....5& ", +" ......2& .....3& ", +" ......|& .....1& ", +" .....[& ......}& ", +" ....._: ......<& ", +" (...../ .....(&& ", +" ^.....+] ......^&& ", +" ......~ .......{& ", +" !......# ......!&& ", +" 7)....., ......)7&& ", +" 8......; .......8&& ", +" &^....... .......^&&& ", +" &9........ ........9&&& ", +" &@.......... ..........@&&& ", +" &0.........................0&&& ", +" &a*.....................*a&&& ", +" &&bc.................cb&&&& ", +" &&def.............fed&&&& ", +" &&&ghifj,.,jfihg&&&&& ", +" &&&&&&&&&&&&&&&&&&& ", +" &&&&&&&&&&&&& ", +" ", +" ", +" ", +" "}; diff --git a/app/xsystrace/pixmaps/skull.xpm b/app/xsystrace/pixmaps/skull.xpm new file mode 100644 index 000000000..4ab82f1b1 --- /dev/null +++ b/app/xsystrace/pixmaps/skull.xpm @@ -0,0 +1,364 @@ +/* XPM */ +static char * skull_xpm[] = { +"30 30 331 2", +" c None", +". c #BFC1BE", +"+ c #C6C8C5", +"@ c #BBC0BC", +"# c #8F9490", +"$ c #636864", +"% c #434844", +"& c #2A2F2B", +"* c #171C18", +"= c #161714", +"- c #141513", +"; c #191A17", +"> c #1E1F1D", +", c #353634", +"' c #5D5E5C", +") c #979996", +"! c #A2A7A1", +"~ c #393E3A", +"{ c #1C211D", +"] c #111612", +"^ c #0D120E", +"/ c #050906", +"( c #0F1410", +"_ c #0E0E0C", +": c #0C0C0A", +"< c #10100E", +"[ c #121210", +"} c #292A28", +"| c #828481", +"1 c #D3D5D2", +"2 c #E0E5E0", +"3 c #848984", +"4 c #20241F", +"5 c #080C09", +"6 c #0A0E0B", +"7 c #0B0F0C", +"8 c #0D110E", +"9 c #0E120F", +"0 c #0B0B09", +"a c #121211", +"b c #111110", +"c c #0C0C0B", +"d c #0E0E0D", +"e c #11110F", +"f c #0F100F", +"g c #616361", +"h c #DFE1DE", +"i c #F7F9F6", +"j c #969A97", +"k c #313632", +"l c #0D0F0E", +"m c #0E0E0E", +"n c #0F0B10", +"o c #100E11", +"p c #121112", +"q c #848584", +"r c #E4E6E3", +"s c #C6CBC7", +"t c #2E332F", +"u c #4E534F", +"v c #4D524E", +"w c #0F0A10", +"x c #141215", +"y c #050506", +"z c #2D2E2D", +"A c #ACAEAB", +"B c #EDF1EC", +"C c #696E6A", +"D c #272C28", +"E c #707571", +"F c #1E231F", +"G c #0F0F0F", +"H c #151116", +"I c #110F12", +"J c #0B0B0A", +"K c #535552", +"L c #CDD0CC", +"M c #323733", +"N c #292E2A", +"O c #727773", +"P c #282D29", +"Q c #101010", +"R c #100C11", +"S c #0E0C0F", +"T c #0D0D0D", +"U c #111111", +"V c #2B2D2A", +"W c #B2B5B1", +"X c #7B807C", +"Y c #191E1A", +"Z c #646965", +"` c #100B11", +" . c #0D0C0D", +".. c #10100F", +"+. c #232522", +"@. c #B4B8B3", +"#. c #777C78", +"$. c #232824", +"%. c #6E736F", +"&. c #0D100E", +"*. c #0C0F0D", +"=. c #0A0D0B", +"-. c #101110", +";. c #110E11", +">. c #0B0A0B", +",. c #131313", +"'. c #0A0B09", +"). c #151714", +"!. c #ADB0AC", +"~. c #7E837F", +"{. c #2C312D", +"]. c #5D625E", +"^. c #3F4440", +"/. c #0C110D", +"(. c #272B27", +"_. c #353A36", +":. c #1D221E", +"<. c #0E130F", +"[. c #0F110E", +"}. c #0E100D", +"|. c #161815", +"1. c #1F211E", +"2. c #131512", +"3. c #0D0F0C", +"4. c #0A0C09", +"5. c #10120F", +"6. c #1A1C19", +"7. c #A6A8A5", +"8. c #8C918D", +"9. c #888D89", +"0. c #131814", +"a. c #060B07", +"b. c #303531", +"c. c #878C88", +"d. c #BFC4C0", +"e. c #D2D6D3", +"f. c #9FA4A0", +"g. c #1E201D", +"h. c #757774", +"i. c #C1C2C0", +"j. c #ACADAB", +"k. c #565855", +"l. c #121411", +"m. c #111210", +"n. c #AAACA9", +"o. c #A7ACA8", +"p. c #484D49", +"q. c #6C716D", +"r. c #0B100C", +"s. c #2B302C", +"t. c #C8CDC9", +"u. c #EDF2EE", +"v. c #787A77", +"w. c #E0E2DF", +"x. c #E1E2E0", +"y. c #5E605D", +"z. c #171916", +"A. c #858784", +"B. c #1D1F1C", +"C. c #ADAFAC", +"D. c #C7CCC8", +"E. c #717672", +"F. c #090E0A", +"G. c #6B706C", +"H. c #ECF1ED", +"I. c #F6FAF7", +"J. c #929793", +"K. c #0B0D0A", +"L. c #7D7F7C", +"M. c #262825", +"N. c #333532", +"O. c #C1C3C0", +"P. c #444945", +"Q. c #848985", +"R. c #EFF4F0", +"S. c #090B08", +"T. c #0D0F0D", +"U. c #80827F", +"V. c #9B9D9A", +"W. c #3A3C39", +"X. c #8A8C89", +"Y. c #666865", +"Z. c #E7E9E6", +"`. c #797E7A", +" + c #8E938F", +".+ c #161B17", +"++ c #6F7470", +"@+ c #F2F6F2", +"#+ c #EEF2EE", +"$+ c #C3C7C4", +"%+ c #373C38", +"&+ c #4C4E4B", +"*+ c #676966", +"=+ c #191B18", +"-+ c #EFF1EE", +";+ c #F0F2EF", +">+ c #B0B1AF", +",+ c #444643", +"'+ c #D9DBD8", +")+ c #F1F3F0", +"!+ c #CDD2CE", +"~+ c #ADB2AE", +"{+ c #999B98", +"]+ c #E1E3E0", +"^+ c #E6E8E5", +"/+ c #B4B6B3", +"(+ c #4E504D", +"_+ c #959694", +":+ c #CACBC9", +"<+ c #373936", +"[+ c #3E403D", +"}+ c #989A97", +"|+ c #C5C7C4", +"1+ c #BABCB9", +"2+ c #696B68", +"3+ c #1B1D1A", +"4+ c #747673", +"5+ c #E2E4E1", +"6+ c #F3F8F4", +"7+ c #808581", +"8+ c #272926", +"9+ c #464845", +"0+ c #50524F", +"a+ c #1E201E", +"b+ c #111310", +"c+ c #ECEEEB", +"d+ c #6C6E6B", +"e+ c #151715", +"f+ c #292B28", +"g+ c #484A47", +"h+ c #181D19", +"i+ c #0A0F0B", +"j+ c #070C08", +"k+ c #454744", +"l+ c #ABADAA", +"m+ c #222422", +"n+ c #898B88", +"o+ c #949995", +"p+ c #121613", +"q+ c #202521", +"r+ c #0D0E0C", +"s+ c #656764", +"t+ c #8D8F8C", +"u+ c #B1B3B0", +"v+ c #0E0F0D", +"w+ c #10110F", +"x+ c #222421", +"y+ c #585A57", +"z+ c #9FA19E", +"A+ c #959A96", +"B+ c #B0B5B1", +"C+ c #B9BEBA", +"D+ c #797B78", +"E+ c #1C1E1B", +"F+ c #070806", +"G+ c #2E302D", +"H+ c #2B2D2B", +"I+ c #1D1E1C", +"J+ c #343633", +"K+ c #0C0E0B", +"L+ c #4B4D4A", +"M+ c #B9BBB8", +"N+ c #DADCD9", +"O+ c #D2D7D3", +"P+ c #AFB4B0", +"Q+ c #E9EBE8", +"R+ c #8B8D8A", +"S+ c #282A27", +"T+ c #353734", +"U+ c #DCDEDB", +"V+ c #CED0CD", +"W+ c #EBEDEA", +"X+ c #A0A5A1", +"Y+ c #101210", +"Z+ c #3F413E", +"`+ c #A8AAA7", +" @ c #AAAFAB", +".@ c #525753", +"+@ c #A9AEAA", +"@@ c #DEE0DD", +"#@ c #E5E7E4", +"$@ c #A7A9A6", +"%@ c #383A37", +"&@ c #6E706D", +"*@ c #70726F", +"=@ c #959794", +"-@ c #585D59", +";@ c #1B201C", +">@ c #CFD4D0", +",@ c #414642", +"'@ c #232523", +")@ c #B7B9B6", +"!@ c #555754", +"~@ c #8F918E", +"{@ c #595B58", +"]@ c #4F514E", +"^@ c #767875", +"/@ c #D2D4D1", +"(@ c #8A8F8B", +"_@ c #565B57", +":@ c #929491", +"<@ c #EEF0ED", +"[@ c #BDBFBC", +"}@ c #AFB1AE", +"|@ c #9EA09D", +"1@ c #717370", +"2@ c #939592", +"3@ c #BEC0BD", +"4@ c #555A56", +"5@ c #CFD0CE", +"6@ c #D1D3D0", +"7@ c #B6B8B5", +"8@ c #E9EAE8", +"9@ c #8E908D", +"0@ c #C8CAC7", +"a@ c #2A2E2B", +"b@ c #8C908C", +"c@ c #A5A7A4", +"d@ c #616360", +"e@ c #5A5C59", +"f@ c #3C3E3B", +"g@ c #111511", +"h@ c #5C615D", +"i@ c #313330", +"j@ c #2C2D2B", +"k@ c #242623", +"l@ c #181A17", +"m@ c #121311", +"n@ c #080A07", +"o@ c #1C1E1C", +"p@ c #B2B4B1", +" . + ", +" @ # $ % & * = - ; > , ' ) ", +" ! ~ { ] ^ / ( _ : _ < < [ } | 1 ", +" 2 3 4 5 6 7 8 9 8 0 a b c d e a f g h i ", +" j k % l l l l l l m m m m m m n o p q r ", +" s t u v l l l l l l m m m m m m w x y z A B ", +" C D E F l l l l l l G G G G G G H I p J K L ", +" M N O P l l l l l l Q Q Q Q Q Q R S T U V W ", +" X D Y Z N l l l l l l Q Q Q Q Q Q ` I ...+.@. ", +" #.$.D %.$.&.*.=.l &.*.G U -...G -.;.>.,.'.).!. ", +" ~.{.].^././.( (._.:.<.[.}.[.|.1.2.3.4.5.3.6.7. ", +" 8._.9.0.a.b.c.d.e.f.P [.}.g.h.i.j.k.2.l.).m.n. ", +" o.p.q.r.s.t. u.8.}.[.v.w. x.y.z.A.B.C. ", +" D.p.E.F.G.H. I.J.K.B.7. L.M.| N.O. ", +" P.Q./.f. R.#.S.T.U. V.W.X.Y.Z. ", +" `. +.+++@+ #+$+%+&+*+=+O.-+ ;+>+,+'+r )+ ", +" !+~+{ { {+]+^+/+(+l._+:+<+[+}+|+1+2+3+4+C.5+ ", +" R.6+7+<.<.8+9+0+a+b+3.+ c+d+- e+f+V 5.[.5.g+ ", +" ~.h+i+j+S.b+e+3.b+k+ l+S.|.l.}.b+2.m+n+ ", +" o+p+h+q+|.b+r+5.}.s+t+{+u+v+w+r+5.x+y+z+ ", +" A+B+C+D+E+b+F+z.G+H+I+J+5.K+}.L+M+N+)+ ", +" O+P+Q+R+S+5.4.5.K.b+S.K+K+T+U+V+W+ ", +" X+%+C.r ) M.5.b+[.Y+b+B.Z+`+ @.@B+ ", +" +@%+y+@@#@$@R+%@&@y.k+*@=@Z.-@;@A+ ", +" >@,@'@)@-+!@L.[+~@{@%@]@^@/@h+h+(@ ", +" _@E+:@<@[@$@v.}@|@$@1@2@3@] ;@ ", +" 4@z.U.#@5@6@]+]+7@8@9@0@$@r.a@ ", +" b@E+W.c@n+d@(+$@e@u+f@L.0+g@h@ ", +" e@8+> i@j@k@L+N.k.l@z.b+Z+ ", +" m@5.l.|.n@b+}.b+o@p@ "}; diff --git a/app/xsystrace/policy.c b/app/xsystrace/policy.c new file mode 100644 index 000000000..83b9a6d1e --- /dev/null +++ b/app/xsystrace/policy.c @@ -0,0 +1,263 @@ +/* $OpenBSD: policy.c,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ */ +/* + * Copyright (c) 2002 Matthieu Herrb and Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/param.h> + +#include <ctype.h> +#include <err.h> +#include <libgen.h> +#include <pwd.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#include "policy.h" + +#define MAX_SYSCALLARGS 10 + +static char home[MAXPATHLEN]; /* Home directory of user */ +static char username[MAXLOGNAME]; /* Username: predicate match and expansion */ + +static struct policy_list * +alloc_policy(char *p) +{ + struct policy_list *np; + + np = (struct policy_list *)malloc(sizeof(struct policy_list)); + if (np == NULL) + errx(1, "alloc_policy: cannot allocate memory"); + np->line = strdup(p); + if (np->line == NULL) + errx(1, "alloc_policy: cannot allocate memory"); + return (np); +} + +void +free_policy(struct policy_list *p) +{ + free(p->line); + free(p); +} + +static char * +strrpl(char *str, size_t size, char *match, char *value) +{ + char *p, *e; + int len, rlen; + + p = str; + e = p + strlen(p); + len = strlen(match); + + /* Try to match against the variable */ + while ((p = strchr(p, match[0])) != NULL) { + if (!strncmp(p, match, len) && !isalnum(p[len])) + break; + p += len; + + if (p >= e) + return (NULL); + } + + if (p == NULL) + return (NULL); + + rlen = strlen(value); + + if (strlen(str) - len + rlen > size) + return (NULL); + + memmove(p + rlen, p + len, strlen(p + len) + 1); + memcpy(p, value, rlen); + + return (p); +} + +void +parameters(void) +{ + struct passwd *pw; + uid_t uid = getuid(); + + /* Find out current username. */ + if ((pw = getpwuid(uid)) == NULL) + snprintf(username, sizeof(username), "uid %u", uid); + else + snprintf(username, sizeof(username), "%s", pw->pw_name); + + strlcpy(home, pw->pw_dir, sizeof(home)); +} + +static int +make_policy(char **type, char **data, int count, char **presult, int derive) +{ + static char result[4096]; + char one[2048]; + int i; + int nfilename, isfilename; + + result[0] = '\0'; + nfilename = 0; + for (i = 0; i < count; i++) { + isfilename = 0; + /* Special case for non existing filenames */ + if (strstr(data[i], "<non-existent filename>") != NULL) { + snprintf(result, sizeof(result), + "filename%s sub \"<non-existent filename>\" then deny[enoent]", i ? "[1]" : ""); + break; + } + + if (!strcmp(type[i], "uid") || !strcmp(type[i], "gid") || + !strcmp(type[i], "argv")) + continue; + + /* Special case for system calls with more than one filename */ + if (!strcmp(type[i], "filename")) { + isfilename = 1; + nfilename++; + } + + if (strlen(result)) { + if (strlcat(result, " and ", + sizeof(result)) >= sizeof(result)) + return (-1); + } + + /* Special treatment for filenames */ + if (isfilename) { + char filename[2048]; + char *operator = "eq"; + + if (derive) { + operator = "match"; + + snprintf(filename, sizeof(filename), + "%s/*", dirname(data[i])); + } else + strlcpy(filename, data[i], sizeof(filename)); + + /* Make useful replacements */ + while (strrpl(filename, sizeof(filename), + home, "$HOME") != NULL) + ; + while (strrpl(filename, sizeof(filename), + username, "$USER") != NULL) + ; + + snprintf(one, sizeof(one), "%s%s %s \"%s\"", + type[i], isfilename && nfilename == 2 ? "[1]" : "", + operator, filename); + } else { + snprintf(one, sizeof(one), "%s eq \"%s\"", + type[i], data[i]); + } + + if (strlcat(result, one, sizeof(result)) >= sizeof(result)) + return (-1);; + } + + if (!strlen(result)) + return (-1); + + /* Normal termination */ + if (i == count) + strlcat(result, " then permit", sizeof(result)); + + *presult = result; + return (nfilename); +} + +struct plist * +make_policy_suggestion(char *info) +{ + char line[4096], *next, *p, *syscall; + char *type[MAX_SYSCALLARGS], *data[MAX_SYSCALLARGS]; + int count = 0, res; + struct plist *items; + struct policy_list *np; + + items = (struct plist *)malloc(sizeof(struct plist)); + if (items == NULL) + errx(1, "make_policy_suggestion: cannot allocate memory"); + SIMPLEQ_INIT(items); + + /* Prepare parsing of info line */ + strlcpy(line, info, sizeof(line)); + + next = line; + syscall = strsep(&next, ","); + + /* See if we can make a suggestion for this system call */ + if (next == NULL) + goto out; + next++; + if (!strncmp(next, "args: ", 6)) { + count = -1; + goto out; + } + + while (next != NULL) { + p = next; + + next = strstr(next, ", "); + if (next != NULL) { + *next = '\0'; + next += 2; + } + + type[count] = strsep(&p, ":"); + data[count] = p + 1; + + count++; + } + + res = make_policy(type, data, count, &p, 0); + if (res != -1) { + np = alloc_policy(p); + SIMPLEQ_INSERT_TAIL(items, np, next); + } + + if (res > 0) { + res = make_policy(type, data, count, &p, 1); + if (res != -1) { + np = alloc_policy(p); + SIMPLEQ_INSERT_TAIL(items, np, next); + } + } + + out: + /* Simples policy */ + p = count == -1 ? "permit" : "true then permit"; + np = alloc_policy(p); + SIMPLEQ_INSERT_TAIL(items, np, next); + + return (items); +} diff --git a/app/xsystrace/policy.h b/app/xsystrace/policy.h new file mode 100644 index 000000000..fe9d76875 --- /dev/null +++ b/app/xsystrace/policy.h @@ -0,0 +1,42 @@ +/* $OpenBSD: policy.h,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ */ +/* + * Copyright (c) 2002 Matthieu Herrb and Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/queue.h> + +struct policy_list { + char *line; + SIMPLEQ_ENTRY(policy_list) next; +}; + +SIMPLEQ_HEAD(plist, policy_list); + +extern void free_policy(struct policy_list *); +extern void parameters(void); +extern struct plist *make_policy_suggestion(char *); diff --git a/app/xsystrace/xsystrace.1 b/app/xsystrace/xsystrace.1 new file mode 100644 index 000000000..4a3ab6e00 --- /dev/null +++ b/app/xsystrace/xsystrace.1 @@ -0,0 +1,56 @@ +.\" $OpenBSD: xsystrace.1,v 1.1.1.1 2006/11/26 10:58:43 matthieu Exp $ +.\" +.\" Copyright (c) 2002 Matthieu Herrb +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" - Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" - Redistributions in binary form must reproduce the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer in the documentation and/or other materials provided +.\" with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.TH XSYSTRACE 1 OpenBSD +.SH NAME +Xsystrace \- user notification interface for systrace(1) +.SH SYNOPSIS +Xsystrace is normally started by +.I systrace(1). +Xsystrace can also be used for attaching to +.I systrace(1) +instances running in cradle mode. +.SH DESCRIPTION +.B Xsystrace +is the notification user interface for +.I systrace(1) +.SH OPTIONS +.TP 8 +.B "-C" +Attach onto existing systrace session running in cradle mode +.SH RESOURCES +Many. +.SH "SEE ALSO" +.IR X (__miscmansuffix__), +.IR systrace(1) +.SH AUTHORS +Initial version was written by Niels Provos, University of Michigan +using GTK+. +.br +This version was written by Matthieu Herrb for the OpenBSD Project. |