summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-19xhost 1.0.8xhost-1.0.8Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-21Update configure.ac bug URL for gitlab migrationAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-16Update README for gitlab migrationAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-12Drop ancient workarounds for Cray that are no longer neededAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-12Prefer inet_aton, if available, over inet_addrAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-07-16Prevent OOB access on illegal server response.Tobias Stoeckmann
While parsing Xorg responses it is possible to trigger an out of boundary read if the response does not contain enough bytes. In case of IPv4, the padding normally prevents this, but IPv6 addresses can trigger an out of boundary read. It takes a hostile xorg-server to reproduce this issue. If os/access.c is adjusted to always use a length of 1, it is possible to reproduce it and make it visible with an ASAN-compiled xhost. Reading past the memory boundary could reveal sensitive information to external DNS servers, because a lookup will be performed. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2017-01-26autogen: add default patch prefixMihail Konev
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov
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>
2015-05-07Move sethostent()/gethostent() stubs used in Windows builds to avoid ↵Jon TURNEY
implicit-function-declaration warnings Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: David Macek <david.macek.0@gmail.com>
2015-04-16xhost 1.0.7xhost-1.0.7Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-02configure: Drop AM_MAINTAINER_MODEAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-12-30Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensionsAlan Coopersmith
Required on Solaris to expose definitions in system headers that are not defined in the XPG standards now that xtrans 1.3 defines _XOPEN_SOURCE to 600 on Solaris. Fixes build failures: In file included from /usr/include/rpc/rpcb_clnt.h:34:0, from /usr/include/rpc/rpc.h:49, from xhost.c:98: /usr/include/rpc/rpcb_prot.h:159:3: error: unknown type name ‘u_int’ /usr/include/rpc/rpcb_prot.h:195:3: error: unknown type name ‘u_int’ /usr/include/rpc/rpcb_prot.h:223:2: error: unknown type name ‘u_int’ /usr/include/rpc/rpcb_prot.h:476:1: error: unknown type name ‘u_int’ /usr/include/rpc/rpcb_prot.h:489:1: error: unknown type name ‘u_int’ xhost.c: In function ‘change_host’: xhost.c:554:11: error: ‘INET6_ADDRSTRLEN’ undeclared (first use in this function) xhost.c:554:11: note: each undeclared identifier is reported only once for each function it appears in xhost.c: In function ‘get_hostname’: xhost.c:665:23: error: ‘NI_MAXHOST’ undeclared (first use in this function) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2013-11-08autogen.sh: Honor NOCONFIGURE=1Colin Walters
See http://people.gnome.org/~walters/docs/build-api.txt
2013-07-16xhost 1.0.6xhost-1.0.6Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-14Fix const warning for FamilyLocalHost empty address stringAlan Coopersmith
xhost.c: In function ‘change_host’: xhost.c:452:13: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-03-02Mark argument to nameserver_lost signal handler as unusedAlan Coopersmith
Quiets clang warning: xhost.c:812:21: warning: unused parameter 'sig' [-Wunused-parameter] nameserver_lost(int sig) ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-03-02If SIGALRM isn't available, don't use alarm() to timeout gethostaddr(), just ↵Jon TURNEY
wait Win32 has neither SIGALRM nor sigaction(), so don't use SIGALRM to timeout gethostaddr(), just wait Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-02-28Drop pre-POSIX signal handling support in favor of sigaction()Alan Coopersmith
X_NOT_POSIX has never been defined by our autoconf scripts, only for a few platforms in <X11/Xosdefs.h>, of which MinGW seems to be the most relevant today, and since that doesn't have alarm() it doesn't need this code either. First pass was done with 'unifdef -UX_NOT_POSIX', followed by manual tweaking to adjust indent levels, etc. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2013-02-24Provide dummy sethostent(),endhostent() for Win32 alsoJon TURNEY
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-02-24Link with winsock for MinGWJon TURNEY
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-02-24Use Xwinsock.h on WIN32Jon TURNEY
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-02-23Fix some integer sign/size conversion warnings flagged by clangAlan Coopersmith
xhost.c:154:19: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (i = 0; i < FAMILIES; i++) ~ ^ ~~~~~~~~ xhost.c:310:15: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] namelen = strlen(name); ~ ^~~~~~~~~~~~ xhost.c:311:40: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] if ((lname = (char *)malloc(namelen+1)) == NULL) { ~~~~~~ ~~~~~~~^~ xhost.c:707:46: warning: implicit conversion changes signedness: 'int' to 'socklen_t' (aka 'unsigned int') [-Wsign-conversion] getnameinfo((struct sockaddr *) &saddr, saddrlen, inetname, ~~~~~~~~~~~ ^~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23Convert sprintf to snprintf in SECURE_RPC codeAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23Move dpy declaration from static to main() functionAlan Coopersmith
Fixes gcc warnings: xhost.c:290: warning: declaration of 'dpy' shadows a global declaration xhost.c:160: warning: shadowed declaration is here xhost.c:839: warning: declaration of 'dpy' shadows a global declaration xhost.c:160: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23Assume signal handlers return void, as C89 requiresAlan Coopersmith
Drops use of autoconf's obsolete AC_TYPE_SIGNAL and the even more obsolete Imake SIGNALRETURNSINT. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23unifdef -UBAD_ARPAINETAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23unifdef -UattAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23unifdef -ULynxAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-23unifdef -UCRAYAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-26Remove unused TLI ("STREAMSCONN") code from xhostAlan Coopersmith
Has never been converted to build in modular builds, so has been unusable since X11R7.0 release in 2005. All known platforms with TLI/XTI support that X11R7 & later releases run on also have (and mostly prefer) BSD socket support for their networking API. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-26Remove unused DECnet ("DNETCONN") code from xhostAlan Coopersmith
Has never been converted to build in modular builds, so has been unusable since X11R7.0 release in 2005. DNETCONN support was removed from xtrans back in 2008. Performed via "unifdef -UDNETCONN". Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-22xhost 1.0.5xhost-1.0.5Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-08Rework si:type:value code to remove need for shadowed namelen variableAlan Coopersmith
Fixes gcc warning: xhost.c:453:6: warning: declaration of ‘namelen’ shadows a previous local xhost.c:339:9: warning: shadowed declaration is here Also removes unnecessary malloc and memcpy by just using the string pointers we already have, since XAddHost & XRemoveHost will copy the specified length of text from the strings to the Xlib request buffer before returning, not relying on nil termination. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-02configure.ac updates to match other X.Org modulesAlan Coopersmith
layout and comment the top portion of configure.ac add missing AC_CONFIG_SRCDIR Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-25man: xhost can not take a user name as a parameter.Erik Saule
However, server interpreted addresses can be used to achieve the same behavior. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-25Declare some char * as const to fix gcc -Wwrite-strings warningsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-09-25Only need CFLAGS, not LIBS from xau packageAlan Coopersmith
xhost needs the Family definitions from <X11/Xauth.h> to build, but doesn't call any libXau functions, so doesn't need to link against it. Fixes Solaris ld -z guidance warning: ld: guidance: removal of unused dependency recommended: libXau.so.6 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-07-28Move "-help" handling up to before XOpenDisplayJulien Cristau
We don't need a display to show the usage message. X.Org bug#39633 <https://bugs.freedesktop.org/show_bug.cgi?id=39633> Signed-off-by: Julien Cristau <jcristau@debian.org>
2011-07-19xhost: check return value of X{Add,Remove}HostKees Cook
In the ServerInterpreted case, XAddHost and XRemoveHost are capable of failing when they lack request buffer memory. Notice this situation, and report correctly. Signed-off-by: Kees Cook <kees.cook@canonical.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Julien Cristau <jcristau@debian.org>
2011-01-19config: move man pages into their own directoryGaetan Nadon
Use services provided by XORG_MANPAGE_SECTIONS. Use standard Makefile for man pages. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13man: replace hard coded man page section with substitution stringsGaetan Nadon
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13man: remove trailing spaces and tabsGaetan Nadon
Using s/[ \t]*$// Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-12config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSGaetan Nadon
This silences an Autoconf warning
2010-10-30xhost 1.0.4xhost-1.0.4Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-30config: Remove unnecessary calls from configure.acAlan Coopersmith
AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-30config: update AC_PREREQ statement to 2.60Gaetan Nadon
Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-30Sun's copyrights now belong to OracleAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-11config: upgrade to util-macros 1.8 for additional man page supportJeremy Huddleston
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS Use the appropriate platform version of sed Based on patches in other modules from Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-10-11Remove the references to /etc/X*.hostsJeremy Huddleston
xhost(1) doesn't use these files, so the refernece to Xserver(1) is sufficient. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Patrick E. Kane <pekane52 at gmail.com>
2010-10-06Purge cvs tags.Jesse Adkins
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>