update to libICE 1.0.10
This commit is contained in:
parent
a400859a9c
commit
c6568d8569
@ -1,3 +1,408 @@
|
||||
commit 8e6a14c63d6b73cde87cb331439f2a4d19cba5b9
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Jul 14 10:37:25 2019 -0700
|
||||
|
||||
libICE 1.0.10
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit b6aad584c1dc278364c295165512b5f5b98c173e
|
||||
Author: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Thu Apr 11 09:05:15 2019 +0200
|
||||
|
||||
cleanup: Separate variable assignment and test
|
||||
|
||||
Assigning and testing a value in a single statement hinders code clarity
|
||||
and may confuses static code analyzers.
|
||||
|
||||
Separate the assignment and the test for clarity.
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
commit 772e5b0fdfc9dbd8bec070bd0c4c7eb5565df2ee
|
||||
Author: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Wed Apr 10 11:15:11 2019 +0200
|
||||
|
||||
_IceRead: Avoid possible use-after-free
|
||||
|
||||
`_IceRead()` gets called from multiple places which do not expect the
|
||||
connection to be freed.
|
||||
|
||||
Do not free the connection data in `_IceRead()` to avoid potential
|
||||
use-after-free issue in the various callers.
|
||||
|
||||
The connection data will be freed eventually in `ProcessWantToClose()`,
|
||||
so not freeing it in `_IceRead()` should not introduce an memory leak.
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
commit 1493beba2aa03bdadeed8b4fa5d424df6e113071
|
||||
Author: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Wed Apr 10 11:01:31 2019 +0200
|
||||
|
||||
IceListenForWellKnownConnections: Fix memleak
|
||||
|
||||
The function `_IceTransMakeAllCOTSServerListeners` allocates memory for
|
||||
`transConns` which is leaked in case of error.
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
commit a67a477eefdc93c32fa82da6ff0b4e69dd4c2ccb
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Mar 24 15:29:34 2019 -0700
|
||||
|
||||
IceWritePad: always use zero values for pad bytes
|
||||
|
||||
Previously it would just bump the pointer in the buffer leaving
|
||||
whatever values were previously there in place.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 2318ace3340009c44e78eab094f159f0e0b4a197
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Mar 24 14:36:10 2019 -0700
|
||||
|
||||
IceOpenConnection: check for malloc failure on connect_to_you too
|
||||
|
||||
Fixes: https://gitlab.freedesktop.org/xorg/lib/libice/issues/4
|
||||
|
||||
Reported-by: mahendra <mahendra.n@samsung.com>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit b484311c929a1b64966d89da92fafce7263006e1
|
||||
Author: Allison Lortie <desrt@desrt.ca>
|
||||
Date: Tue Jun 14 16:09:46 2016 -0400
|
||||
|
||||
authutil: support $XDG_RUNTIME_DIR/ICEauthority
|
||||
|
||||
If we find that $XDG_RUNTIME_DIR is set (and $ICEAUTHORITY is not), then
|
||||
the ICEauthority file is stored in the XDG_RUNTIME_DIR instead of the
|
||||
home directory, and without a leading dot.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=49173
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 48ed5e04b5a8ba64dcfeea090cf3a32d3087b749
|
||||
Author: Allison Lortie <desrt@desrt.ca>
|
||||
Date: Tue Jun 14 16:08:21 2016 -0400
|
||||
|
||||
authutil: fix an out-of-bounds access
|
||||
|
||||
There is a theoretical edge case where the $HOME environment variable
|
||||
could be set to the empty string. IceAuthFileName() unconditionally
|
||||
checks index 1 of this string, which is out of bounds.
|
||||
|
||||
Fix that up by rejecting empty strings in the same way as we reject
|
||||
NULL.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=49173
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 468b83ec4810b4ea2373182b5801f998f3dcd471
|
||||
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
Date: Mon Jul 30 20:50:58 2018 +0200
|
||||
|
||||
Always terminate strncpy results.
|
||||
|
||||
The function strncpy does not guarantee to append a terminating
|
||||
NUL character to the destination.
|
||||
|
||||
This patch merges libSM's way of handling this issue into libICE.
|
||||
|
||||
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 1cc4ae8648590f04557a20c8d88d39cef7fe8119
|
||||
Author: walter harms <wharms@bfs.de>
|
||||
Date: Thu Sep 7 18:52:13 2017 +0200
|
||||
|
||||
iceauth.c: FIX warning: unused variable 'ret' in 'arc4random_buf'
|
||||
|
||||
commit ff5e59f32255913bb1cdf51441b98c9107ae165b left ret outside the #if
|
||||
causing a gcc warning:
|
||||
|
||||
In function 'arc4random_buf':
|
||||
iceauth.c:89:13: warning: unused variable 'ret' [-Wunused-variable]
|
||||
|
||||
fixed by moving #if 1 up
|
||||
|
||||
Signed-off-by: Walter Harms <wharms@bfs.de>
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit ccbcae7d3409789bf346ca35963264d064f54cba
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Fri Dec 7 19:29:55 2018 -0800
|
||||
|
||||
Update configure.ac bug URL for gitlab migration
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit e72ca90879db149bbee6232dd78a565e630e917d
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Nov 18 21:48:59 2018 -0800
|
||||
|
||||
Update README for gitlab migration
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit dc73ec034c9083b8c7d980e80eb6d4c88bcfaa51
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sat Nov 10 13:13:45 2018 -0800
|
||||
|
||||
Remove obsolete B16 & B32 tags in struct definitions
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit f66955f7250d7c150dfb97862878acc2222781e5
|
||||
Author: walter harms <wharms@bfs.de>
|
||||
Date: Fri Sep 8 20:03:03 2017 +0200
|
||||
|
||||
make IceProtocolShutdown() more readable
|
||||
|
||||
I found IceProtocolShutdown() hard to read only to find that was
|
||||
it does it aktually very simple. So i rearranged the code to make
|
||||
it more readable.
|
||||
|
||||
Signed-off-by: Walter Harms <wharms@bfs.de>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
[Emil Velikov: whitespace fixes]
|
||||
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
|
||||
|
||||
commit 936dcaac07f7db569ed91a34e0a4b5944aac205f
|
||||
Author: walter harms <wharms@bfs.de>
|
||||
Date: Fri Sep 8 19:59:17 2017 +0200
|
||||
|
||||
Drop NULL check prior to free()
|
||||
|
||||
free() can handle NULL just fine - remove the check.
|
||||
|
||||
Signed-off-by: Walter Harms <wharms@bfs.de>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
||||
|
||||
commit 43644931cb9cb5cc92391f6f5431535b9b7a3f24
|
||||
Author: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
Date: Fri Jul 7 11:23:48 2017 +0100
|
||||
|
||||
Make sure string is never NULL
|
||||
|
||||
`error_message` is passed in to strncpy() without any check, which
|
||||
doesn't handle NULL itself, so let's make it a valid empty string in
|
||||
cases where it was NULL.
|
||||
|
||||
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
Acked-by: Walter Harms <wharms@bfs.de>
|
||||
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
||||
|
||||
commit e8c21056134498c49733f6baf572ffbb051ed886
|
||||
Author: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
Date: Fri Jul 7 11:23:47 2017 +0100
|
||||
|
||||
Make sure error_message is a free-able string
|
||||
|
||||
Similar to the previous commit, assigning a static string would crash
|
||||
upon freeing.
|
||||
|
||||
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
Acked-by: Walter Harms <wharms@bfs.de>
|
||||
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
||||
|
||||
commit 7a7844bf5ade915268fe7f9b292908c6cd75f3ba
|
||||
Author: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
Date: Fri Jul 7 11:23:46 2017 +0100
|
||||
|
||||
Make sure errorStr is a free-able string
|
||||
|
||||
If the `errorClass` isn't handled by the switch, `errorStr`'s initial
|
||||
value would be a pointer to some static memory with an empty string,
|
||||
and freeing it would most likely crash.
|
||||
|
||||
Let's set it to NULL instead, as is done in other similar places.
|
||||
|
||||
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
||||
Acked-by: Walter Harms <wharms@bfs.de>
|
||||
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
||||
|
||||
commit 7ef9680caa8c223a09beb637e26fd3471128e6ba
|
||||
Author: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Date: Sun May 8 09:19:36 2016 +0100
|
||||
|
||||
configure.ac: set TRANS_CLIENT/SERVER
|
||||
|
||||
Similar to ICE_t just set the define globally and remove the multiple
|
||||
definitions throughout the tree
|
||||
|
||||
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)
|
||||
|
||||
commit ab64a947b5de5b778f31ede9cfce386566023a14
|
||||
Author: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Date: Sun May 8 09:19:35 2016 +0100
|
||||
|
||||
Kill off local ICE_t definitions
|
||||
|
||||
Already defined at global scale in configure.ac
|
||||
|
||||
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)
|
||||
|
||||
commit f4c00d345edf3dad5893b50ff0ae7cd3e0cfd780
|
||||
Author: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Date: Sun May 8 09:19:34 2016 +0100
|
||||
|
||||
Remove unneeded ^L symbols.
|
||||
|
||||
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)
|
||||
|
||||
commit d603d7d7d989c4ff1094810e9fcf2a29bc00bb0c
|
||||
Author: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Date: Sun May 8 09:19:33 2016 +0100
|
||||
|
||||
Kill off Time_t macro
|
||||
|
||||
Analogous to previous commit, including the megacommit that removed the
|
||||
need for it.
|
||||
|
||||
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)
|
||||
|
||||
commit 82250f26fc76d7b7574cfd472646a98e325d944a
|
||||
Author: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Date: Sun May 8 09:19:32 2016 +0100
|
||||
|
||||
Kill off Strstr macro
|
||||
|
||||
Directly use the strstr function as opposed to wrapping it in a macro.
|
||||
The latter is no longer needed as of
|
||||
|
||||
commit 72e353567f8927996a26e72848d86f692c3f0737
|
||||
Author: Kaleb Keithley <kaleb@freedesktop.org>
|
||||
Date: Fri Nov 14 16:48:46 2003 +0000
|
||||
|
||||
XFree86 4.3.0.1
|
||||
|
||||
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (IRC)
|
||||
|
||||
commit ff5e59f32255913bb1cdf51441b98c9107ae165b
|
||||
Author: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
||||
Date: Tue Apr 4 19:12:53 2017 +0200
|
||||
|
||||
Use getentropy() if arc4random_buf() is not available
|
||||
|
||||
This allows to fix CVE-2017-2626 on Linux platforms without pulling in
|
||||
libbsd.
|
||||
The libc getentropy() is available since glibc 2.25 but also on OpenBSD.
|
||||
For Linux, we need at least a v3.17 kernel. If the recommended
|
||||
arc4random_buf() function is not available, emulate it by first trying
|
||||
to use getentropy() on a supported glibc and kernel. If the call fails,
|
||||
fall back to the current (partly vulnerable) code.
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
|
||||
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 1746abbb1ae1c41ba29c14895c5bd3f1334faef5
|
||||
Author: Mihail Konev <k.mvc@ya.ru>
|
||||
Date: Thu Jan 26 13:52:49 2017 +1000
|
||||
|
||||
autogen: add default patch prefix
|
||||
|
||||
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
|
||||
|
||||
commit 3aa14db63fefb7634b1bd4370e33ba14c4ea90ae
|
||||
Author: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Date: Mon Mar 9 12:00:52 2015 +0000
|
||||
|
||||
autogen.sh: use quoted string variables
|
||||
|
||||
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
|
||||
fall-outs, when they contain space.
|
||||
|
||||
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit d41c57eaa0c1474acf0a6fb271f22106e3070016
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue Jan 24 10:32:07 2017 +1000
|
||||
|
||||
autogen.sh: use exec instead of waiting for configure to finish
|
||||
|
||||
Syncs the invocation of configure with the one from the server.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
||||
|
||||
commit ac4bb20e74e064b219de70e9b54516a921fdb7c3
|
||||
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
Date: Tue Nov 22 20:13:29 2016 +0100
|
||||
|
||||
Fix use after free on subsequent calls
|
||||
|
||||
The function IceAuthFileName is vulnerable to a use after free. The
|
||||
flaw can be triggered by calling the function three times:
|
||||
|
||||
- First call succeeds and stores the path in buf, a dynamically
|
||||
allocated buffer with size bsize.
|
||||
- Second call fails due to out of memory. It frees buf, but keeps
|
||||
the old size in bsize.
|
||||
- Third call only checks if bsize is large enough. Then it uses
|
||||
buf without allocating it again -- the use after free happens.
|
||||
|
||||
In order to exploit this, an attacker must change environment variables
|
||||
between each call, namely ICEAUTHORITY or HOME. It also takes subsequent
|
||||
calls. Due to these limitations, I don't consider this to be of high
|
||||
priority.
|
||||
|
||||
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
|
||||
|
||||
commit b1720edc9b9f3e7a05caa3fcd81761e5818ea255
|
||||
Author: Remko van der Vossen <bugs@yuugen.jp>
|
||||
Date: Sun Jul 19 08:34:11 2015 -0700
|
||||
|
||||
Bug 90616 - libICE build fails on array bounds check
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=90616
|
||||
|
||||
Recent versions of gcc have array bounds checking turned on by default,
|
||||
this leads to build failures of libICE. As the _IceVersionCount variable
|
||||
in ICElibint.h is not declared const the compiler cannot assume that the
|
||||
nested for loop in ProcessConnectionSetup stays within bounds.
|
||||
|
||||
The simple fix is of course to change the declarations of _IceVersionCount,
|
||||
_IceVersions, and the local variable myVersionCount to const declarations.
|
||||
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 8a511dad53774693ed818d54d7896e1663942b18
|
||||
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
Date: Sat Sep 13 17:13:44 2014 +0100
|
||||
|
||||
Include unistd.h for getpid()
|
||||
|
||||
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
Reviewed-by: David Macek <david.macek.0@gmail.com>
|
||||
|
||||
commit fd22b62ae6380ddb00fa4c750f5ce175d2a6e76f
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Sep 14 13:08:17 2014 -0700
|
||||
|
||||
spec: Convert troff \*Q..\*U to DocBook <quote>...</quote>
|
||||
|
||||
Reported-by: Jasper St. Pierre <jstpierre@mecheye.net>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
|
||||
|
||||
commit 0dfab4253e26d5c6e5f058126eb5e9f7a7732ae8
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Fri Jun 6 18:28:28 2014 -0700
|
||||
|
@ -19,3 +19,5 @@ if LINT
|
||||
lint:
|
||||
(cd src && $(MAKE) $(MFLAGS) lint)
|
||||
endif LINT
|
||||
|
||||
EXTRA_DIST = README.md
|
||||
|
@ -51,7 +51,7 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(srcdir)/ice.pc.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||
ChangeLog INSTALL compile config.guess config.sub depcomp \
|
||||
@ -324,6 +324,7 @@ SUBDIRS = doc specs src
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = ice.pc
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
EXTRA_DIST = README.md
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
libICE - Inter-Client Exchange Library
|
||||
|
||||
Documentation for this API can be found in the doc directory of the source
|
||||
code, or online at:
|
||||
|
||||
http://xorg.freedesktop.org/releases/X11R7.0/doc/PDF/ICElib.pdf
|
||||
|
||||
All questions regarding this software should be directed at the
|
||||
Xorg mailing list:
|
||||
|
||||
http://lists.freedesktop.org/mailman/listinfo/xorg
|
||||
|
||||
Please submit bug reports to the Xorg bugzilla:
|
||||
|
||||
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
||||
|
||||
The master development code repository can be found at:
|
||||
|
||||
git://anongit.freedesktop.org/git/xorg/lib/libICE
|
||||
|
||||
http://cgit.freedesktop.org/xorg/lib/libICE
|
||||
|
||||
For patch submission instructions, see:
|
||||
|
||||
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
|
||||
|
||||
For more information on the git code manager, see:
|
||||
|
||||
http://wiki.x.org/wiki/GitPage
|
||||
|
23
lib/libICE/README.md
Normal file
23
lib/libICE/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
libICE - Inter-Client Exchange Library
|
||||
--------------------------------------
|
||||
|
||||
Documentation for this API can be found in the doc directory of the source
|
||||
code, or online at:
|
||||
|
||||
https://www.x.org/releases/current/doc/libICE/
|
||||
|
||||
All questions regarding this software should be directed at the
|
||||
Xorg mailing list:
|
||||
|
||||
https://lists.x.org/mailman/listinfo/xorg
|
||||
|
||||
The master development code repository can be found at:
|
||||
|
||||
https://gitlab.freedesktop.org/xorg/lib/libICE
|
||||
|
||||
Please submit bug reports and requests to merge patches there.
|
||||
|
||||
For patch submission instructions, see:
|
||||
|
||||
https://www.x.org/wiki/Development/Documentation/SubmittingPatches
|
||||
|
278
lib/libICE/aclocal.m4
vendored
278
lib/libICE/aclocal.m4
vendored
@ -8606,32 +8606,63 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 1 (pkg-config-0.24)
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
dnl serial 11 (pkg-config-0.29.1)
|
||||
dnl
|
||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful, but
|
||||
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
dnl 02111-1307, USA.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if you
|
||||
dnl distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by Autoconf, you may include it under
|
||||
dnl the same distribution terms that you use for the rest of that
|
||||
dnl program.
|
||||
|
||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
# ----------------------------------
|
||||
dnl PKG_PREREQ(MIN-VERSION)
|
||||
dnl -----------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Verify that the version of the pkg-config macros are at least
|
||||
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
||||
dnl installed version of pkg-config, this checks the developer's version
|
||||
dnl of pkg.m4 when generating configure.
|
||||
dnl
|
||||
dnl To ensure that this macro is defined, also add:
|
||||
dnl m4_ifndef([PKG_PREREQ],
|
||||
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
||||
dnl
|
||||
dnl See the "Since" comment for each macro you use to see what version
|
||||
dnl of the macros you require.
|
||||
m4_defun([PKG_PREREQ],
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.1])
|
||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||
])dnl PKG_PREREQ
|
||||
|
||||
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
dnl ----------------------------------
|
||||
dnl Since: 0.16
|
||||
dnl
|
||||
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
||||
dnl first found in the path. Checks that the version of pkg-config found
|
||||
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
||||
dnl used since that's the first version where most current features of
|
||||
dnl pkg-config existed.
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
@ -8653,18 +8684,19 @@ if test -n "$PKG_CONFIG"; then
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
])dnl PKG_PROG_PKG_CONFIG
|
||||
|
||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
# only at the first occurence in configure.ac, so if the first place
|
||||
# it's called might be skipped (such as if it is within an "if", you
|
||||
# have to call PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------------------------------
|
||||
dnl Since: 0.18
|
||||
dnl
|
||||
dnl Check to see whether a particular set of modules exists. Similar to
|
||||
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
dnl
|
||||
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
dnl only at the first occurence in configure.ac, so if the first place
|
||||
dnl it's called might be skipped (such as if it is within an "if", you
|
||||
dnl have to call PKG_CHECK_EXISTS manually
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
@ -8674,8 +8706,10 @@ m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
dnl ---------------------------------------------
|
||||
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
||||
dnl pkg_failed based on the result.
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
@ -8687,10 +8721,11 @@ m4_define([_PKG_CONFIG],
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
])dnl _PKG_CONFIG
|
||||
|
||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
# -----------------------------
|
||||
dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
dnl ---------------------------
|
||||
dnl Internal check to see if pkg-config supports short errors.
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
@ -8698,19 +8733,17 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
#
|
||||
# Note that if there is a possibility the first call to
|
||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
#
|
||||
#
|
||||
# --------------------------------------------------------------
|
||||
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Since: 0.4.0
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
@ -8764,16 +8797,40 @@ else
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
])dnl PKG_CHECK_MODULES
|
||||
|
||||
|
||||
# PKG_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable pkgconfigdir as the location where a module
|
||||
# should install pkg-config .pc files. By default the directory is
|
||||
# $libdir/pkgconfig, but the default can be changed by passing
|
||||
# DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
# parameter.
|
||||
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Checks for existence of MODULES and gathers its build flags with
|
||||
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
||||
dnl and VARIABLE-PREFIX_LIBS from --libs.
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
||||
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
||||
dnl configure.ac.
|
||||
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
_save_PKG_CONFIG=$PKG_CONFIG
|
||||
PKG_CONFIG="$PKG_CONFIG --static"
|
||||
PKG_CHECK_MODULES($@)
|
||||
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
||||
])dnl PKG_CHECK_MODULES_STATIC
|
||||
|
||||
|
||||
dnl PKG_INSTALLDIR([DIRECTORY])
|
||||
dnl -------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable pkgconfigdir as the location where a module
|
||||
dnl should install pkg-config .pc files. By default the directory is
|
||||
dnl $libdir/pkgconfig, but the default can be changed by passing
|
||||
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
dnl parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
@ -8784,16 +8841,18 @@ AC_ARG_WITH([pkgconfigdir],
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_INSTALLDIR
|
||||
])dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
# module should install arch-independent pkg-config .pc files. By
|
||||
# default the directory is $datadir/pkgconfig, but the default can be
|
||||
# changed by passing DIRECTORY. The user can override through the
|
||||
# --with-noarch-pkgconfigdir parameter.
|
||||
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
||||
dnl --------------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
dnl module should install arch-independent pkg-config .pc files. By
|
||||
dnl default the directory is $datadir/pkgconfig, but the default can be
|
||||
dnl changed by passing DIRECTORY. The user can override through the
|
||||
dnl --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
@ -8804,7 +8863,24 @@ AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_NOARCH_INSTALLDIR
|
||||
])dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------
|
||||
dnl Since: 0.28
|
||||
dnl
|
||||
dnl Retrieves the value of the pkg-config variable for the given module.
|
||||
AC_DEFUN([PKG_CHECK_VAR],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||
|
||||
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
@ -9829,7 +9905,7 @@ AC_SUBST([am__untar])
|
||||
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
dnl
|
||||
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||
dnl copy of this software and associated documentation files (the "Software"),
|
||||
@ -9866,7 +9942,7 @@ dnl DEALINGS IN THE SOFTWARE.
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.19.0])
|
||||
m4_define([vers_have], [1.19.2])
|
||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
@ -9944,6 +10020,17 @@ AC_DEFUN([XORG_MANPAGE_SECTIONS],[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
case $host_os in
|
||||
solaris*)
|
||||
# Solaris 2.0 - 11.3 use SysV man page section numbers, so we
|
||||
# check for a man page file found in later versions that use
|
||||
# traditional section numbers instead
|
||||
AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
|
||||
[SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
|
||||
;;
|
||||
*) SYSV_MAN_SECTIONS=false ;;
|
||||
esac
|
||||
|
||||
if test x$APP_MAN_SUFFIX = x ; then
|
||||
APP_MAN_SUFFIX=1
|
||||
fi
|
||||
@ -9959,9 +10046,9 @@ if test x$LIB_MAN_DIR = x ; then
|
||||
fi
|
||||
|
||||
if test x$FILE_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) FILE_MAN_SUFFIX=4 ;;
|
||||
*) FILE_MAN_SUFFIX=5 ;;
|
||||
case $SYSV_MAN_SECTIONS in
|
||||
true) FILE_MAN_SUFFIX=4 ;;
|
||||
*) FILE_MAN_SUFFIX=5 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$FILE_MAN_DIR = x ; then
|
||||
@ -9969,9 +10056,9 @@ if test x$FILE_MAN_DIR = x ; then
|
||||
fi
|
||||
|
||||
if test x$MISC_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) MISC_MAN_SUFFIX=5 ;;
|
||||
*) MISC_MAN_SUFFIX=7 ;;
|
||||
case $SYSV_MAN_SECTIONS in
|
||||
true) MISC_MAN_SUFFIX=5 ;;
|
||||
*) MISC_MAN_SUFFIX=7 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$MISC_MAN_DIR = x ; then
|
||||
@ -9979,9 +10066,9 @@ if test x$MISC_MAN_DIR = x ; then
|
||||
fi
|
||||
|
||||
if test x$DRIVER_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) DRIVER_MAN_SUFFIX=7 ;;
|
||||
*) DRIVER_MAN_SUFFIX=4 ;;
|
||||
case $SYSV_MAN_SECTIONS in
|
||||
true) DRIVER_MAN_SUFFIX=7 ;;
|
||||
*) DRIVER_MAN_SUFFIX=4 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$DRIVER_MAN_DIR = x ; then
|
||||
@ -9989,9 +10076,9 @@ if test x$DRIVER_MAN_DIR = x ; then
|
||||
fi
|
||||
|
||||
if test x$ADMIN_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) ADMIN_MAN_SUFFIX=1m ;;
|
||||
*) ADMIN_MAN_SUFFIX=8 ;;
|
||||
case $SYSV_MAN_SECTIONS in
|
||||
true) ADMIN_MAN_SUFFIX=1m ;;
|
||||
*) ADMIN_MAN_SUFFIX=8 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$ADMIN_MAN_DIR = x ; then
|
||||
@ -10252,13 +10339,24 @@ m4_ifval([$1],
|
||||
fi])
|
||||
|
||||
# Test for the ability of xmlto to generate a text target
|
||||
#
|
||||
# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
|
||||
# following test for empty XML docbook files.
|
||||
# For compatibility reasons use the following empty XML docbook file and if
|
||||
# it fails try it again with a non-empty XML file.
|
||||
have_xmlto_text=no
|
||||
cat > conftest.xml << "EOF"
|
||||
EOF
|
||||
AS_IF([test "$have_xmlto" = yes],
|
||||
[AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
|
||||
[have_xmlto_text=yes],
|
||||
[AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
|
||||
[# Try it again with a non-empty XML file.
|
||||
cat > conftest.xml << "EOF"
|
||||
<x></x>
|
||||
EOF
|
||||
AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
|
||||
[have_xmlto_text=yes],
|
||||
[AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
|
||||
rm -f conftest.xml
|
||||
AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
|
||||
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
|
||||
@ -11654,8 +11752,9 @@ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
|
||||
INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
|
||||
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
|
||||
|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
|
||||
echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
|
||||
|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
|
||||
touch \$(top_srcdir)/INSTALL; \
|
||||
echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
|
||||
AC_SUBST([INSTALL_CMD])
|
||||
]) # XORG_INSTALL
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
@ -11716,10 +11815,11 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
#
|
||||
#
|
||||
AC_DEFUN([XORG_CHANGELOG], [
|
||||
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
|
||||
CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
|
||||
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
|
||||
|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
|
||||
echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
|
||||
touch \$(top_srcdir)/ChangeLog; \
|
||||
echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
|
||||
AC_SUBST([CHANGELOG_CMD])
|
||||
]) # XORG_CHANGELOG
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -12,6 +12,9 @@
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `getentropy' function. */
|
||||
#undef HAVE_GETENTROPY
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
@ -97,6 +100,12 @@
|
||||
/* Support TCP socket connections */
|
||||
#undef TCPCONN
|
||||
|
||||
/* Xtrans transport client code */
|
||||
#undef TRANS_CLIENT
|
||||
|
||||
/* Xtrans transport server code */
|
||||
#undef TRANS_SERVER
|
||||
|
||||
/* Support UNIX socket connections */
|
||||
#undef UNIXCONN
|
||||
|
||||
|
123
lib/libICE/configure
vendored
123
lib/libICE/configure
vendored
@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for libICE 1.0.9.
|
||||
# Generated by GNU Autoconf 2.69 for libICE 1.0.10.
|
||||
#
|
||||
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
|
||||
# Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libICE/issues>.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@ -275,7 +275,7 @@ fi
|
||||
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
|
||||
else
|
||||
$as_echo "$0: Please tell bug-autoconf@gnu.org and
|
||||
$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
||||
$0: https://gitlab.freedesktop.org/xorg/lib/libICE/issues
|
||||
$0: about your system, including any error possibly output
|
||||
$0: before this message. Then install a modern shell, or
|
||||
$0: manually run the script under such a shell if you do
|
||||
@ -651,9 +651,9 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='libICE'
|
||||
PACKAGE_TARNAME='libICE'
|
||||
PACKAGE_VERSION='1.0.9'
|
||||
PACKAGE_STRING='libICE 1.0.9'
|
||||
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
|
||||
PACKAGE_VERSION='1.0.10'
|
||||
PACKAGE_STRING='libICE 1.0.10'
|
||||
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libICE/issues'
|
||||
PACKAGE_URL=''
|
||||
|
||||
ac_unique_file="Makefile.am"
|
||||
@ -1449,7 +1449,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures libICE 1.0.9 to adapt to many kinds of systems.
|
||||
\`configure' configures libICE 1.0.10 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1519,7 +1519,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libICE 1.0.9:";;
|
||||
short | recursive ) echo "Configuration of libICE 1.0.10:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1597,7 +1597,7 @@ Some influential environment variables:
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
||||
Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
|
||||
Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libICE/issues>.
|
||||
_ACEOF
|
||||
ac_status=$?
|
||||
fi
|
||||
@ -1660,7 +1660,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libICE configure 1.0.9
|
||||
libICE configure 1.0.10
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@ -1819,9 +1819,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
|
||||
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
( $as_echo "## ---------------------------------------------------------------------- ##
|
||||
## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
|
||||
## ---------------------------------------------------------------------- ##"
|
||||
( $as_echo "## -------------------------------------------------------------------- ##
|
||||
## Report this to https://gitlab.freedesktop.org/xorg/lib/libICE/issues ##
|
||||
## -------------------------------------------------------------------- ##"
|
||||
) | sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
@ -2186,7 +2186,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by libICE $as_me 1.0.9, which was
|
||||
It was created by libICE $as_me 1.0.10, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -4330,7 +4330,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libICE'
|
||||
VERSION='1.0.9'
|
||||
VERSION='1.0.10'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@ -17766,10 +17766,11 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
|
||||
CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
|
||||
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
|
||||
|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
|
||||
echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
|
||||
touch \$(top_srcdir)/ChangeLog; \
|
||||
echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
|
||||
|
||||
|
||||
|
||||
@ -17777,14 +17778,45 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
|
||||
INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
|
||||
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
|
||||
|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
|
||||
echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
|
||||
|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
|
||||
touch \$(top_srcdir)/INSTALL; \
|
||||
echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case $host_os in
|
||||
solaris*)
|
||||
# Solaris 2.0 - 11.3 use SysV man page section numbers, so we
|
||||
# check for a man page file found in later versions that use
|
||||
# traditional section numbers instead
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5
|
||||
$as_echo_n "checking for /usr/share/man/man7/attributes.7... " >&6; }
|
||||
if ${ac_cv_file__usr_share_man_man7_attributes_7+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
test "$cross_compiling" = yes &&
|
||||
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||
if test -r "/usr/share/man/man7/attributes.7"; then
|
||||
ac_cv_file__usr_share_man_man7_attributes_7=yes
|
||||
else
|
||||
ac_cv_file__usr_share_man_man7_attributes_7=no
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5
|
||||
$as_echo "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; }
|
||||
if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes; then :
|
||||
SYSV_MAN_SECTIONS=false
|
||||
else
|
||||
SYSV_MAN_SECTIONS=true
|
||||
fi
|
||||
|
||||
;;
|
||||
*) SYSV_MAN_SECTIONS=false ;;
|
||||
esac
|
||||
|
||||
if test x$APP_MAN_SUFFIX = x ; then
|
||||
APP_MAN_SUFFIX=1
|
||||
fi
|
||||
@ -17800,9 +17832,9 @@ if test x$LIB_MAN_DIR = x ; then
|
||||
fi
|
||||
|
||||
if test x$FILE_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) FILE_MAN_SUFFIX=4 ;;
|
||||
*) FILE_MAN_SUFFIX=5 ;;
|
||||
case $SYSV_MAN_SECTIONS in
|
||||
true) FILE_MAN_SUFFIX=4 ;;
|
||||
*) FILE_MAN_SUFFIX=5 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$FILE_MAN_DIR = x ; then
|
||||
@ -17810,9 +17842,9 @@ if test x$FILE_MAN_DIR = x ; then
|
||||
fi
|
||||
|
||||
if test x$MISC_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) MISC_MAN_SUFFIX=5 ;;
|
||||
*) MISC_MAN_SUFFIX=7 ;;
|
||||
case $SYSV_MAN_SECTIONS in
|
||||
true) MISC_MAN_SUFFIX=5 ;;
|
||||
*) MISC_MAN_SUFFIX=7 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$MISC_MAN_DIR = x ; then
|
||||
@ -17820,9 +17852,9 @@ if test x$MISC_MAN_DIR = x ; then
|
||||
fi
|
||||
|
||||
if test x$DRIVER_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) DRIVER_MAN_SUFFIX=7 ;;
|
||||
*) DRIVER_MAN_SUFFIX=4 ;;
|
||||
case $SYSV_MAN_SECTIONS in
|
||||
true) DRIVER_MAN_SUFFIX=7 ;;
|
||||
*) DRIVER_MAN_SUFFIX=4 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$DRIVER_MAN_DIR = x ; then
|
||||
@ -17830,9 +17862,9 @@ if test x$DRIVER_MAN_DIR = x ; then
|
||||
fi
|
||||
|
||||
if test x$ADMIN_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) ADMIN_MAN_SUFFIX=1m ;;
|
||||
*) ADMIN_MAN_SUFFIX=8 ;;
|
||||
case $SYSV_MAN_SECTIONS in
|
||||
true) ADMIN_MAN_SUFFIX=1m ;;
|
||||
*) ADMIN_MAN_SUFFIX=8 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$ADMIN_MAN_DIR = x ; then
|
||||
@ -18103,17 +18135,30 @@ esac
|
||||
fi
|
||||
|
||||
# Test for the ability of xmlto to generate a text target
|
||||
#
|
||||
# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
|
||||
# following test for empty XML docbook files.
|
||||
# For compatibility reasons use the following empty XML docbook file and if
|
||||
# it fails try it again with a non-empty XML file.
|
||||
have_xmlto_text=no
|
||||
cat > conftest.xml << "EOF"
|
||||
EOF
|
||||
if test "$have_xmlto" = yes; then :
|
||||
if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then :
|
||||
have_xmlto_text=yes
|
||||
else
|
||||
# Try it again with a non-empty XML file.
|
||||
cat > conftest.xml << "EOF"
|
||||
<x></x>
|
||||
EOF
|
||||
if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then :
|
||||
have_xmlto_text=yes
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmlto cannot generate text format, this format skipped" >&5
|
||||
$as_echo "$as_me: WARNING: xmlto cannot generate text format, this format skipped" >&2;}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.xml
|
||||
if test $have_xmlto_text = yes; then
|
||||
HAVE_XMLTO_TEXT_TRUE=
|
||||
@ -18846,6 +18891,12 @@ $as_echo "#define LOCALCONN 1" >>confdefs.h
|
||||
$as_echo "#define ICE_t 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define TRANS_CLIENT 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define TRANS_SERVER 1" >>confdefs.h
|
||||
|
||||
|
||||
# Checks for library functions.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random_buf in -lbsd" >&5
|
||||
$as_echo_n "checking for arc4random_buf in -lbsd... " >&6; }
|
||||
@ -18892,7 +18943,7 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
for ac_func in asprintf arc4random_buf
|
||||
for ac_func in asprintf arc4random_buf getentropy
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
@ -19611,7 +19662,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by libICE $as_me 1.0.9, which was
|
||||
This file was extended by libICE $as_me 1.0.10, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -19671,13 +19722,13 @@ $config_headers
|
||||
Configuration commands:
|
||||
$config_commands
|
||||
|
||||
Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
|
||||
Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libICE/issues>."
|
||||
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
libICE config.status 1.0.9
|
||||
libICE config.status 1.0.10
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
# Initialize Autoconf
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([libICE], [1.0.9],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libICE])
|
||||
AC_INIT([libICE], [1.0.10],
|
||||
[https://gitlab.freedesktop.org/xorg/lib/libICE/issues], [libICE])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
@ -35,10 +35,12 @@ PKG_CHECK_MODULES(ICE, xproto xtrans)
|
||||
# Transport selection macro from xtrans.m4
|
||||
XTRANS_CONNECTION_FLAGS
|
||||
AC_DEFINE(ICE_t, 1, [Xtrans transport type])
|
||||
AC_DEFINE(TRANS_CLIENT, 1, [Xtrans transport client code])
|
||||
AC_DEFINE(TRANS_SERVER, 1, [Xtrans transport server code])
|
||||
|
||||
# Checks for library functions.
|
||||
AC_CHECK_LIB([bsd], [arc4random_buf])
|
||||
AC_CHECK_FUNCS([asprintf arc4random_buf])
|
||||
AC_CHECK_FUNCS([asprintf arc4random_buf getentropy])
|
||||
|
||||
# Allow checking code with lint, sparse, etc.
|
||||
XORG_WITH_LINT
|
||||
|
@ -2738,7 +2738,7 @@ headers:
|
||||
CARD8 major_opcode;
|
||||
CARD8 minor_opcode;
|
||||
CARD8 data[2];
|
||||
CARD32 length B32;
|
||||
CARD32 length;
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
|
@ -214,16 +214,8 @@ extern IcePaAuthStatus _IcePaMagicCookie1Proc (
|
||||
|
||||
#define IceWritePad(_iceConn, _bytes) \
|
||||
{ \
|
||||
if ((_iceConn->outbufptr + (_bytes)) > _iceConn->outbufmax) \
|
||||
{ \
|
||||
char _dummy[7] = { 0 }; \
|
||||
IceFlush (_iceConn); \
|
||||
_IceWrite (_iceConn, (unsigned long) (_bytes), _dummy); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_iceConn->outbufptr += (_bytes); \
|
||||
} \
|
||||
char _dummy[7] = { 0 }; \
|
||||
IceWriteData (_iceConn, (_bytes), _dummy); \
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,18 +35,18 @@ typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 data[2];
|
||||
CARD32 length B32;
|
||||
CARD32 length;
|
||||
} iceMsg;
|
||||
|
||||
typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD16 errorClass B16;
|
||||
CARD32 length B32;
|
||||
CARD16 errorClass;
|
||||
CARD32 length;
|
||||
CARD8 offendingMinorOpcode;
|
||||
CARD8 severity;
|
||||
CARD16 unused B16;
|
||||
CARD32 offendingSequenceNum B32;
|
||||
CARD16 unused;
|
||||
CARD32 offendingSequenceNum;
|
||||
/* n varying values */
|
||||
/* p p = pad (n, 8) */
|
||||
} iceErrorMsg;
|
||||
@ -56,7 +56,7 @@ typedef struct {
|
||||
CARD8 minorOpcode;
|
||||
CARD8 byteOrder;
|
||||
CARD8 unused;
|
||||
CARD32 length B32;
|
||||
CARD32 length;
|
||||
} iceByteOrderMsg;
|
||||
|
||||
typedef struct {
|
||||
@ -64,7 +64,7 @@ typedef struct {
|
||||
CARD8 minorOpcode;
|
||||
CARD8 versionCount;
|
||||
CARD8 authCount;
|
||||
CARD32 length B32;
|
||||
CARD32 length;
|
||||
CARD8 mustAuthenticate;
|
||||
CARD8 unused[7];
|
||||
/* i STRING vendor */
|
||||
@ -79,8 +79,8 @@ typedef struct {
|
||||
CARD8 minorOpcode;
|
||||
CARD8 authIndex;
|
||||
CARD8 unused1;
|
||||
CARD32 length B32;
|
||||
CARD16 authDataLength B16;
|
||||
CARD32 length;
|
||||
CARD16 authDataLength;
|
||||
CARD8 unused2[6];
|
||||
/* n varying data */
|
||||
/* p p = pad (n, 8) */
|
||||
@ -90,8 +90,8 @@ typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused1[2];
|
||||
CARD32 length B32;
|
||||
CARD16 authDataLength B16;
|
||||
CARD32 length;
|
||||
CARD16 authDataLength;
|
||||
CARD8 unused2[6];
|
||||
/* n varying data */
|
||||
/* p p = pad (n, 8) */
|
||||
@ -101,8 +101,8 @@ typedef struct {
|
||||
CARD8 majorOpcode;
|
||||
CARD8 minorOpcode;
|
||||
CARD8 unused1[2];
|
||||
CARD32 length B32;
|
||||
CARD16 authDataLength B16;
|
||||
CARD32 length;
|
||||
CARD16 authDataLength;
|
||||
CARD8 unused2[6];
|
||||
/* n varying data */
|
||||
/* p p = pad (n, 8) */
|
||||
@ -113,7 +113,7 @@ typedef struct {
|
||||
CARD8 minorOpcode;
|
||||
CARD8 versionIndex;
|
||||
CARD8 unused;
|
||||
CARD32 length B32;
|
||||
CARD32 length;
|
||||
/* i STRING vendor */
|
||||
/* j STRING release */
|
||||
/* p p = pad (i+j, 8) */
|
||||
@ -124,7 +124,7 @@ typedef struct {
|
||||
CARD8 minorOpcode;
|
||||
CARD8 protocolOpcode;
|
||||
CARD8 mustAuthenticate;
|
||||
CARD32 length B32;
|
||||
CARD32 length;
|
||||
CARD8 versionCount;
|
||||
CARD8 authCount;
|
||||
CARD8 unused[6];
|
||||
@ -141,7 +141,7 @@ typedef struct {
|
||||
CARD8 minorOpcode;
|
||||
CARD8 versionIndex;
|
||||
CARD8 protocolOpcode;
|
||||
CARD32 length B32;
|
||||
CARD32 length;
|
||||
/* i STRING vendor */
|
||||
/* j STRING release */
|
||||
/* p p = pad (i+j, 8) */
|
||||
|
@ -95,8 +95,8 @@ allow them to share the same transport layer connection.</para>
|
||||
<para>Through some mechanism outside ICE, two parties make themselves known to
|
||||
each other and agree that they would like to communicate using an ICE
|
||||
subprotocol. ICE assumes that this negotation includes some notion by which
|
||||
the parties will decide which is the \*Qoriginating\*U party and which is
|
||||
the \*Qanswering\*U party. The negotiation will also need to provide the
|
||||
the parties will decide which is the <quote>originating</quote> party and which is
|
||||
the <quote>answering</quote> party. The negotiation will also need to provide the
|
||||
originating party with a name or address of the answering party. Examples
|
||||
of mechanisms by which parties can make themselves known to each other are
|
||||
the X selection mechanism, environment
|
||||
@ -227,7 +227,7 @@ the initial connection messages; in general data is sent in the sender's
|
||||
byte order and the receiver is required to swap it appropriately.
|
||||
In order to support 64-bit machines, ICE messages
|
||||
are padded to multiples of 8 bytes. All messages are designed so that
|
||||
fields are \*Qnaturally\*U aligned on 16-, 32-, and 64-bit boundaries.
|
||||
fields are <quote>naturally</quote> aligned on 16-, 32-, and 64-bit boundaries.
|
||||
The following formula gives the number of bytes necessary
|
||||
to pad <emphasis remap='I'>E</emphasis> bytes to the next multiple of
|
||||
<emphasis remap='I'>b</emphasis>:</para>
|
||||
@ -485,7 +485,7 @@ header and the length field is computed accordingly.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In the following message descriptions, \*QExpected errors\*U indicates
|
||||
In the following message descriptions, <quote>Expected errors</quote> indicates
|
||||
errors that may occur in the normal course of events. Other errors
|
||||
(in particular
|
||||
<function>BadMajor</function>
|
||||
@ -1465,7 +1465,7 @@ but it does not affect the existing registration.
|
||||
|
||||
<para>
|
||||
The major opcode specified was already registered. This is
|
||||
fatal to the \*Qnew\*U protocol being set up by
|
||||
fatal to the <quote>new</quote> protocol being set up by
|
||||
<function>ProtocolSetup</function> but it does not affect the
|
||||
existing registration.
|
||||
</para>
|
||||
|
@ -244,7 +244,7 @@ typedef struct {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Byte swapping
|
||||
*/
|
||||
@ -259,7 +259,7 @@ typedef struct {
|
||||
#define lswaps(_val) ((((_val) & 0xff) << 8) | (((_val) >> 8) & 0xff))
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ICE replies (not processed via callbacks because we block)
|
||||
*/
|
||||
@ -334,28 +334,28 @@ typedef struct _IceWatchProc {
|
||||
* Extern declarations
|
||||
*/
|
||||
|
||||
extern IceConn _IceConnectionObjs[];
|
||||
extern char *_IceConnectionStrings[];
|
||||
extern int _IceConnectionCount;
|
||||
extern IceConn _IceConnectionObjs[];
|
||||
extern char *_IceConnectionStrings[];
|
||||
extern int _IceConnectionCount;
|
||||
|
||||
extern _IceProtocol _IceProtocols[];
|
||||
extern int _IceLastMajorOpcode;
|
||||
extern _IceProtocol _IceProtocols[];
|
||||
extern int _IceLastMajorOpcode;
|
||||
|
||||
extern int _IceAuthCount;
|
||||
extern const char *_IceAuthNames[];
|
||||
extern IcePoAuthProc _IcePoAuthProcs[];
|
||||
extern IcePaAuthProc _IcePaAuthProcs[];
|
||||
extern int _IceAuthCount;
|
||||
extern const char *_IceAuthNames[];
|
||||
extern IcePoAuthProc _IcePoAuthProcs[];
|
||||
extern IcePaAuthProc _IcePaAuthProcs[];
|
||||
|
||||
extern int _IceVersionCount;
|
||||
extern _IceVersion _IceVersions[];
|
||||
extern const int _IceVersionCount;
|
||||
extern const _IceVersion _IceVersions[];
|
||||
|
||||
extern _IceWatchProc *_IceWatchProcs;
|
||||
extern _IceWatchProc *_IceWatchProcs;
|
||||
|
||||
extern IceErrorHandler _IceErrorHandler;
|
||||
extern IceIOErrorHandler _IceIOErrorHandler;
|
||||
extern IceErrorHandler _IceErrorHandler;
|
||||
extern IceIOErrorHandler _IceIOErrorHandler;
|
||||
|
||||
extern IceAuthDataEntry _IcePaAuthDataEntries[];
|
||||
extern int _IcePaAuthDataEntryCount;
|
||||
extern IceAuthDataEntry _IcePaAuthDataEntries[];
|
||||
extern int _IcePaAuthDataEntryCount;
|
||||
|
||||
extern void _IceErrorBadMajor (
|
||||
IceConn /* iceConn */,
|
||||
|
@ -4,8 +4,7 @@ AM_CPPFLAGS = -I${top_srcdir}/include
|
||||
|
||||
AM_CFLAGS = \
|
||||
$(ICE_CFLAGS) \
|
||||
$(CWARNFLAGS) \
|
||||
-DICE_t -DTRANS_CLIENT -DTRANS_SERVER
|
||||
$(CWARNFLAGS)
|
||||
|
||||
libICE_la_LDFLAGS = -version-number 6:3:0 -no-undefined
|
||||
|
||||
|
@ -302,8 +302,7 @@ lib_LTLIBRARIES = libICE.la
|
||||
AM_CPPFLAGS = -I${top_srcdir}/include
|
||||
AM_CFLAGS = \
|
||||
$(ICE_CFLAGS) \
|
||||
$(CWARNFLAGS) \
|
||||
-DICE_t -DTRANS_CLIENT -DTRANS_SERVER
|
||||
$(CWARNFLAGS)
|
||||
|
||||
libICE_la_LDFLAGS = -version-number 6:3:0 -no-undefined
|
||||
libICE_la_LIBADD = $(ICE_LIBS)
|
||||
|
@ -38,7 +38,6 @@ Author: Ralph Mor, X Consortium
|
||||
#include <limits.h>
|
||||
|
||||
#include <time.h>
|
||||
#define Time_t time_t
|
||||
#ifndef X_NOT_POSIX
|
||||
#include <unistd.h>
|
||||
#else
|
||||
@ -57,7 +56,7 @@ static Status write_string (FILE *file, const char *string);
|
||||
static Status write_counted_string (FILE *file, unsigned short count, const char *string);
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The following routines are for manipulating the .ICEauthority file
|
||||
* These are utility functions - they are not part of the standard
|
||||
@ -67,7 +66,7 @@ static Status write_counted_string (FILE *file, unsigned short count, const char
|
||||
char *
|
||||
IceAuthFileName (void)
|
||||
{
|
||||
static char slashDotICEauthority[] = "/.ICEauthority";
|
||||
const char *ICEauthority_name = ".ICEauthority";
|
||||
char *name;
|
||||
static char *buf;
|
||||
static size_t bsize;
|
||||
@ -82,9 +81,14 @@ IceAuthFileName (void)
|
||||
if ((name = getenv ("ICEAUTHORITY")))
|
||||
return (name);
|
||||
|
||||
name = getenv ("HOME");
|
||||
/* If it's in the XDG_RUNTIME_DIR, don't use a dotfile */
|
||||
if ((name = getenv ("XDG_RUNTIME_DIR")))
|
||||
ICEauthority_name++;
|
||||
|
||||
if (!name)
|
||||
if (!name || !name[0])
|
||||
name = getenv ("HOME");
|
||||
|
||||
if (!name || !name[0])
|
||||
{
|
||||
#ifdef WIN32
|
||||
register char *ptr1;
|
||||
@ -102,31 +106,36 @@ IceAuthFileName (void)
|
||||
snprintf (dir, sizeof(dir), "%s%s", ptr1, (ptr2) ? ptr2 : "");
|
||||
name = dir;
|
||||
}
|
||||
if (!name)
|
||||
if (!name || !name[0])
|
||||
#endif
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
size = strlen (name) + strlen (&slashDotICEauthority[1]) + 2;
|
||||
/* Special case for "/". We will add our own '/' later. */
|
||||
if (name[1] == '\0')
|
||||
name++;
|
||||
|
||||
size = strlen (name) + 1 + strlen (ICEauthority_name) + 1;
|
||||
|
||||
if (size > bsize)
|
||||
{
|
||||
if (buf)
|
||||
free (buf);
|
||||
|
||||
free (buf);
|
||||
buf = malloc (size);
|
||||
if (!buf)
|
||||
if (!buf) {
|
||||
bsize = 0;
|
||||
return (NULL);
|
||||
}
|
||||
bsize = size;
|
||||
}
|
||||
|
||||
snprintf (buf, bsize, "%s%s", name,
|
||||
slashDotICEauthority + (name[1] == '\0' ? 1 : 0));
|
||||
snprintf (buf, bsize, "%s/%s", name, ICEauthority_name);
|
||||
|
||||
return (buf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int
|
||||
IceLockAuthFile (
|
||||
const char *file_name,
|
||||
@ -137,7 +146,7 @@ IceLockAuthFile (
|
||||
{
|
||||
char creat_name[1025], link_name[1025];
|
||||
struct stat statb;
|
||||
Time_t now;
|
||||
time_t now;
|
||||
int creat_fd = -1;
|
||||
|
||||
if ((int) strlen (file_name) > 1022)
|
||||
@ -148,7 +157,7 @@ IceLockAuthFile (
|
||||
|
||||
if (stat (creat_name, &statb) != -1)
|
||||
{
|
||||
now = time ((Time_t *) 0);
|
||||
now = time ((time_t *) 0);
|
||||
|
||||
/*
|
||||
* NFS may cause ctime to be before now, special
|
||||
@ -200,7 +209,7 @@ IceLockAuthFile (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
IceUnlockAuthFile (
|
||||
const char *file_name
|
||||
@ -223,7 +232,7 @@ IceUnlockAuthFile (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
IceAuthFileEntry *
|
||||
IceReadAuthFileEntry (
|
||||
FILE *auth_file
|
||||
@ -264,17 +273,17 @@ IceReadAuthFileEntry (
|
||||
|
||||
bad:
|
||||
|
||||
if (local.protocol_name) free (local.protocol_name);
|
||||
if (local.protocol_data) free (local.protocol_data);
|
||||
if (local.network_id) free (local.network_id);
|
||||
if (local.auth_name) free (local.auth_name);
|
||||
if (local.auth_data) free (local.auth_data);
|
||||
free (local.protocol_name);
|
||||
free (local.protocol_data);
|
||||
free (local.network_id);
|
||||
free (local.auth_name);
|
||||
free (local.auth_data);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
IceFreeAuthFileEntry (
|
||||
IceAuthFileEntry *auth
|
||||
@ -282,17 +291,17 @@ IceFreeAuthFileEntry (
|
||||
{
|
||||
if (auth)
|
||||
{
|
||||
if (auth->protocol_name) free (auth->protocol_name);
|
||||
if (auth->protocol_data) free (auth->protocol_data);
|
||||
if (auth->network_id) free (auth->network_id);
|
||||
if (auth->auth_name) free (auth->auth_name);
|
||||
if (auth->auth_data) free (auth->auth_data);
|
||||
free (auth->protocol_name);
|
||||
free (auth->protocol_data);
|
||||
free (auth->network_id);
|
||||
free (auth->auth_name);
|
||||
free (auth->auth_data);
|
||||
free (auth);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Status
|
||||
IceWriteAuthFileEntry (
|
||||
FILE *auth_file,
|
||||
@ -320,7 +329,7 @@ IceWriteAuthFileEntry (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
IceAuthFileEntry *
|
||||
IceGetAuthFileEntry (
|
||||
const char *protocol_name,
|
||||
@ -362,7 +371,7 @@ IceGetAuthFileEntry (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* local routines
|
||||
*/
|
||||
|
@ -37,8 +37,6 @@ Author: Ralph Mor, X Consortium
|
||||
static XtransConnInfo ConnectToPeer(char *networkIdsList,
|
||||
char **actualConnectionRet);
|
||||
|
||||
#define Strstr strstr
|
||||
|
||||
IceConn
|
||||
IceOpenConnection (
|
||||
char *networkIdsList,
|
||||
@ -68,8 +66,11 @@ IceOpenConnection (
|
||||
|
||||
if (networkIdsList == NULL || *networkIdsList == '\0')
|
||||
{
|
||||
strncpy (errorStringRet,
|
||||
"networkIdsList argument is NULL", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"networkIdsList argument is NULL", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -93,7 +94,7 @@ IceOpenConnection (
|
||||
for (i = 0; i < _IceConnectionCount; i++)
|
||||
{
|
||||
char *strptr;
|
||||
if ((strptr = (char *) Strstr (
|
||||
if ((strptr = (char *) strstr (
|
||||
networkIdsList, _IceConnectionStrings[i])) != NULL)
|
||||
{
|
||||
char ch = *(strptr + strlen (_IceConnectionStrings[i]));
|
||||
@ -146,7 +147,10 @@ IceOpenConnection (
|
||||
|
||||
if ((iceConn = malloc (sizeof (struct _IceConn))) == NULL)
|
||||
{
|
||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -159,7 +163,10 @@ IceOpenConnection (
|
||||
&iceConn->connection_string)) == NULL)
|
||||
{
|
||||
free (iceConn);
|
||||
strncpy (errorStringRet, "Could not open network socket", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Could not open network socket", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -197,7 +204,10 @@ IceOpenConnection (
|
||||
if ((iceConn->inbuf = iceConn->inbufptr = malloc (ICE_INBUFSIZE)) == NULL)
|
||||
{
|
||||
_IceFreeConnection (iceConn);
|
||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -206,7 +216,10 @@ IceOpenConnection (
|
||||
if ((iceConn->outbuf = iceConn->outbufptr = calloc (1, ICE_OUTBUFSIZE)) == NULL)
|
||||
{
|
||||
_IceFreeConnection (iceConn);
|
||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -223,6 +236,15 @@ IceOpenConnection (
|
||||
iceConn->ping_waits = NULL;
|
||||
|
||||
iceConn->connect_to_you = malloc (sizeof (_IceConnectToYouInfo));
|
||||
if (iceConn->connect_to_you == NULL)
|
||||
{
|
||||
_IceFreeConnection (iceConn);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
iceConn->connect_to_you->auth_active = 0;
|
||||
|
||||
/*
|
||||
@ -259,8 +281,11 @@ IceOpenConnection (
|
||||
if (ioErrorOccured)
|
||||
{
|
||||
_IceFreeConnection (iceConn);
|
||||
strncpy (errorStringRet, "IO error occured opening connection",
|
||||
errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "IO error occured opening connection",
|
||||
errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -271,9 +296,12 @@ IceOpenConnection (
|
||||
*/
|
||||
|
||||
_IceFreeConnection (iceConn);
|
||||
strncpy (errorStringRet,
|
||||
"Internal error - did not receive the expected ByteOrder message",
|
||||
errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"Internal error - did not receive the expected ByteOrder "
|
||||
"message", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -357,8 +385,11 @@ IceOpenConnection (
|
||||
|
||||
if (ioErrorOccured)
|
||||
{
|
||||
strncpy (errorStringRet, "IO error occured opening connection",
|
||||
errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "IO error occured opening connection",
|
||||
errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
_IceFreeConnection (iceConn);
|
||||
iceConn = NULL;
|
||||
}
|
||||
@ -368,9 +399,12 @@ IceOpenConnection (
|
||||
{
|
||||
if (reply.connection_reply.version_index >= _IceVersionCount)
|
||||
{
|
||||
strncpy (errorStringRet,
|
||||
"Got a bad version index in the Connection Reply",
|
||||
errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"Got a bad version index in the Connection Reply",
|
||||
errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
free (reply.connection_reply.vendor);
|
||||
free (reply.connection_reply.release);
|
||||
@ -399,8 +433,11 @@ IceOpenConnection (
|
||||
{
|
||||
/* Connection failed */
|
||||
|
||||
strncpy (errorStringRet, reply.connection_error.error_message,
|
||||
errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
reply.connection_error.error_message, errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
free (reply.connection_error.error_message);
|
||||
|
||||
@ -423,7 +460,7 @@ IceOpenConnection (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
IcePointer
|
||||
IceGetConnectionContext (
|
||||
IceConn iceConn
|
||||
@ -433,7 +470,7 @@ IceGetConnectionContext (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
* local routines *
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
@ -32,10 +32,9 @@ Author: Ralph Mor, X Consortium
|
||||
#include <X11/ICE/ICElib.h>
|
||||
#include "ICElibint.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
void
|
||||
_IceErrorBadMinor (
|
||||
IceConn iceConn,
|
||||
@ -348,7 +347,7 @@ _IceErrorBadMajor (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Default error handler.
|
||||
*/
|
||||
@ -563,7 +562,7 @@ _IceDefaultErrorHandler (
|
||||
|
||||
IceErrorHandler _IceErrorHandler = _IceDefaultErrorHandler;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* This procedure sets the ICE error handler to be the specified
|
||||
* routine. If NULL is passed in the default error handler is restored.
|
||||
@ -586,7 +585,7 @@ IceSetErrorHandler (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Default IO error handler.
|
||||
*/
|
||||
@ -605,7 +604,7 @@ _IceDefaultIOErrorHandler (
|
||||
|
||||
IceIOErrorHandler _IceIOErrorHandler = _IceDefaultIOErrorHandler;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* This procedure sets the ICE fatal I/O error handler to be the
|
||||
* specified routine. If NULL is passed in the default error
|
||||
|
@ -35,7 +35,7 @@ Author: Ralph Mor, X Consortium
|
||||
static Bool auth_valid (const char *auth_name, int num_auth_names,
|
||||
const char **auth_names, int *index_ret);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The functions in this file are not a standard part of ICElib.
|
||||
*
|
||||
@ -83,7 +83,7 @@ _IceGetPoAuthData (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
_IceGetPaAuthData (
|
||||
const char *protocolName,
|
||||
@ -122,7 +122,7 @@ _IceGetPaAuthData (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
_IceGetPoValidAuthIndices (
|
||||
const char *protocol_name,
|
||||
@ -181,7 +181,7 @@ _IceGetPoValidAuthIndices (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
_IceGetPaValidAuthIndices (
|
||||
const char *protocol_name,
|
||||
@ -225,7 +225,7 @@ _IceGetPaValidAuthIndices (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* local routines
|
||||
*/
|
||||
|
@ -34,39 +34,28 @@ Author: Ralph Mor, X Consortium
|
||||
#include <X11/ICE/ICEutil.h>
|
||||
|
||||
#include <time.h>
|
||||
#define Time_t time_t
|
||||
|
||||
#ifdef HAVE_LIBBSD
|
||||
#include <bsd/stdlib.h> /* for arc4random_buf() */
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
static int was_called_state;
|
||||
|
||||
/*
|
||||
* MIT-MAGIC-COOKIE-1 is a sample authentication method implemented by
|
||||
* the SI. It is not part of standard ICElib.
|
||||
*/
|
||||
#ifndef HAVE_ARC4RANDOM_BUF
|
||||
|
||||
|
||||
char *
|
||||
IceGenerateMagicCookie (
|
||||
static void
|
||||
emulate_getrandom_buf (
|
||||
char *auth,
|
||||
int len
|
||||
)
|
||||
{
|
||||
char *auth;
|
||||
#ifndef HAVE_ARC4RANDOM_BUF
|
||||
long ldata[2];
|
||||
int seed;
|
||||
int value;
|
||||
int i;
|
||||
#endif
|
||||
|
||||
if ((auth = malloc (len + 1)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
#ifdef HAVE_ARC4RANDOM_BUF
|
||||
arc4random_buf(auth, len);
|
||||
#else
|
||||
#ifdef ITIMER_REAL
|
||||
{
|
||||
struct timeval now;
|
||||
@ -74,13 +63,13 @@ IceGenerateMagicCookie (
|
||||
ldata[0] = now.tv_sec;
|
||||
ldata[1] = now.tv_usec;
|
||||
}
|
||||
#else
|
||||
#else /* ITIMER_REAL */
|
||||
{
|
||||
long time ();
|
||||
ldata[0] = time ((long *) 0);
|
||||
ldata[1] = getpid ();
|
||||
}
|
||||
#endif
|
||||
#endif /* ITIMER_REAL */
|
||||
seed = (ldata[0]) + (ldata[1] << 16);
|
||||
srand (seed);
|
||||
for (i = 0; i < len; i++)
|
||||
@ -88,13 +77,52 @@ IceGenerateMagicCookie (
|
||||
value = rand ();
|
||||
auth[i] = value & 0xff;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
arc4random_buf (
|
||||
char *auth,
|
||||
int len
|
||||
)
|
||||
{
|
||||
#if HAVE_GETENTROPY
|
||||
int ret;
|
||||
|
||||
/* weak emulation of arc4random through the entropy libc */
|
||||
ret = getentropy (auth, len);
|
||||
if (ret == 0)
|
||||
return;
|
||||
#endif /* HAVE_GETENTROPY */
|
||||
|
||||
emulate_getrandom_buf (auth, len);
|
||||
}
|
||||
|
||||
#endif /* !defined(HAVE_ARC4RANDOM_BUF) */
|
||||
|
||||
/*
|
||||
* MIT-MAGIC-COOKIE-1 is a sample authentication method implemented by
|
||||
* the SI. It is not part of standard ICElib.
|
||||
*/
|
||||
|
||||
|
||||
char *
|
||||
IceGenerateMagicCookie (
|
||||
int len
|
||||
)
|
||||
{
|
||||
char *auth;
|
||||
|
||||
if ((auth = malloc (len + 1)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
arc4random_buf (auth, len);
|
||||
|
||||
auth[len] = '\0';
|
||||
return (auth);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
IcePoAuthStatus
|
||||
_IcePoMagicCookie1Proc (
|
||||
IceConn iceConn,
|
||||
|
@ -24,8 +24,4 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define ICE_t 1
|
||||
#define TRANS_CLIENT 1
|
||||
#define TRANS_SERVER 1
|
||||
|
||||
#include <X11/Xtrans/transport.c>
|
||||
|
@ -34,7 +34,7 @@ Author: Ralph Mor, X Consortium
|
||||
#include <X11/Xtrans/Xtrans.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
||||
Status
|
||||
IceListenForConnections (
|
||||
int *countRet,
|
||||
@ -56,8 +56,11 @@ IceListenForConnections (
|
||||
*listenObjsRet = NULL;
|
||||
*countRet = 0;
|
||||
|
||||
strncpy (errorStringRet,
|
||||
"Cannot establish any listening sockets", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"Cannot establish any listening sockets", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -91,8 +94,11 @@ IceListenForConnections (
|
||||
{
|
||||
*listenObjsRet = NULL;
|
||||
|
||||
strncpy (errorStringRet,
|
||||
"Cannot establish any listening sockets", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"Cannot establish any listening sockets", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
status = 0;
|
||||
}
|
||||
@ -102,7 +108,10 @@ IceListenForConnections (
|
||||
|
||||
if (*listenObjsRet == NULL)
|
||||
{
|
||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
status = 0;
|
||||
}
|
||||
@ -114,7 +123,10 @@ IceListenForConnections (
|
||||
|
||||
if ((*listenObjsRet)[i] == NULL)
|
||||
{
|
||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
for (j = 0; j < i; j++)
|
||||
free ((*listenObjsRet)[j]);
|
||||
@ -156,7 +168,7 @@ IceListenForConnections (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int
|
||||
IceGetListenConnectionNumber (
|
||||
IceListenObj listenObj
|
||||
@ -166,7 +178,7 @@ IceGetListenConnectionNumber (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
char *
|
||||
IceGetListenConnectionString (
|
||||
IceListenObj listenObj
|
||||
@ -176,7 +188,7 @@ IceGetListenConnectionString (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
char *
|
||||
IceComposeNetworkIdList (
|
||||
int count,
|
||||
@ -233,7 +245,7 @@ IceComposeNetworkIdList (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
IceFreeListenObjs (
|
||||
int count,
|
||||
@ -253,7 +265,7 @@ IceFreeListenObjs (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Allow host based authentication for the ICE Connection Setup.
|
||||
* Do not confuse with the host based authentication callbacks that
|
||||
|
@ -35,7 +35,7 @@ in this Software without prior written authorization from The Open Group.
|
||||
#include <X11/Xtrans/Xtrans.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
||||
Status
|
||||
IceListenForWellKnownConnections (
|
||||
char *port,
|
||||
@ -58,9 +58,13 @@ IceListenForWellKnownConnections (
|
||||
*listenObjsRet = NULL;
|
||||
*countRet = 0;
|
||||
|
||||
strncpy (errorStringRet,
|
||||
"Cannot establish any listening sockets", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"Cannot establish any listening sockets", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
free (transConns);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -91,8 +95,11 @@ IceListenForWellKnownConnections (
|
||||
{
|
||||
*listenObjsRet = NULL;
|
||||
|
||||
strncpy (errorStringRet,
|
||||
"Cannot establish any listening sockets", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"Cannot establish any listening sockets", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
status = 0;
|
||||
}
|
||||
@ -102,7 +109,10 @@ IceListenForWellKnownConnections (
|
||||
|
||||
if (*listenObjsRet == NULL)
|
||||
{
|
||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
status = 0;
|
||||
}
|
||||
@ -114,7 +124,10 @@ IceListenForWellKnownConnections (
|
||||
|
||||
if ((*listenObjsRet)[i] == NULL)
|
||||
{
|
||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
for (j = 0; j < i; j++)
|
||||
free ((*listenObjsRet)[j]);
|
||||
|
@ -41,7 +41,7 @@ Author: Ralph Mor, X Consortium
|
||||
#include <X11/Xw32defs.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* scratch buffer
|
||||
*/
|
||||
@ -54,8 +54,7 @@ IceAllocScratch (
|
||||
{
|
||||
if (!iceConn->scratch || size > iceConn->scratch_size)
|
||||
{
|
||||
if (iceConn->scratch)
|
||||
free (iceConn->scratch);
|
||||
free (iceConn->scratch);
|
||||
|
||||
iceConn->scratch = malloc (size);
|
||||
iceConn->scratch_size = size;
|
||||
@ -65,7 +64,7 @@ IceAllocScratch (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Output/Input buffer functions
|
||||
*/
|
||||
@ -102,7 +101,7 @@ IceGetInBufSize (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* informational functions
|
||||
*/
|
||||
@ -202,7 +201,7 @@ IceSwapping (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Read "n" bytes from a connection.
|
||||
*
|
||||
@ -242,7 +241,6 @@ _IceRead (
|
||||
*/
|
||||
|
||||
_IceConnectionClosed (iceConn); /* invoke watch procs */
|
||||
_IceFreeConnection (iceConn);
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -302,7 +300,7 @@ _IceRead (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* If we read a message header with a bad major or minor opcode,
|
||||
* we need to advance to the end of the message. This way, the next
|
||||
@ -327,7 +325,7 @@ _IceReadSkip (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Write "n" bytes to a connection.
|
||||
*/
|
||||
@ -407,7 +405,7 @@ _IceWrite (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
_IceAddOpcodeMapping (
|
||||
IceConn iceConn,
|
||||
@ -489,14 +487,14 @@ _IceAddOpcodeMapping (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
char *
|
||||
IceGetPeerName (IceConn iceConn)
|
||||
{
|
||||
return (_IceTransGetPeerNetworkId (iceConn->trans_conn));
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *
|
||||
_IceGetPeerName (IceConn iceConn)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ asprintf(char ** ret, const char *format, ...)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* IceProcessMessages:
|
||||
*
|
||||
@ -430,7 +430,7 @@ IceProcessMessages (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
AuthRequired (
|
||||
IceConn iceConn,
|
||||
@ -457,7 +457,7 @@ AuthRequired (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
AuthReply (
|
||||
IceConn iceConn,
|
||||
@ -482,7 +482,7 @@ AuthReply (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
AuthNextPhase (
|
||||
IceConn iceConn,
|
||||
@ -507,7 +507,7 @@ AuthNextPhase (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
AcceptConnection (
|
||||
IceConn iceConn,
|
||||
@ -535,7 +535,7 @@ AcceptConnection (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
AcceptProtocol (
|
||||
IceConn iceConn,
|
||||
@ -575,7 +575,7 @@ AcceptProtocol (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
PingReply (
|
||||
IceConn iceConn
|
||||
@ -586,7 +586,7 @@ PingReply (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static Bool
|
||||
ProcessError (
|
||||
IceConn iceConn,
|
||||
@ -704,6 +704,11 @@ ProcessError (
|
||||
invokeHandler = 1;
|
||||
}
|
||||
|
||||
if (!errorStr)
|
||||
{
|
||||
errorStr = strdup("");
|
||||
}
|
||||
|
||||
errorReply->type = ICE_CONNECTION_ERROR;
|
||||
errorReply->error_message = errorStr;
|
||||
}
|
||||
@ -715,7 +720,7 @@ ProcessError (
|
||||
{
|
||||
_IceProtocolError *errorReply =
|
||||
&(((_IceReply *) (replyWait->reply))->protocol_error);
|
||||
char *errorStr = "";
|
||||
char *errorStr = NULL;
|
||||
const char *prefix;
|
||||
char *temp;
|
||||
|
||||
@ -794,6 +799,11 @@ ProcessError (
|
||||
invokeHandler = 1;
|
||||
}
|
||||
|
||||
if (!errorStr)
|
||||
{
|
||||
errorStr = strdup("");
|
||||
}
|
||||
|
||||
errorReply->type = ICE_PROTOCOL_ERROR;
|
||||
errorReply->error_message = errorStr;
|
||||
}
|
||||
@ -847,7 +857,7 @@ ProcessError (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ProcessConnectionSetup (
|
||||
IceConn iceConn,
|
||||
@ -856,7 +866,8 @@ ProcessConnectionSetup (
|
||||
)
|
||||
{
|
||||
iceConnectionSetupMsg *message;
|
||||
int myVersionCount, hisVersionCount;
|
||||
const int myVersionCount = _IceVersionCount;
|
||||
int hisVersionCount;
|
||||
int myVersionIndex, hisVersionIndex;
|
||||
int hisMajorVersion, hisMinorVersion;
|
||||
int myAuthCount, hisAuthCount;
|
||||
@ -919,14 +930,14 @@ ProcessConnectionSetup (
|
||||
EXTRACT_STRING (pData, swap, vendor);
|
||||
EXTRACT_STRING (pData, swap, release);
|
||||
|
||||
if ((hisAuthCount = message->authCount) > 0)
|
||||
hisAuthCount = message->authCount;
|
||||
if (hisAuthCount > 0)
|
||||
{
|
||||
hisAuthNames = malloc (hisAuthCount * sizeof (char *));
|
||||
EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames);
|
||||
}
|
||||
|
||||
hisVersionCount = message->versionCount;
|
||||
myVersionCount = _IceVersionCount;
|
||||
|
||||
hisVersionIndex = myVersionIndex = found = 0;
|
||||
|
||||
@ -1026,8 +1037,7 @@ ProcessConnectionSetup (
|
||||
iceConn->connection_status = IceConnectRejected;
|
||||
}
|
||||
|
||||
if (hostname)
|
||||
free (hostname);
|
||||
free (hostname);
|
||||
}
|
||||
|
||||
if (iceConn->connection_status == IceConnectRejected)
|
||||
@ -1080,8 +1090,7 @@ ProcessConnectionSetup (
|
||||
if (authData && authDataLen > 0)
|
||||
free (authData);
|
||||
|
||||
if (errorString)
|
||||
free (errorString);
|
||||
free (errorString);
|
||||
}
|
||||
|
||||
if (accept_setup_now)
|
||||
@ -1106,7 +1115,7 @@ ProcessConnectionSetup (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static Bool
|
||||
ProcessAuthRequired (
|
||||
IceConn iceConn,
|
||||
@ -1270,7 +1279,7 @@ ProcessAuthRequired (
|
||||
}
|
||||
|
||||
if (asprintf (&returnErrorString, "%s%s", prefix, errorString) == -1)
|
||||
returnErrorString = NULL;
|
||||
returnErrorString = strdup("");
|
||||
free (errorString);
|
||||
|
||||
if (iceConn->connect_to_you)
|
||||
@ -1300,7 +1309,7 @@ ProcessAuthRequired (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ProcessAuthReply (
|
||||
IceConn iceConn,
|
||||
@ -1369,8 +1378,7 @@ ProcessAuthReply (
|
||||
status = IcePaAuthAccepted;
|
||||
}
|
||||
|
||||
if (hostname)
|
||||
free (hostname);
|
||||
free (hostname);
|
||||
}
|
||||
|
||||
if (status != IcePaAuthAccepted)
|
||||
@ -1444,8 +1452,7 @@ ProcessAuthReply (
|
||||
status = IcePaAuthAccepted;
|
||||
}
|
||||
|
||||
if (hostname)
|
||||
free (hostname);
|
||||
free (hostname);
|
||||
}
|
||||
|
||||
if (status == IcePaAuthRejected)
|
||||
@ -1559,18 +1566,15 @@ ProcessAuthReply (
|
||||
_IceErrorSetupFailed (iceConn, ICE_ProtocolSetup,
|
||||
failureReason);
|
||||
|
||||
if (failureReason)
|
||||
free (failureReason);
|
||||
free (failureReason);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (free_setup_info)
|
||||
{
|
||||
if (iceConn->protosetup_to_me->his_vendor)
|
||||
free (iceConn->protosetup_to_me->his_vendor);
|
||||
if (iceConn->protosetup_to_me->his_release)
|
||||
free (iceConn->protosetup_to_me->his_release);
|
||||
free (iceConn->protosetup_to_me->his_vendor);
|
||||
free (iceConn->protosetup_to_me->his_release);
|
||||
free (iceConn->protosetup_to_me);
|
||||
iceConn->protosetup_to_me = NULL;
|
||||
}
|
||||
@ -1587,15 +1591,15 @@ ProcessAuthReply (
|
||||
if (authData && authDataLen > 0)
|
||||
free (authData);
|
||||
|
||||
if (errorString)
|
||||
free (errorString);
|
||||
|
||||
free (errorString);
|
||||
|
||||
IceDisposeCompleteMessage (iceConn, replyData);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static Bool
|
||||
ProcessAuthNextPhase (
|
||||
IceConn iceConn,
|
||||
@ -1697,7 +1701,7 @@ ProcessAuthNextPhase (
|
||||
}
|
||||
|
||||
if (asprintf (&returnErrorString, "%s%s", prefix, errorString) == -1)
|
||||
returnErrorString = NULL;
|
||||
returnErrorString = strdup("");
|
||||
free (errorString);
|
||||
|
||||
if (iceConn->connect_to_you)
|
||||
@ -1727,7 +1731,7 @@ ProcessAuthNextPhase (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static Bool
|
||||
ProcessConnectionReply (
|
||||
IceConn iceConn,
|
||||
@ -1797,7 +1801,7 @@ ProcessConnectionReply (
|
||||
|
||||
errorReply->type = ICE_CONNECTION_ERROR;
|
||||
errorReply->error_message =
|
||||
"Received bad version index in Connection Reply";
|
||||
strdup("Received bad version index in Connection Reply");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1829,7 +1833,7 @@ ProcessConnectionReply (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ProcessProtocolSetup (
|
||||
IceConn iceConn,
|
||||
@ -1965,7 +1969,8 @@ ProcessProtocolSetup (
|
||||
EXTRACT_STRING (pData, swap, vendor);
|
||||
EXTRACT_STRING (pData, swap, release);
|
||||
|
||||
if ((hisAuthCount = message->authCount) > 0)
|
||||
hisAuthCount = message->authCount;
|
||||
if (hisAuthCount > 0)
|
||||
{
|
||||
hisAuthNames = malloc (hisAuthCount * sizeof (char *));
|
||||
EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames);
|
||||
@ -2071,8 +2076,7 @@ ProcessProtocolSetup (
|
||||
ICE_ProtocolSetup, "None of the authentication protocols specified are supported and host-based authentication failed");
|
||||
}
|
||||
|
||||
if (hostname)
|
||||
free (hostname);
|
||||
free (hostname);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2118,8 +2122,8 @@ ProcessProtocolSetup (
|
||||
if (authData && authDataLen > 0)
|
||||
free (authData);
|
||||
|
||||
if (errorString)
|
||||
free (errorString);
|
||||
|
||||
free (errorString);
|
||||
}
|
||||
|
||||
if (accept_setup_now)
|
||||
@ -2202,16 +2206,13 @@ ProcessProtocolSetup (
|
||||
|
||||
_IceErrorSetupFailed (iceConn, ICE_ProtocolSetup, failureReason);
|
||||
|
||||
if (failureReason)
|
||||
free (failureReason);
|
||||
free (failureReason);
|
||||
}
|
||||
}
|
||||
|
||||
if (vendor)
|
||||
free (vendor);
|
||||
|
||||
if (release)
|
||||
free (release);
|
||||
free (vendor);
|
||||
free (release);
|
||||
|
||||
if (hisAuthCount > 0)
|
||||
{
|
||||
@ -2226,7 +2227,7 @@ ProcessProtocolSetup (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static Bool
|
||||
ProcessProtocolReply (
|
||||
IceConn iceConn,
|
||||
@ -2300,7 +2301,7 @@ ProcessProtocolReply (
|
||||
|
||||
errorReply->type = ICE_PROTOCOL_ERROR;
|
||||
errorReply->error_message =
|
||||
"Received bad version index in Protocol Reply";
|
||||
strdup("Received bad version index in Protocol Reply");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2330,7 +2331,7 @@ ProcessProtocolReply (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ProcessPing (
|
||||
IceConn iceConn,
|
||||
@ -2346,7 +2347,7 @@ ProcessPing (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ProcessPingReply (
|
||||
IceConn iceConn,
|
||||
@ -2375,7 +2376,7 @@ ProcessPingReply (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ProcessWantToClose (
|
||||
IceConn iceConn,
|
||||
@ -2434,7 +2435,7 @@ ProcessWantToClose (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ProcessNoClose (
|
||||
IceConn iceConn,
|
||||
@ -2462,7 +2463,7 @@ ProcessNoClose (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
_IceProcessCoreMessage (
|
||||
IceConn iceConn,
|
||||
@ -2551,7 +2552,7 @@ _IceProcessCoreMessage (
|
||||
*replyReadyRet = replyReady;
|
||||
}
|
||||
|
||||
int _IceVersionCount = 1;
|
||||
_IceVersion _IceVersions[] = {
|
||||
{IceProtoMajor, IceProtoMinor, _IceProcessCoreMessage}};
|
||||
const int _IceVersionCount = 1;
|
||||
const _IceVersion _IceVersions[] = {
|
||||
{IceProtoMajor, IceProtoMinor, _IceProcessCoreMessage}};
|
||||
|
||||
|
@ -71,7 +71,10 @@ IceProtocolSetup (
|
||||
|
||||
if (myOpcode < 1 || myOpcode > _IceLastMajorOpcode)
|
||||
{
|
||||
strncpy (errorStringRet, "myOpcode out of range", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, "myOpcode out of range", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (IceProtocolSetupFailure);
|
||||
}
|
||||
|
||||
@ -79,8 +82,11 @@ IceProtocolSetup (
|
||||
|
||||
if (myProtocol->orig_client == NULL)
|
||||
{
|
||||
strncpy (errorStringRet,
|
||||
"IceRegisterForProtocolSetup was not called", errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"IceRegisterForProtocolSetup was not called", errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (IceProtocolSetupFailure);
|
||||
}
|
||||
|
||||
@ -198,9 +204,12 @@ IceProtocolSetup (
|
||||
|
||||
if (ioErrorOccured)
|
||||
{
|
||||
strncpy (errorStringRet,
|
||||
"IO error occured doing Protocol Setup on connection",
|
||||
errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"IO error occured doing Protocol Setup on connection",
|
||||
errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
return (IceProtocolSetupIOError);
|
||||
}
|
||||
else if (gotReply)
|
||||
@ -210,9 +219,12 @@ IceProtocolSetup (
|
||||
if (reply.protocol_reply.version_index >=
|
||||
myProtocol->orig_client->version_count)
|
||||
{
|
||||
strncpy (errorStringRet,
|
||||
"Got a bad version index in the Protocol Reply",
|
||||
errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet,
|
||||
"Got a bad version index in the Protocol Reply",
|
||||
errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
free (reply.protocol_reply.vendor);
|
||||
free (reply.protocol_reply.release);
|
||||
@ -229,8 +241,11 @@ IceProtocolSetup (
|
||||
{
|
||||
/* Protocol Setup failed */
|
||||
|
||||
strncpy (errorStringRet, reply.protocol_error.error_message,
|
||||
errorLength);
|
||||
if (errorStringRet && errorLength > 0) {
|
||||
strncpy (errorStringRet, reply.protocol_error.error_message,
|
||||
errorLength);
|
||||
errorStringRet[errorLength - 1] = '\0';
|
||||
}
|
||||
|
||||
free (reply.protocol_error.error_message);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ IceRegisterForProtocolSetup (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int
|
||||
IceRegisterForProtocolReply (
|
||||
const char *protocolName,
|
||||
|
@ -72,7 +72,7 @@ _IceAddReplyWait (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
IceReplyWaitInfo *
|
||||
_IceSearchReplyWaits (
|
||||
IceConn iceConn,
|
||||
@ -95,7 +95,7 @@ _IceSearchReplyWaits (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
_IceSetReplyReady (
|
||||
IceConn iceConn,
|
||||
@ -116,7 +116,7 @@ _IceSetReplyReady (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Bool
|
||||
_IceCheckReplyReady (
|
||||
IceConn iceConn,
|
||||
|
@ -33,7 +33,7 @@ Author: Ralph Mor, X Consortium
|
||||
#include "ICElibint.h"
|
||||
#include <X11/ICE/ICEutil.h>
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* IceSetPaAuthData is not a standard part of ICElib, it is specific
|
||||
* to the sample implementation.
|
||||
|
@ -40,49 +40,41 @@ IceProtocolShutdown (
|
||||
int majorOpcode
|
||||
)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (iceConn->proto_ref_count == 0 || iceConn->process_msg_info == NULL ||
|
||||
majorOpcode < 1 || majorOpcode > _IceLastMajorOpcode)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
else
|
||||
|
||||
|
||||
/*
|
||||
* Make sure this majorOpcode is really being used.
|
||||
*/
|
||||
|
||||
for (i = iceConn->his_min_opcode; i <= iceConn->his_max_opcode; i++)
|
||||
{
|
||||
/*
|
||||
* Make sure this majorOpcode is really being used.
|
||||
*/
|
||||
|
||||
int i;
|
||||
|
||||
for (i = iceConn->his_min_opcode; i <= iceConn->his_max_opcode; i++)
|
||||
int n = i - iceConn->his_min_opcode;
|
||||
if (iceConn->process_msg_info[n].in_use &&
|
||||
iceConn->process_msg_info[n].my_opcode == majorOpcode)
|
||||
{
|
||||
if (iceConn->process_msg_info[
|
||||
i - iceConn->his_min_opcode].in_use &&
|
||||
iceConn->process_msg_info[
|
||||
i - iceConn->his_min_opcode].my_opcode == majorOpcode)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i > iceConn->his_max_opcode)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* OK, we can shut down the protocol.
|
||||
*/
|
||||
|
||||
iceConn->process_msg_info[
|
||||
i - iceConn->his_min_opcode].in_use = False;
|
||||
iceConn->process_msg_info[n].in_use = False;
|
||||
iceConn->proto_ref_count--;
|
||||
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
IceSetShutdownNegotiation (
|
||||
IceConn iceConn,
|
||||
@ -93,7 +85,7 @@ IceSetShutdownNegotiation (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Bool
|
||||
IceCheckShutdownNegotiation (
|
||||
IceConn iceConn
|
||||
@ -103,7 +95,7 @@ IceCheckShutdownNegotiation (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
IceCloseStatus
|
||||
IceCloseConnection (
|
||||
IceConn iceConn
|
||||
@ -245,7 +237,7 @@ IceCloseConnection (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
_IceFreeConnection (
|
||||
IceConn iceConn
|
||||
@ -282,39 +274,17 @@ _IceFreeConnection (
|
||||
if (iceConn->trans_conn)
|
||||
_IceTransClose (iceConn->trans_conn);
|
||||
|
||||
if (iceConn->connection_string)
|
||||
free (iceConn->connection_string);
|
||||
|
||||
if (iceConn->vendor)
|
||||
free (iceConn->vendor);
|
||||
|
||||
if (iceConn->release)
|
||||
free (iceConn->release);
|
||||
|
||||
if (iceConn->inbuf)
|
||||
free (iceConn->inbuf);
|
||||
|
||||
if (iceConn->outbuf)
|
||||
free (iceConn->outbuf);
|
||||
|
||||
if (iceConn->scratch)
|
||||
free (iceConn->scratch);
|
||||
|
||||
if (iceConn->process_msg_info)
|
||||
free (iceConn->process_msg_info);
|
||||
|
||||
if (iceConn->connect_to_you)
|
||||
free (iceConn->connect_to_you);
|
||||
|
||||
if (iceConn->protosetup_to_you)
|
||||
free (iceConn->protosetup_to_you);
|
||||
|
||||
if (iceConn->connect_to_me)
|
||||
free (iceConn->connect_to_me);
|
||||
|
||||
if (iceConn->protosetup_to_me)
|
||||
free (iceConn->protosetup_to_me);
|
||||
|
||||
free (iceConn->connection_string);
|
||||
free (iceConn->vendor);
|
||||
free (iceConn->release);
|
||||
free (iceConn->inbuf);
|
||||
free (iceConn->outbuf);
|
||||
free (iceConn->scratch);
|
||||
free (iceConn->process_msg_info);
|
||||
free (iceConn->connect_to_you);
|
||||
free (iceConn->protosetup_to_you);
|
||||
free (iceConn->connect_to_me);
|
||||
free (iceConn->protosetup_to_me);
|
||||
free (iceConn);
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ IceAddConnectionWatch (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
IceRemoveConnectionWatch (
|
||||
IceWatchProc watchProc,
|
||||
@ -129,7 +129,7 @@ IceRemoveConnectionWatch (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
_IceConnectionOpened (
|
||||
IceConn iceConn
|
||||
@ -163,7 +163,7 @@ _IceConnectionOpened (
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
_IceConnectionClosed (
|
||||
IceConn iceConn
|
||||
|
Loading…
Reference in New Issue
Block a user