Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xauth for openSUSE:Factory checked in at 2025-03-10 17:57:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xauth (Old) and /work/SRC/openSUSE:Factory/.xauth.new.19136 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xauth" Mon Mar 10 17:57:43 2025 rev:15 rq:1251489 version:1.1.4 Changes: -------- --- /work/SRC/openSUSE:Factory/xauth/xauth.changes 2024-03-05 18:46:52.484792569 +0100 +++ /work/SRC/openSUSE:Factory/.xauth.new.19136/xauth.changes 2025-03-10 17:57:48.763734723 +0100 @@ -1,0 +2,13 @@ +Sun Mar 9 04:00:16 UTC 2025 - Stefan Dirsch <sndir...@suse.com> + +- Update to version 1.1.4 + Support for using getaddrinfo() and inet_ntop() was originally added to + support IPv6, and only used if IPv6 support was enabled. Two decades later, + these interfaces are ubiquitous and OS'es have starting marking the old + interfaces as deprecated, so this release changes to use the modern interface + whenever we can now. (Note that code included from libxtrans will only use + these interfaces when IPv6 is disabled if building against libxtrans 1.6.0 + or later.) +- refreshed xauth-tolerant-hostname-changes.diff + +------------------------------------------------------------------- Old: ---- xauth-1.1.3.tar.xz New: ---- xauth-1.1.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xauth.spec ++++++ --- /var/tmp/diff_new_pack.eWsFIo/_old 2025-03-10 17:57:49.243754871 +0100 +++ /var/tmp/diff_new_pack.eWsFIo/_new 2025-03-10 17:57:49.251755207 +0100 @@ -1,7 +1,7 @@ # # spec file for package xauth # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: xauth -Version: 1.1.3 +Version: 1.1.4 Release: 0 Summary: Utility to edit and display the X authorization information License: MIT ++++++ xauth-1.1.3.tar.xz -> xauth-1.1.4.tar.xz ++++++ ++++ 3362 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xauth-1.1.3/ChangeLog new/xauth-1.1.4/ChangeLog --- old/xauth-1.1.3/ChangeLog 2024-03-03 19:58:21.000000000 +0100 +++ new/xauth-1.1.4/ChangeLog 2025-03-09 01:48:47.000000000 +0100 @@ -1,3 +1,86 @@ +commit f71ca21cf1ab840e9664b7c3e99c229bd977a6a4 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Sat Mar 8 16:44:09 2025 -0800 + + xauth 1.1.4 + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + +commit 20125640fdc37732cb3c04627bd02011cff60a12 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Sun Jan 19 10:54:44 2025 -0800 + + get_displayname_auth: replace sprintf() with snprintf() + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + Part-of: <https://gitlab.freedesktop.org/xorg/app/xauth/-/merge_requests/24> + +commit 88dde2ea3c45c992faf10b9b851af1ffa408a103 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Sun Jan 19 10:48:43 2025 -0800 + + Use remove() instead of unlink() to remove files + + Avoids filesystem corruption if file is actually a directory. + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + Part-of: <https://gitlab.freedesktop.org/xorg/app/xauth/-/merge_requests/24> + +commit 7b540bd56829c6e4bad5fc4b25af1905c398abf1 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Sun Jan 19 09:57:03 2025 -0800 + + Avoid buffer overflow with long filenames in write_auth_file() + + Aligns buffer size for filenames with XauLockAuth in libXau + + Closes: #7 ("Buffer overflow when constructing tmp_nam") + Reported-by: Mingjie Shen (@szsam) + Reviewed-by: Olivier Fourdan <ofour...@redhat.com> + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + Part-of: <https://gitlab.freedesktop.org/xorg/app/xauth/-/merge_requests/24> + +commit 0228cc6e5d3700a35179cf9b69da0d5ca492ef42 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Sat Jan 18 15:34:15 2025 -0800 + + if inet_ntop() is available, use it, even if IPv6 support is disabled + + Support for using inet_ntop() was originally added to support IPv6, + and only used if IPv6 support was enabled. Two decades later, support + for inet_ntop() is ubiquitous and OS'es have marked inet_ntoa() + as deprecated, so use the modern interface whenever we can now. + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + Part-of: <https://gitlab.freedesktop.org/xorg/app/xauth/-/merge_requests/23> + +commit 6e31d5021ffd67e63b42608fae72baaebab68e80 +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Sun Jan 12 13:15:39 2025 -0800 + + if getaddrinfo() is available, use it, even if IPv6 support is disabled + + Support for using getaddrinfo() was originally added to support IPv6, + and only used if IPv6 support was enabled. Two decades later, support + for getaddrinfo() is ubiquitous and OS'es have marked gethostbyname() + as deprecated, so use the modern interface whenever we can now. + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + Part-of: <https://gitlab.freedesktop.org/xorg/app/xauth/-/merge_requests/22> + +commit e6e032846ea43259f989887d0eb48faced3009da +Author: Alan Coopersmith <alan.coopersm...@oracle.com> +Date: Sun Jan 12 13:08:48 2025 -0800 + + Simplify ifdefs for IPv6 support + + Instead of checking for AF_INET6 at every ifdef, just check once for it + and report that IPv6 support is not available, instead of silently not + building support for it that configure said we were going to build. + + Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> + Part-of: <https://gitlab.freedesktop.org/xorg/app/xauth/-/merge_requests/22> + commit c29eef23683f0e3575a3c60d9314de8156fbe2c2 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Sun Mar 3 10:51:41 2024 -0800 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xauth-1.1.3/compile new/xauth-1.1.4/compile --- old/xauth-1.1.3/compile 2024-03-03 19:58:14.000000000 +0100 +++ new/xauth-1.1.4/compile 2025-03-09 01:48:40.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -143,7 +143,7 @@ # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in - *.o | *.[oO][bB][jJ]) + *.o | *.lo | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift @@ -248,14 +248,17 @@ right script to run: please start by reading the file 'INSTALL'. Report bugs to <bug-autom...@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>. EOF exit $? ;; -v | --v*) - echo "compile $scriptversion" + echo "compile (GNU Automake) $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xauth-1.1.3/config.h.in new/xauth-1.1.4/config.h.in --- old/xauth-1.1.3/config.h.in 2024-03-03 19:58:14.000000000 +0100 +++ new/xauth-1.1.4/config.h.in 2025-03-09 01:48:40.000000000 +0100 @@ -3,6 +3,12 @@ /* Define to 1 if `struct sockaddr_in' has a `sin_len' member */ #undef BSD44SOCKETS +/* Define to 1 if you have the 'getaddrinfo' function. */ +#undef HAVE_GETADDRINFO + +/* Define to 1 if you have the 'inet_ntop' function. */ +#undef HAVE_INET_NTOP + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H @@ -42,6 +48,9 @@ /* Define to 1 if you have the 'strlcpy' function. */ #undef HAVE_STRLCPY +/* Define to 1 if the system has the type 'struct sockaddr_storage'. */ +#undef HAVE_STRUCT_SOCKADDR_STORAGE + /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xauth-1.1.3/configure.ac new/xauth-1.1.4/configure.ac --- old/xauth-1.1.3/configure.ac 2024-03-03 19:58:10.000000000 +0100 +++ new/xauth-1.1.4/configure.ac 2025-03-09 01:48:36.000000000 +0100 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.70]) AC_INIT([xauth], - [1.1.3], + [1.1.4], [https://gitlab.freedesktop.org/xorg/app/xauth/-/issues], [xauth]) AC_CONFIG_SRCDIR([xauth.c]) @@ -49,9 +49,6 @@ # Checks for typedefs, structures, and compiler characteristics. AC_SYS_LARGEFILE -# Checks for library functions. -AC_CHECK_FUNCS([reallocarray strlcpy]) - # Checks for pkg-config packages PKG_CHECK_MODULES(XAUTH, x11 xau xext xmuu xproto >= 7.0.17) @@ -68,6 +65,9 @@ # Needed to set *CONN defines for gethost.c & parsedpy.c XTRANS_CONNECTION_FLAGS +# Checks for library functions. +AC_CHECK_FUNCS([getaddrinfo inet_ntop reallocarray strlcpy]) + XORG_WITH_LINT AC_CONFIG_FILES([ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xauth-1.1.3/gethost.c new/xauth-1.1.4/gethost.c --- old/xauth-1.1.3/gethost.c 2024-03-03 19:58:10.000000000 +0100 +++ new/xauth-1.1.4/gethost.c 2025-03-09 01:48:36.000000000 +0100 @@ -60,6 +60,10 @@ #include <arpa/inet.h> #endif +#if defined(IPv6) && !defined(AF_INET6) +#error "Cannot build IPv6 support without AF_INET6" +#endif + const char * get_hostname (Xauth *auth) { @@ -67,15 +71,20 @@ return "Illegal Address"; #ifdef TCPCONN if (auth->family == FamilyInternet -#if defined(IPv6) && defined(AF_INET6) +#ifdef IPv6 || auth->family == FamilyInternet6 #endif ) { static struct hostent *hp = NULL; +#ifdef IPv6 + static char addr[INET6_ADDRSTRLEN+2]; +#elif defined(HAVE_INET_NTOP) + static char addr[INET_ADDRSTRLEN]; +#endif int af; -#if defined(IPv6) && defined(AF_INET6) +#ifdef IPv6 if (auth->family == FamilyInternet6) af = AF_INET6; else @@ -86,9 +95,8 @@ } if (hp) return (hp->h_name); -#if defined(IPv6) && defined(AF_INET6) +#ifdef IPv6 else if (af == AF_INET6) { - static char addr[INET6_ADDRSTRLEN+2]; /* Add [] for clarity to distinguish between address & display, like RFC 2732 for URL's. Not required, since X display syntax always ends in :<display>, but makes it easier for people to read @@ -101,7 +109,11 @@ } #endif else { +#ifdef HAVE_INET_NTOP + return (inet_ntop(af, auth->address, addr, sizeof(addr))); +#else return (inet_ntoa(*((struct in_addr *)(auth->address)))); +#endif } } #endif @@ -109,7 +121,7 @@ return (NULL); } -#if defined(TCPCONN) && (!defined(IPv6) || !defined(AF_INET6)) +#if defined(TCPCONN) && !defined(HAVE_GETADDRINFO) /* * cribbed from lib/X/XConnDis.c */ @@ -156,7 +168,7 @@ int len = 0; const void *src = NULL; #ifdef TCPCONN -#if defined(IPv6) && defined(AF_INET6) +#ifdef HAVE_GETADDRINFO struct addrlist *lastrv = NULL; struct addrinfo *firstai = NULL; struct addrinfo hints; @@ -236,10 +248,16 @@ break; case FamilyInternet: /* host:0 */ #ifdef TCPCONN -#if defined(IPv6) && defined(AF_INET6) +#ifdef HAVE_GETADDRINFO +#ifdef IPv6 case FamilyInternet6: +#endif memset(&hints, 0, sizeof(hints)); +#ifdef IPv6 hints.ai_family = PF_UNSPEC; /* IPv4 or IPv6 */ +#else + hints.ai_family = PF_INET; /* IPv4 only */ +#endif hints.ai_socktype = SOCK_STREAM; /* only interested in TCP */ hints.ai_protocol = 0; if (getaddrinfo(host,NULL,&hints,&firstai) !=0) return NULL; @@ -261,6 +279,7 @@ len = sizeof(sin->sin_addr); family = FamilyInternet; } +#ifdef IPv6 } else if (ai->ai_family == AF_INET6) { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)ai->ai_addr; src = &(sin6->sin6_addr); @@ -282,6 +301,7 @@ ai->ai_addr)->sin_addr); family = FamilyInternet; } +#endif } for(duplicate = retval; duplicate != NULL; duplicate = duplicate->next) { @@ -317,7 +337,7 @@ } freeaddrinfo(firstai); break; -#else +#else /* !HAVE_GETADDRINFO */ if (!get_inet_address (host, &hostinetaddr)) return NULL; src = (char *) &hostinetaddr; if (*(const in_addr_t *) src == htonl(INADDR_LOOPBACK)) { @@ -332,8 +352,8 @@ } else len = 4; /* sizeof inaddr.sin_addr, would fail on Cray */ break; -#endif /* IPv6 */ -#else +#endif /* HAVE_GETADDRINFO */ +#else /* !TCPCONN */ return NULL; #endif case FamilyDECnet: /* host::0 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xauth-1.1.3/missing new/xauth-1.1.4/missing --- old/xauth-1.1.3/missing 2024-03-03 19:58:14.000000000 +0100 +++ new/xauth-1.1.4/missing 2025-03-09 01:48:40.000000000 +0100 @@ -1,9 +1,11 @@ #! /bin/sh -# Common wrapper for a few potentially missing GNU programs. +# Common wrapper for a few potentially missing GNU and other programs. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-07.14; # UTC -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells + +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -54,18 +56,20 @@ -v, --version output version information and exit Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man +aclocal autoconf autogen autoheader autom4te automake autoreconf +bison flex help2man lex makeinfo perl yacc Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. -Send bug reports to <bug-autom...@gnu.org>." +Report bugs to <bug-autom...@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" + echo "missing (GNU Automake) $scriptversion" exit $? ;; @@ -108,7 +112,7 @@ program_details () { case $1 in - aclocal|automake) + aclocal|automake|autoreconf) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" @@ -123,6 +127,9 @@ echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; + *) + : + ;; esac } @@ -137,48 +144,55 @@ printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + autoheader_deps="'acconfig.h'" + automake_deps="'Makefile.am'" + aclocal_deps="'acinclude.m4'" case $normalized_program in + aclocal*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$configure_deps." + ;; autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' + echo "You should only need it if you modified $configure_deps." + ;; + autogen*) + echo "You should only need it if you modified a '.def' or '.tpl' file." + echo "You may want to install the GNU AutoGen package:" + echo "<$gnu_software_URL/autogen/>" ;; autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" + echo "You should only need it if you modified $autoheader_deps or" echo "$configure_deps." - program_details 'autoheader' ;; automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" + echo "You should only need it if you modified $automake_deps or" echo "$configure_deps." - program_details 'aclocal' ;; - autom4te*) + autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' + ;; + autoreconf*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$automake_deps or $autoheader_deps or $automake_deps or" + echo "$configure_deps." ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." @@ -189,6 +203,12 @@ echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; + perl*) + echo "You should only need it to run GNU Autoconf, GNU Automake, " + echo " assorted other tools, or if you modified a Perl source file." + echo "You may want to install the Perl 5 language interpreter:" + echo "<$perl_URL>" + ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" @@ -197,6 +217,7 @@ echo "case some other package contains this missing '$1' program." ;; esac + program_details "$normalized_program" } give_advice "$1" | sed -e '1s/^/WARNING: /' \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xauth-1.1.3/process.c new/xauth-1.1.4/process.c --- old/xauth-1.1.3/process.c 2024-03-03 19:58:10.000000000 +0100 +++ new/xauth-1.1.4/process.c 2025-03-09 01:48:36.000000000 +0100 @@ -521,7 +521,7 @@ unsigned short dpylen; buf[0] = '\0'; - sprintf (buf, "%d", dpynum); + snprintf (buf, sizeof(buf), "%d", dpynum); dpylen = strlen (buf); if (dpylen > 0) { for (addrlist_cur = addrlist_head; addrlist_cur != NULL; @@ -714,9 +714,14 @@ FILE *authfp; Bool exists; + /* + * XauLockAuth in libXau limits file names to 1022 characters so it + * has room to append two characters in its 1025 character buffers. + */ if (strlen(authfilename) > 1022) { fprintf (stderr, "%s: authority file name \"%s\" too long\n", ProgramName, authfilename); + exit (1); } xauth_filename = authfilename; /* used in cleanup, prevent race with signals */ @@ -822,17 +827,19 @@ } static int -write_auth_file(char *tmp_nam) +write_auth_file(char *tmp_nam, size_t tmp_nam_size) { FILE *fp = NULL; int fd; - /* - * xdm and auth spec assumes auth file is 12 or fewer characters - */ - strcpy (tmp_nam, xauth_filename); - strcat (tmp_nam, "-n"); /* for new */ - (void) unlink (tmp_nam); + /* Append "-n" for "new" */ + int ret = snprintf(tmp_nam, tmp_nam_size, "%s-n", xauth_filename); + if (ret < 0 || ret >= tmp_nam_size) { + fprintf(stderr, "Error constructing filename: %s\n", + (ret < 0) ? "snprintf failed" : "buffer size is too small"); + return -1; + } + (void) remove (tmp_nam); /* CPhipps 2000/02/12 - fix file unlink/fopen race */ fd = open(tmp_nam, O_WRONLY | O_CREAT | O_EXCL, 0600); if (fd != -1) fp = fdopen (fd, "wb"); @@ -907,7 +914,7 @@ "Writing", xauth_filename); } temp_name[0] = '\0'; - if (write_auth_file (temp_name) == -1) { + if (write_auth_file (temp_name, sizeof(temp_name)) == -1) { fprintf (stderr, "%s: unable to write authority file %s\n", ProgramName, temp_name); @@ -916,7 +923,7 @@ fprintf (stderr, "%s: unable to rename authority file %s, use %s\n", ProgramName, xauth_filename, temp_name); - unlink(temp_name); + remove(temp_name); } } } @@ -1013,7 +1020,7 @@ fprintf (fp, "/unix"); break; case FamilyInternet: -#if defined(IPv6) && defined(AF_INET6) +#ifdef IPv6 case FamilyInternet6: #endif case FamilyDECnet: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xauth-1.1.3/test-driver new/xauth-1.1.4/test-driver --- old/xauth-1.1.3/test-driver 2024-03-03 19:58:14.000000000 +0100 +++ new/xauth-1.1.4/test-driver 2025-03-09 01:48:40.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 2011-2021 Free Software Foundation, Inc. +# Copyright (C) 2011-2024 Free Software Foundation, Inc. # # 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 @@ -44,11 +44,16 @@ Usage: test-driver --test-name NAME --log-file PATH --trs-file PATH [--expect-failure {yes|no}] [--color-tests {yes|no}] + [--collect-skipped-logs {yes|no}] [--enable-hard-errors {yes|no}] [--] TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. See the GNU Automake documentation for information. + +Report bugs to <bug-autom...@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>. END } @@ -57,15 +62,17 @@ trs_file= # Where to save the metadata of the test run. expect_failure=no color_tests=no +collect_skipped_logs=yes enable_hard_errors=yes while test $# -gt 0; do case $1 in --help) print_usage; exit $?;; - --version) echo "test-driver $scriptversion"; exit $?;; + --version) echo "test-driver (GNU Automake) $scriptversion"; exit $?;; --test-name) test_name=$2; shift;; --log-file) log_file=$2; shift;; --trs-file) trs_file=$2; shift;; --color-tests) color_tests=$2; shift;; + --collect-skipped-logs) collect_skipped_logs=$2; shift;; --expect-failure) expect_failure=$2; shift;; --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; @@ -121,7 +128,7 @@ case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; - 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 77:*) col=$blu res=SKIP recheck=no gcopy=$collect_skipped_logs;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; ++++++ xauth-tolerant-hostname-changes.diff ++++++ --- /var/tmp/diff_new_pack.eWsFIo/_old 2025-03-10 17:57:49.359759740 +0100 +++ /var/tmp/diff_new_pack.eWsFIo/_new 2025-03-10 17:57:49.363759908 +0100 @@ -1,8 +1,8 @@ -Index: xauth-1.1.3/gethost.c +Index: xauth-1.1.4/gethost.c =================================================================== ---- xauth-1.1.3.orig/gethost.c -+++ xauth-1.1.3/gethost.c -@@ -150,7 +150,8 @@ struct addrlist *get_address_info ( +--- xauth-1.1.4.orig/gethost.c ++++ xauth-1.1.4/gethost.c +@@ -162,7 +162,8 @@ struct addrlist *get_address_info ( int family, const char *fulldpyname, int prefix, @@ -12,7 +12,7 @@ { struct addrlist *retval = NULL; int len = 0; -@@ -176,7 +177,7 @@ struct addrlist *get_address_info ( +@@ -188,7 +189,7 @@ struct addrlist *get_address_info ( if (prefix == 0 && (strncmp (fulldpyname, "unix:", 5) == 0 || fulldpyname[0] == ':')) { @@ -21,7 +21,7 @@ len = 0; } else { src = buf; -@@ -252,7 +253,7 @@ struct addrlist *get_address_info ( +@@ -270,7 +271,7 @@ struct addrlist *get_address_info ( src = &(sin->sin_addr); if (*(const in_addr_t *) src == htonl(INADDR_LOOPBACK)) { family = FamilyLocal; @@ -30,7 +30,7 @@ src = buf; len = strlen (buf); } else -@@ -267,7 +268,7 @@ struct addrlist *get_address_info ( +@@ -286,7 +287,7 @@ struct addrlist *get_address_info ( if (!IN6_IS_ADDR_V4MAPPED((const struct in6_addr *)src)) { if (IN6_IS_ADDR_LOOPBACK((const struct in6_addr *)src)) { family = FamilyLocal; @@ -39,7 +39,7 @@ src = buf; len = strlen (buf); } else -@@ -322,7 +323,7 @@ struct addrlist *get_address_info ( +@@ -342,7 +343,7 @@ struct addrlist *get_address_info ( src = (char *) &hostinetaddr; if (*(const in_addr_t *) src == htonl(INADDR_LOOPBACK)) { family = FamilyLocal; @@ -48,10 +48,10 @@ src = buf; len = strlen (buf); } else { -Index: xauth-1.1.3/parsedpy.c +Index: xauth-1.1.4/parsedpy.c =================================================================== ---- xauth-1.1.3.orig/parsedpy.c -+++ xauth-1.1.3/parsedpy.c +--- xauth-1.1.4.orig/parsedpy.c ++++ xauth-1.1.4/parsedpy.c @@ -70,20 +70,23 @@ copystring (const char *src, int len) @@ -96,10 +96,10 @@ family = FamilyInternet; } #endif -Index: xauth-1.1.3/process.c +Index: xauth-1.1.4/process.c =================================================================== ---- xauth-1.1.3.orig/process.c -+++ xauth-1.1.3/process.c +--- xauth-1.1.4.orig/process.c ++++ xauth-1.1.4/process.c @@ -491,7 +491,7 @@ read_auth_entries(FILE *fp, Bool numeric } @@ -124,7 +124,7 @@ if (addrlist_head) { char buf[40]; /* want to hold largest display num */ unsigned short dpylen; -@@ -1288,6 +1290,12 @@ iterdpy (const char *inputfilename, int +@@ -1295,6 +1297,12 @@ iterdpy (const char *inputfilename, int int errors = 0; /* @@ -137,7 +137,7 @@ * iterate */ for (int i = start; i < argc; i++) { -@@ -1296,7 +1304,7 @@ iterdpy (const char *inputfilename, int +@@ -1303,7 +1311,7 @@ iterdpy (const char *inputfilename, int AuthList *next; int status; @@ -146,7 +146,7 @@ prefix (inputfilename, lineno); baddisplayname (displayname, argv[0]); errors++; -@@ -1659,7 +1667,7 @@ do_add(const char *inputfilename, int li +@@ -1666,7 +1674,7 @@ do_add(const char *inputfilename, int li } } @@ -155,10 +155,10 @@ prefix (inputfilename, lineno); baddisplayname (dpyname, argv[0]); free (key); -Index: xauth-1.1.3/xauth.h +Index: xauth-1.1.4/xauth.h =================================================================== ---- xauth-1.1.3.orig/xauth.h -+++ xauth-1.1.3/xauth.h +--- xauth-1.1.4.orig/xauth.h ++++ xauth-1.1.4/xauth.h @@ -48,10 +48,10 @@ struct addrlist { };