summaryrefslogtreecommitdiff
path: root/app/xauth
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-03-08 09:35:08 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-03-08 09:35:08 +0000
commit2eff261421c331bc8f4a1037dc2822f03e098939 (patch)
tree4d35ab84abe48f13b95b643c6effcc02731839a1 /app/xauth
parentfbdb956451732145f5a0036d26f396473d2c91b3 (diff)
Update to xauth 1.0.3 + fixes from git head. Partially addresses system/6097.
Diffstat (limited to 'app/xauth')
-rw-r--r--app/xauth/COPYING25
-rw-r--r--app/xauth/ChangeLog297
-rw-r--r--app/xauth/configure.ac10
-rw-r--r--app/xauth/gethost.c31
-rw-r--r--app/xauth/process.c18
5 files changed, 316 insertions, 65 deletions
diff --git a/app/xauth/COPYING b/app/xauth/COPYING
index 7f33cbfd2..0ad0f43db 100644
--- a/app/xauth/COPYING
+++ b/app/xauth/COPYING
@@ -1,12 +1,21 @@
-This is a stub file. This package has not yet had its complete licensing
-information compiled. Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright 1989, 1993, 1998 The Open Group
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-http://lists.freedesktop.org/mailman/listinfo/xorg
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
diff --git a/app/xauth/ChangeLog b/app/xauth/ChangeLog
index c0f731ba8..f21a4e9e7 100644
--- a/app/xauth/ChangeLog
+++ b/app/xauth/ChangeLog
@@ -1,40 +1,287 @@
-2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit 65a0917d4661e370b50beed8f06f5577bfeea59f
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Thu Jan 10 21:15:56 2008 -0800
- * configure.ac:
- Update package version for X11R7 release.
+ get_address_info: don't allow duplicate entries to be returned in the list
+ OS-X's getaddrinfo() can return duplicate entries (and does for localhost with
+ the default 10.5 /etc/hosts). This caused some annoying crashes which this
+ patch takes care of.
+
+ See http://trac.macosforge.org/projects/xquartz/ticket/44
-2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit 40e1769f4c631713c32c73a5244f3d65aea89ab7
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Sat Dec 1 20:01:23 2007 -0800
- * configure.ac:
- Update package version number for final X11R7 release candidate.
+ Added support for launchd socket
+ From Martin Costabel
-2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit 60615bc52f685b7ddfd574e10ed8fdcf2b6e43f5
+Author: Daniel Drake <ddrake@brontes3d.com>
+Date: Wed May 16 14:24:00 2007 -0800
- * Makefile.am:
- Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+ Bug #10971: xauth COPYING file
+
+ X.Org Bugzilla #10971 <https://bugs.freedesktop.org/show_bug.cgi?id=10971>
-2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit a1602ecd22a800a6c5348c00fece3287cdcf00ce
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Dec 12 15:00:29 2006 -0800
- * configure.ac:
- Update package version number for X11R7 RC3 release.
+ Version bump: 1.0.2
-2005-11-20 Alan Coopersmith <alan.coopersmith@sun.com>
+commit 140965e6a565e338e07cf6fcc0dd5313acd67716
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Dec 11 19:31:37 2006 -0800
- * configure.ac:
- Change dependency from xmu to xmuu since the full xmu
- (with all its baggage like Xt) is not needed here.
+ Remove Imake compatibility #ifdefs - require configure's AC_TYPE_SIGNAL
-2005-11-09 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit cfb36499790b764d87af7d6f4713f4fe8d3d88f7
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Dec 11 19:25:48 2006 -0800
- * configure.ac:
- Update package version number for X11R7 RC2 release.
+ Replace platform #ifdefs with AC_CHECK_HEADERS([net/errno.h])
-2005-10-18 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit 42815405686498bb464fa20621bbcde00096a42d
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Dec 11 18:59:14 2006 -0800
- * configure.ac:
- Update package version number for RC1 release.
+ sparse warning: non-ANSI definition of function 'get_hostname'
-2005-06-30 Alexander Gottwald <ago at freedesktop dot org>
+commit a527e14d16de2955dcdd6d14141f51987af7af2c
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Dec 11 18:54:51 2006 -0800
- * configure.ac:
- Check for xau.pc
+ Add hooks for checking source code with lint/sparse/etc.
+
+commit fa9b494baacab74d354ee4d5e0f6a1342b2bc723
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Dec 11 18:48:54 2006 -0800
+
+ Replace static ChangeLog with disthook to generate from git log
+
+commit 2c2900cef3722580fa7b32721809365fad77348a
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Dec 11 14:53:38 2006 -0800
+
+ Add *~ to .gitignore to skip emacs/patch droppings
+
+commit 1c42ae4c711b646fff5aae562f43047b0c4e9d81
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Dec 11 14:53:13 2006 -0800
+
+ renamed: .cvsignore -> .gitignore
+
+commit df9747b1706b0f35dd24484da05a8221369508a1
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Dec 11 14:50:29 2006 -0800
+
+ Sun bug 6494972: "is is" is a typo in xauth(1) man page
+
+ <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6494972>
+
+commit 900f18b99fcdd1e404bea3e25c5f52f3fdb4a8c5
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Dec 21 02:29:48 2005 +0000
+
+ Update package version for X11R7 release.
+
+commit a147a93a8469bc6c53e644f304f022e5c4b21083
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Mon Dec 19 16:22:42 2005 +0000
+
+ Stub COPYING files
+
+commit 80dae7f47a96a58ec1b008eb6a44c6b990d69d2f
+Author: Kevin E Martin <kem@kem.org>
+Date: Thu Dec 15 00:24:04 2005 +0000
+
+ Update package version number for final X11R7 release candidate.
+
+commit 2b0af47b8252e239fe0201802ef5b71c4732949a
+Author: Kevin E Martin <kem@kem.org>
+Date: Tue Dec 6 22:48:19 2005 +0000
+
+ Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit da2726e8d0cab3dd0e5e8653572d3c91bfd10bd4
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Dec 3 05:49:18 2005 +0000
+
+ Update package version number for X11R7 RC3 release.
+
+commit 31daf53e50be410f581f7b05d579136a8e1fd04a
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Nov 28 22:01:39 2005 +0000
+
+ Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+ update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 653fe719513d43e3ad42bb086f91fc00d8f79228
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Mon Nov 21 10:34:58 2005 +0000
+
+ Another pass at .cvsignores for apps.
+
+commit e4cb9726562b4acea76a683ed411e38845d91265
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Nov 21 03:14:16 2005 +0000
+
+ Change dependency from xmu to xmuu since the full xmu (with all its baggage
+ like Xt) is not needed here.
+
+commit 32ee4696ea37c04562229dccacffe7dc8341eca0
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Sun Nov 20 22:08:50 2005 +0000
+
+ Add/improve .cvsignore files for apps.
+
+commit ccbf3e05dad84647b62fa3fd8f5730c5dd094977
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Nov 9 21:09:20 2005 +0000
+
+ Update package version number for X11R7 RC2 release.
+
+commit 0f59380f98d7fdae7ce32b67ba8f2c3798e71502
+Author: Kean Johnson <kean@armory.com>
+Date: Tue Nov 8 06:33:31 2005 +0000
+
+ See ChangeLog entry 2005-11-07 for details.
+
+commit bb5b65a587478663bd50f083bc8c17213c5c5ab7
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Oct 19 02:47:51 2005 +0000
+
+ Update package version number for RC1 release.
+
+commit 00fdcaca12f7b8f17d23a90bab864ec538987d3e
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Oct 17 23:56:21 2005 +0000
+
+ Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+ work better with BSD make
+
+commit 2c0557cea41fab82bf8d8d5b8f65d18705999513
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Fri Oct 14 00:25:43 2005 +0000
+
+ Use sed to fill in variables in man page
+
+commit 429ec4dfe91ea5aa803295c3d3bd18a091a78572
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri Jul 29 21:22:30 2005 +0000
+
+ Various changes preparing packages for RC0:
+ - Verify and update package version numbers as needed
+ - Implement versioning scheme
+ - Change bug address to point to bugzilla bug entry form
+ - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+ reenable it)
+ - Fix makedepend to use pkgconfig and pass distcheck
+ - Update build script to build macros first
+ - Update modular Xorg version
+
+commit 6d58b9aac2e339f1caa30882d6cb5c3bd3cd53e1
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Wed Jul 27 01:54:17 2005 +0000
+
+ Move manpages to section 1 instead of section m.
+
+commit 7e7777e930bd2b25df25edfc26bbbab026d41827
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Jul 26 17:15:43 2005 +0000
+
+ Add XTRANS_CONNECTION_FLAGS & AC_TYPE_SIGNAL to replace Imake's
+ CONN_DEFINES & SIGNAL_DEFINES
+
+commit d3ef3afdb8242590ed289d0c512289c51b6f3240
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Jul 26 16:58:27 2005 +0000
+
+ Add config.h includes for modularization Use RETSIGTYPE if defined by
+ autoconf in addition to Imake's SIGNALRETURNSINT.
+
+commit aea947181d0185bf9512d71ea58bf8192b42c478
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Wed Jul 20 19:31:51 2005 +0000
+
+ Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+ configure cache, you cache it, and the cached value is probably wrong.
+
+commit d26b6760781675316ccf755cd39b295aa88dcaab
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date: Thu Jun 30 14:14:02 2005 +0000
+
+ Check for xau.pc
+
+commit 9ec316349f351f654a6bf9ac2492a5c7bfa87492
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Wed Jun 29 23:04:46 2005 +0000
+
+ Add xauth build system
+
+commit 4449eae1558daf1618ae9bcc2f53278bfc3e1fe2
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Apr 24 23:26:55 2004 +0000
+
+ Bugzilla #550: xauth doesn't unlock .Xauthority on SIGPIPE
+
+commit a6249acfcb65447dcb9759cd4acefdf22263cc7d
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Apr 23 19:54:38 2004 +0000
+
+ Merging XORG-CURRENT into trunk
+
+commit b27f9af9997bcc99fe4c9ce2d6b24c065e36be0a
+Author: Egbert Eich <eich@suse.de>
+Date: Sun Mar 14 08:35:00 2004 +0000
+
+ Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 28ec313e66802039788199d807a3cd923634d0af
+Author: Egbert Eich <eich@suse.de>
+Date: Wed Mar 3 12:12:55 2004 +0000
+
+ Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit ec7585272a7b7791c30a52e372ee3ae485744875
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 13:36:16 2004 +0000
+
+ readding XFree86's cvs IDs
+
+commit a682e3bf548a271d97cecd5c616ef84555a1b54c
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 09:23:58 2004 +0000
+
+ Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 740c103a2711826b40bd838b1fe14e47f03544ca
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Jan 29 08:09:02 2004 +0000
+
+ Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
+
+commit 48a153ab92b7ebde3483408993f08c208e67079c
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Thu Dec 4 22:03:46 2003 +0000
+
+ XFree86 4.3.99.901 (RC 1)
+
+commit 09cf02b0457f774bd10574c0facf1df29fb83b53
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Tue Nov 25 19:29:03 2003 +0000
+
+ XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit d013d0b3ecb18ae2f1c162c6a1db89c6b4f063d3
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:58 2003 +0000
+
+ XFree86 4.3.0.1
+
+commit 2f9dac1bee2aa9d396899f42c10e84a432ac31ff
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 15:54:53 2003 +0000
+
+ R6.6 is the Xorg base-line
diff --git a/app/xauth/configure.ac b/app/xauth/configure.ac
index 5b3b3dd47..ffe378cbb 100644
--- a/app/xauth/configure.ac
+++ b/app/xauth/configure.ac
@@ -1,4 +1,3 @@
-
dnl Copyright 2005 Red Hat, Inc.
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
@@ -22,17 +21,23 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT(xauth,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xauth)
+AC_INIT(xauth,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xauth)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
+# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.1)
+
AC_PROG_CC
AC_PROG_INSTALL
AC_TYPE_SIGNAL
+AC_CHECK_HEADERS([net/errno.h])
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(XAUTH, x11 xau xext xmuu)
AC_SUBST(XAUTH_CFLAGS)
@@ -42,6 +47,7 @@ AC_SUBST(XAUTH_LIBS)
# Needed to set *CONN defines for gethost.c & parsedpy.c
XTRANS_CONNECTION_FLAGS
+XORG_WITH_LINT
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
diff --git a/app/xauth/gethost.c b/app/xauth/gethost.c
index 4fd9d775e..3bfdb39b6 100644
--- a/app/xauth/gethost.c
+++ b/app/xauth/gethost.c
@@ -61,13 +61,9 @@ in this Software without prior written authorization from The Open Group.
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#ifdef SYSV
-#ifdef i386
-#if !defined(SCO325) && !defined(sun)
+#ifdef HAVE_NET_ERRNO_H
#include <net/errno.h>
-#endif /* !SCO325 && !sun */
-#endif /* i386 */
-#endif /* SYSV */
+#endif /* HAVE_NET_ERRNO_H */
#endif /* !STREAMSCONN */
#endif /* !WIN32 */
#include <errno.h>
@@ -92,15 +88,6 @@ static volatile Bool nameserver_timedout = False;
* be found. Stolen from xhost.
*/
-/* defined by autoconf AC_TYPE_SIGNAL, need to define for Imake */
-#ifndef RETSIGTYPE
-# ifdef SIGNALRETURNSINT
-# define RETSIGTYPE int
-# else
-# define RETSIGTYPE void
-# endif
-#endif
-
static jmp_buf env;
static RETSIGTYPE
nameserver_lost(int sig)
@@ -115,8 +102,7 @@ nameserver_lost(int sig)
#endif
char *
-get_hostname (auth)
- Xauth *auth;
+get_hostname (Xauth *auth)
{
static struct hostent *hp;
int af;
@@ -309,6 +295,8 @@ struct addrlist *get_address_info (
hints.ai_protocol = 0;
if (getaddrinfo(host,NULL,&hints,&firstai) !=0) return NULL;
for (ai = firstai; ai != NULL; ai = ai->ai_next) {
+ struct addrlist *duplicate;
+
if (ai->ai_family == AF_INET) {
struct sockaddr_in *sin = (struct sockaddr_in *)ai->ai_addr;
src = &(sin->sin_addr);
@@ -321,7 +309,14 @@ struct addrlist *get_address_info (
family = FamilyInternet6;
}
- if (len > 0 && src != NULL) {
+ for(duplicate = retval; duplicate != NULL; duplicate = duplicate->next) {
+ if(duplicate->family == family && duplicate->len == len &&
+ memcmp(duplicate->address, src, len) == 0) {
+ break;
+ }
+ }
+
+ if (len > 0 && src != NULL && duplicate == NULL) {
struct addrlist *newrv = malloc (sizeof(struct addrlist));
if (newrv) {
newrv->address = malloc (len);
diff --git a/app/xauth/process.c b/app/xauth/process.c
index 105305ba6..52a48686d 100644
--- a/app/xauth/process.c
+++ b/app/xauth/process.c
@@ -484,6 +484,9 @@ get_displayname_auth(char *displayname, AuthList **authl)
cp = strchr(displayname, '/');
if (cp && strncmp (cp, "/unix:", 6) == 0)
prelen = (cp - displayname);
+
+ if (strncmp (displayname, "/tmp/launch", 11) == 0)
+ displayname = strrchr(displayname, '/') + 1;
if (!parse_displayname (displayname + ((prelen > 0) ? prelen + 1 : 0),
&family, &host, &dpynum, &scrnum, &rest)) {
@@ -630,21 +633,12 @@ static Bool xauth_locked = False; /* if has been locked */
static char *xauth_filename = NULL;
static volatile Bool dieing = False;
-#ifdef RETSIGTYPE /* autoconf AC_TYPE_SIGNAL */
-# define _signal_t RETSIGTYPE
-#else /* Imake */
-#ifdef SIGNALRETURNSINT
-#define _signal_t int
-#else
-#define _signal_t void
-#endif
-#endif /* RETSIGTYPE */
/* poor man's puts(), for under signal handlers */
#define WRITES(fd, S) (void)write((fd), (S), strlen((S)))
/* ARGSUSED */
-static _signal_t
+static RETSIGTYPE
die(int sig)
{
dieing = True;
@@ -655,7 +649,7 @@ die(int sig)
#endif
}
-static _signal_t
+static RETSIGTYPE
catchsig(int sig)
{
#ifdef SYSV
@@ -966,7 +960,7 @@ fprintfhex(register FILE *fp, int len, char *cp)
char *hex;
hex = bintohex(len, cp);
- fprintf(fp, hex);
+ fprintf(fp, "%s", hex);
free(hex);
}