diff --git a/Xext/shm.c b/Xext/shm.c index 29eab06f5..7293d5b7a 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -69,6 +69,10 @@ in this Software without prior written authorization from The Open Group. #include "modinit.h" +#ifdef LG3D +#include "lgeint.h" +#endif /* LG3D */ + typedef struct _ShmDesc { struct _ShmDesc *next; int shmid; @@ -447,11 +451,22 @@ ProcShmAttach(client) * do manual checking of access rights for the credentials * of the client */ - if (shm_access(client, &(buf.shm_perm), stuff->readOnly) == -1) { - shmdt(shmdesc->addr); - xfree(shmdesc); - return BadAccess; +#ifdef LG3D + /* + ** Skip this access check when talking to the display server. + ** TODO: POSSIBLE SECURITY HOLE: make sure that only the + ** actual LG Display Server can ever set this. + */ + if (!lgeDisplayServerIsAlive) { +#endif /* LG3D */ + if (shm_access(client, &(buf.shm_perm), stuff->readOnly) == -1) { + shmdt(shmdesc->addr); + xfree(shmdesc); + return BadAccess; + } +#ifdef LG3D } +#endif /* LG3D */ shmdesc->shmid = stuff->shmid; shmdesc->refcnt = 1; @@ -1229,6 +1244,9 @@ SProcShmCreatePixmap(client) REQUEST(xShmCreatePixmapReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xShmCreatePixmapReq); +#ifdef LG3D + swapl(&stuff->pid, n); +#endif /* LG3D */ swapl(&stuff->drawable, n); swaps(&stuff->width, n); swaps(&stuff->height, n); diff --git a/Xext/xevie.c b/Xext/xevie.c index b024a622a..ed755f10c 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -127,6 +127,11 @@ int ProcQueryVersion (client) rep.sequence_number = client->sequence; rep.server_major_version = XEVIE_MAJOR_VERSION; rep.server_minor_version = XEVIE_MINOR_VERSION; + if (client->swapped) { + swaps(&rep.sequence_number, n); + swapl(&rep.server_major_version, n); + swapl(&rep.server_minor_version, n); + } WriteToClient (client, sizeof (xXevieQueryVersionReply), (char *)&rep); return client->noClientException; } @@ -153,7 +158,11 @@ int ProcStart (client) return BadAccess; rep.type = X_Reply; + rep.length = 0; rep.sequence_number = client->sequence; + if (client->swapped) { + swaps(&rep.sequence_number, n); + } WriteToClient (client, sizeof (xXevieStartReply), (char *)&rep); return client->noClientException; } @@ -163,11 +172,16 @@ int ProcEnd (client) register ClientPtr client; { xXevieEndReply rep; + register int n; XevieEnd(xevieClientIndex); rep.type = X_Reply; + rep.length = 0; rep.sequence_number = client->sequence; + if (client->swapped) { + swaps(&rep.sequence_number, n); + } WriteToClient (client, sizeof (xXevieEndReply), (char *)&rep); return client->noClientException; } @@ -181,10 +195,15 @@ int ProcSend (client) xEvent *xE; OsCommPtr oc; static unsigned char lastDetail = 0, lastType = 0; + register int n; xE = (xEvent *)&stuff->event; rep.type = X_Reply; + rep.length = 0; rep.sequence_number = client->sequence; + if (client->swapped) { + swaps(&rep.sequence_number, n); + } WriteToClient (client, sizeof (xXevieSendReply), (char *)&rep); switch(xE->u.u.type) { @@ -216,10 +235,15 @@ int ProcSelectInput (client) { REQUEST (xXevieSelectInputReq); xXevieSelectInputReply rep; + register int n; xevieMask = (long)stuff->event_mask; rep.type = X_Reply; + rep.length = 0; rep.sequence_number = client->sequence; + if (client->swapped) { + swaps(&rep.sequence_number, n); + } WriteToClient (client, sizeof (xXevieSelectInputReply), (char *)&rep); return client->noClientException; } @@ -308,7 +332,7 @@ int SProcSelectInput (client) REQUEST (xXevieSelectInputReq); swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXevieSendReq); + REQUEST_AT_LEAST_SIZE (xXevieSelectInputReq); swapl(&stuff->event_mask, n); return ProcSelectInput (client); } diff --git a/Xprint/doc/Xprt.html b/Xprint/doc/Xprt.html new file mode 100644 index 000000000..f84a3c134 --- /dev/null +++ b/Xprint/doc/Xprt.html @@ -0,0 +1,115 @@ +
Xprt — Print server for X Version 11
Xprt [-ac] [-audit level] [-pn] [-fp fontpath] [-XpFile file] [-XpSpoolerType spoolername] [:display]
Xprt is the Xprint print server + for version 11 of the X Window system for non display devices + such as printers and fax machines.
Xprint is an advanced printing system which enables X11 + applications to use devices like printers, FAX or create + documents in formats like PostScript, PCL or PDF. It may be used by + clients such as mozilla. +
Xprint is a very flexible, extensible, scaleable, client/server + print system based on ISO 10175 (and some other specs) and the X11 + rendering protocol. + Using Xprint an application can search, query and use devices like + printers, FAX machines or create documents in formats like PDF. + In particular, an application can seek a printer, query supported + attributes (like paper size, trays, fonts etc.), configure the printer + device to match it's needs and print on it like on any other X device + reusing parts of the code which is used for the video card Xserver. +
+ Although Xprt may be invoked from the command line, it is + preferable to run it as a daemon via the init script + /etc/init.d/xprint (where this script exists). +
Client programs such as mozilla will require environment + variable ${XPSERVERLIST} to be set, identifying the + "display" on which Xprt is running. This variable may be set + for all users via /etc/profile (or similar), using + /etc/init.d/xprint get_xpserverlist: +
export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist`
Many of Xprt's command line options are shared in common + with the usual X servers (see Xserver(1x)). + Commonly used options include:
The X server runs on the given display. If multiple X + servers are to run simultaneously on a host, each must + have a unique display number. Note that the standard X + server (for video displays) typically runs on display + :0. If /etc/init.d/xprint is used + to invoke Xprt, it may be configured to automatically assign an available + display number.
disables host-based access control mechanisms. Enables access + by any host, and permits any host to modify the access control + list. Use with extreme caution. This option exists primarily + for running test suites remotely.
sets the audit trail level. The default level is 1, meaning + only connection rejections are reported. Level 2 additionally + reports all successful connections and disconnects. Level 4 + enables messages from the SECURITY extension, if present, + including generation and revocation of authorizations and + violations of the security policy. Level 0 turns off the audit + trail. Audit lines are sent as standard error output.
sets the search path for fonts. This path is a comma + separated list of directories which Xprt searches for + font databases.
permits the server to continue running if it fails to + establish all of its well-known sockets (connection + points for clients), but establishes at least + one.
Sets an altername Xprinters file (see section FILES).
+ Defines the spooler system to be used for print job spooling. + Supported values in xprint.mozdev.org release 009 are: +
| aix |
| aix4 |
| bsd |
| osf |
| solaris |
| sysv |
| uxp |
| cups |
| lprng |
| other |
| none |
+ (multiple values can be specified, seperated by ':', the first active spooler will be chosen). + The default value is platform-specific and can be obtained via +
Xprt -h
. +
+ The following environment variables are recognized by the X print server + (environment variables recognized by Xprint clients are described in + Xprint(7)): + +
This environment variable points to the root + of the Xprint server configuration directory hierarchy. + If the variable is not defined, the default + path is be assumed. The default path may be + /usr/X11R6/lib/X11/xserver/, + /usr/lib/X11/xserver/, + /usr/share/Xprint/xserver/ or + /usr/openwin/server/etc/XpConfig, depending on the + system, and may be configured in /etc/init.d/xprint.
+ This environment variable selects the locale settings used by the Xprint server. + Xprt allows language-specific settings (stored in ${XPCONFIGDIR}/${LANG}/print/) + which will override the default settings (stored in ${XPCONFIGDIR}/C/print/). + If ${LANG} is not set "C" is assumed. +
+ `Xprinters' is the top most configuration file. It tells + Xprt which specific printer names (e.g. mylaser) should + be supported, and whether lpstat(1) or other commands + should be used to automatically supplement the list of + printers. +
+ The `printer' file maps printer names to model + configurations (see `model-config' below). For example, + "mylaser" could be mapped to a "HPDJ1600C", and all other + arbitrary printers could be mapped to a default, such as + "HPLJ4SI". When depending on lpstat(1) in the Xprinters + file, setting up defaults in `printer' becomes all the + more important. +
+ The `document' file specifies the initial document values + for any print jobs. For example, which paper tray to + use, what default resolution, etc. +
+ The `job' file specifies the initial job values for any + print jobs. For example, "notification-profile" can be + set so that when a print job is successfully sent to a + printer, e-mail is sent to the user. +
+ The `model-config' file has attributes that describe the + printer model's capabilities and default settings. + Printer model fonts may also be present. The model-config + file also identifies the print ddx driver to be used. + + For each printer model supported, a complete hierarchy of + files should exist. In most cases, these files do not + need to be modified. +
+ The print ddx drivers can have highly specific + configuration files to control their behavior. In most + cases, these files do not need to be modified. +
Xprint(7), X11(7), xplsprinters(1x), xprehashprinterlist(1x), xphelloworld(1x), xpxmhelloworld(1x), xpawhelloworld(1x), xpxthelloworld(1x), xpsimplehelloworld(1x), Xserver(1x), libXp(3x), libXprintUtils(3x), libXprintAppUtils(3x), XmPrintShell(3x), XawPrintShell(3x), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
+ This manual page was written by + Drew Parsons <dparsons@debian.org> and + Roland Mainz <roland.mainz@nrubsig.org>, + with some help from the man page at + http://www.sins.com.au/unix/manpages/Xprt.html and the XFree86 + man page for Xserver(1). +