summaryrefslogtreecommitdiff
path: root/Xtransint.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove client-side abstract socket supportDemi Marie Obenour2023-03-191-1/+3
| | | | | | | | | | CVE-2020-25697 and the Flatpak documentation show that clients using abstract sockets without mutual authentication is unsafe. TRANS_ABSTRACT remains supported, but it is now a no-op on the client side. Abstract sockets are still supported for servers, as the X server authenticates the client via other methods. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
* Use font server ErrorF/VErrorF instead of private versionsKeith Packard2022-08-201-3/+4
| | | | | | | | | | | | | | | | | | | XTrans creates custom ErrorF/VErrorF functions when the including project doesn't provide them, however the test for that is weak and xtrans ends up using the private versions for the font server as well. This means that all xtrans error messages will not be included in the font server log. It also causes redefinition warnings when building the font server (which is how this problem was identified). However, the font server doesn't currently provide a VErrorF function, so instead of just always relying on the font server to provide these functions, this patch uses a new TRANS_HAS_ERRORF define to select whether the project-provided or internal versions will be used. A patch to the font server that adds VErrorF and defines TRANS_HAS_ERRORF will be required to fix this bug. Signed-off-by: Keith Packard <keithp@keithp.com>
* move is_numeric to Xtranssock.c and only define for TCPCONN or TRANS_REOPENKeith Packard2022-08-201-5/+0
| | | | | | Don't define this function unless it is actually going to be used. Signed-off-by: Keith Packard <keithp@keithp.com>
* Delete SCO supportAdam Jackson2019-09-301-1/+1
| | | | Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* unifdef USG and NCRAdam Jackson2019-09-301-1/+1
| | | | Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Revert "Make FreeConnInfo static"Adam Jackson2016-09-011-4/+0
| | | | | | | | | | | | | <anholt> ajax: 75419e6b6d985ea8796f05d1acb5e154b065c9b9 of xtrans also seems to have broken xtest. And indeed it does, xts5 knows a fair amount about xlib internals for some reason. Whether that's cromulent or not, we want to be able to run automatic tests from top-of-tree, so we can't leave this broken. This reverts commit 75419e6b6d985ea8796f05d1acb5e154b065c9b9. Signed-off-by: Adam Jackson <ajax@redhat.com>
* Make FreeConnInfo staticAdam Jackson2016-05-191-0/+4
| | | | | | | | libX11 used to need this in the XOpenDisplay code, but hasn't since xcb became mandatory. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
* Remove CLTS codeAdam Jackson2016-05-191-32/+0
| | | | | | | Never been used, as far as I can tell. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
* Remove support for SysV on x86 platforms other than Solaris & SCOAlan Coopersmith2015-12-031-4/+4
| | | | | | | | | No other x86 SysV platforms have ever been supported in the modular build systems, so we don't need to keep carrying around a bunch of ifdef's for them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
* Replace 'sun' with '__sun'Richard PALO2015-11-281-2/+2
| | | | | | | | | Globally replace #ifdef and #if defined usage of 'sun' with '__sun' such that strict ISO compiler modes such as -ansi or -std=c99 can be used. Signed-off-by: Richard PALO <richard@NetBSD.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add const qualifiers to TRANS(OpenC{L,O}TS{Server,Client}) argsAlan Coopersmith2014-08-241-12/+12
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add const qualifiers to TRANS(Connect) argsAlan Coopersmith2014-08-241-2/+2
| | | | | | | Also required constifying UnixHostReallyLocal, since SocketUNIXConnect passes the host arg through to it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add const qualifiers to TRANS(CreateListener) port argsAlan Coopersmith2014-08-231-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add const qualifiers to TRANS(Reopen...) port argsAlan Coopersmith2014-08-231-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Define TRANS_RECEIVED flag for transportsŁukasz Stelmach2014-01-131-0/+1
| | | | | | | | | The flag is to be used to mark transports related to sockets received from systemd. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
* Don't restrict FD passing to Linux & SolarisMark Kettenis2013-12-141-4/+0
| | | | | | Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Allow XTRANS_SEND_FDS on Solaris as wellAlan Coopersmith2013-11-071-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Actually disable all of the FD passing code unless XTRANS_SEND_FDS is setKeith Packard2013-11-071-0/+2
| | | | | | Stick all of the functions relating to FD passing inside Signed-off-by: Keith Packard <keithp@keithp.com>
* Don't include file descriptor passing code by defaultMark Kettenis2013-11-061-1/+3
| | | | | | | | | | | | Leave it up to the consumer to request this functionality by defining XTRANS_SEND_FDS. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> v2 - make sure this is only defined on systems where the code actually works (Linux for now)
* Add APIs to send file descriptors through the networkKeith Packard2013-10-311-0/+24
| | | | | | Exposes new TRANS(SendFd)/TRANS(RecvFd) APIs. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add const attributes to fix gcc -Wwrite-strings warningsAlan Coopersmith2011-10-011-2/+2
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Add _X_UNUSED attributes to silence unused parameter warningsAlan Coopersmith2011-10-011-0/+4
| | | | | | | | Not all the transport variants use all the arguments to every function, but as long as one transport type needs it, they all get the args passed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Convert PRMSG macro to prmsg inline functionAlan Coopersmith2011-10-011-47/+53
| | | | | | | | | | Allows using varargs to have the correct number of arguments passed to get rid of the many gcc warnings about variable printf format strings, and to reduce the duplication from having 5 implementations of the PRMSG macro depending on the debug options defined & output method used. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Fix warnings about static functions declared but never definedAlan Coopersmith2011-10-011-1/+6
| | | | | | | | | | Add #define XTRANS_TRANSPORT_C to transport.c and check for it before making static function declarations and other bits needed only when compiling the Xtrans code itself, not from other sources that include the Xtransint.h header for the struct definitions. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Strip trailing whitespaceAlan Coopersmith2011-09-161-6/+6
| | | | | | | Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Silence warnings when building with clangJeremy Huddleston2011-04-241-0/+10
| | | | | | | | | | | | | | | /usr/X11/include/X11/Xtrans/Xtransint.h:349:12: error: unused function 'is_numeric' [-Werror,-Wunused-function] static int is_numeric ( ^ /usr/X11/include/X11/Xtrans/Xtransint.h:354:12: error: unused function 'trans_mkdir' [-Werror,-Wunused-function] static int trans_mkdir ( ^ In file included from /usr/X11/include/X11/Xtrans/transport.c:67: ... fatal error: too many errors emitted, stopping now [-ferror-limit=] Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Xtransint.h: Add missing ' in commentAlan Coopersmith2010-11-061-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix ifdef checks for SVR4 to do the right thing on SolarisAlan Coopersmith2009-07-301-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Constify path argument to trans_mkdir()Alan Coopersmith2009-04-241-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Update is_numeric base on the declaration change in ↵Benjamin Close2009-02-091-1/+1
| | | | | | 389e01fb51ba2d708015e27d8fc17c88a0e55802 Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
* Revert "Fix "XXX declared 'static' but not defined""Benjamin Close2009-02-091-0/+12
| | | | | | | | | | | | | | | | This reverts commit d192bac409fe5ef99fa9fb9b5a0d5f656f0f1412. When transport.c is directly include (as in the case of libICE:icetrans.c:32) Xtranssock.c must be included before Xtransutil.c in order for the socket structures to be included. Including Xtransutil.c after Xtranssock.c requires is_number and trans_mkdir to be defined. This reintroduces the warning until a cleaner solution can be found but fixes the build. Found by: Tinderbox Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
* Fix "XXX declared 'static' but not defined"Tomas Carnecky2009-02-051-12/+0
| | | | | | | | | | | | | The functions are declared static in Xtransint.h but are defined in Xtransutil.c. So when someone (xserver/os/connection.c) incuded Xtransint.h, gcc would throw the warning. I removed the declarations from the header and rearranged includes in transport.c so that Xtransutil.c is included just after Xtransint.h. This way the functions are still defined for the files that need them (Xtranssock.c, Xtranstli.c). Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Fix "warning: format not a string literal and no format arguments"Tomas Carnecky2009-02-051-4/+4
| | | | | Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Drastically simplify TRANS_OPEN_MAX.Adam Jackson2008-08-071-49/+0
| | | | If your OS doesn't have sysconf(3), then life is already hard for you.
* Massive ifdef cleanup, dropping a ton of unsupported platform code.Adam Jackson2008-08-071-23/+4
|
* Added a flag to enable "The OS already took care of securing this, please ↵Jeremy Huddleston2008-08-051-0/+1
| | | | skip checking xauth" for use with Apple launchd sockets.
* Add support for the abstract socket namespace under Linux.Adam Jackson2008-03-051-1/+2
| | | | | | | | | | | Unlike normal unix sockets, the abstract namespace is not bound to the filesystem. This has some notable advantages; /tmp need not exist, the socket directory need not have magic permissions, etc. xtrans servers will listen on both the normal and abstract socket endpoints; clients will attempt to connect to the abstract socket before connecting to the corresponding filesystem socket. Based on a patch by Bill Crawford.
* Fixed #ifdef checks that were using i386 to use __i386__Jeremy Huddleston2008-02-101-3/+3
| | | | | | | | | | | | | | | """ It's simply obsolete, sloppy, compiler namespace pollution. The compiler is not allowed to predefine symbols that might conflict with ordinary identifiers. For backwards compatibility gcc currently predefines i386 when compiling for x86 32-bit (but not 64-bit), but that will go away. It is also not defined if you specify -ansi when invoking the compiler, because then it is seriously standards compliant. Other compilers shouldn't define it either. Correct code shouldn't rely on it being defined. However __i386__ is safe and proper. """
* removed cvs tagsBen Byer2007-11-141-6/+1
|
* Merge more fixes from Solaris xtransAlan Coopersmith2006-08-221-2/+2
| | | | | Convert sprintf -> snprintf Don't use fake readv/writev on Solaris x86.
* See ChangeLog entry 2005-11-07 for details.XORG-6_8_99_903XORG-6_8_99_902Kean Johnson2005-11-081-3/+3
|
* Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.XORG-6_8_99_14Daniel Stone2005-07-031-1/+1
| | | | | | | | Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all source files in the xserver/xorg tree, predicated on defines of HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to <X11/fonts/foo.h>.
* Merging XORG-CURRENT into trunkXACE-SELINUX-MERGEEgbert Eich2004-04-231-1/+2
|
* Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich2004-03-141-1/+1
|
* Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich2004-03-031-1/+1
|
* readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich2004-02-261-1/+1
|
* Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich2004-02-261-1/+1
|
* XFree86 4.3.99.901 (RC 1)xf86-4_3_99_901Kaleb Keithley2003-12-041-2/+2
|
* XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16Kaleb Keithley2003-11-251-78/+82
|
* XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley2003-11-141-62/+110
|