Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xdm for openSUSE:Factory checked in at 2022-12-07 17:33:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xdm (Old) and /work/SRC/openSUSE:Factory/.xdm.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xdm" Wed Dec 7 17:33:12 2022 rev:98 rq:1040075 version:1.1.14 Changes: -------- --- /work/SRC/openSUSE:Factory/xdm/xdm.changes 2022-10-13 15:40:43.178570949 +0200 +++ /work/SRC/openSUSE:Factory/.xdm.new.1835/xdm.changes 2022-12-07 17:33:18.567995233 +0100 @@ -1,0 +2,10 @@ +Sun Dec 4 21:36:50 UTC 2022 - Stefan Dirsch <[email protected]> + +- Update to release 1.1.14 + * This release improves compatibility for building with GNU + libc 2.36, and adds a --without-xinerama option to the + configure script for those who want to build without linking + to libXinerama. +- supersedes u_glibc-2.36.patch + +------------------------------------------------------------------- Old: ---- u_glibc-2.36.patch xdm-1.1.13.tar.xz New: ---- xdm-1.1.14.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xdm.spec ++++++ --- /var/tmp/diff_new_pack.OV8Q7M/_old 2022-12-07 17:33:19.468000161 +0100 +++ /var/tmp/diff_new_pack.OV8Q7M/_new 2022-12-07 17:33:19.496000314 +0100 @@ -25,7 +25,7 @@ %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif Name: xdm -Version: 1.1.13 +Version: 1.1.14 Release: 0 Summary: X Display Manager License: MIT @@ -40,7 +40,6 @@ Patch2: xdm-tarball.patch Patch3: n_Allow-the-greeter-to-set-the-input-fields-bg-color.patch Patch4: xinit-UsrEtcMove.patch -Patch5: u_glibc-2.36.patch BuildRequires: firewall-macros BuildRequires: libtool BuildRequires: pam-devel @@ -102,7 +101,6 @@ pushd xdm %patch1 -p1 popd -%patch5 -p1 # reverse apply (boo#1130321) %patch3 -p1 -R ++++++ xdm-1.1.13.tar.xz -> xdm-1.1.14.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/ChangeLog new/xdm-1.1.14/ChangeLog --- old/xdm-1.1.13/ChangeLog 2022-04-03 23:45:37.000000000 +0200 +++ new/xdm-1.1.14/ChangeLog 2022-12-03 22:38:50.000000000 +0100 @@ -1,3 +1,121 @@ +commit 022b959f5f26e6b70d2ab6524ca39b5934e4c42e +Author: Alan Coopersmith <[email protected]> +Date: Sat Dec 3 13:34:29 2022 -0800 + + xdm 1.1.14 + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 968b9c0b390f15f44ab4f3ee5fce23a9cec60720 +Author: Alan Coopersmith <[email protected]> +Date: Sat Nov 5 10:37:33 2022 -0700 + + Only link with libbsd if needed for arc4random() or setproctitle() + + Avoid unnecessary library dependency when using a libc with these + functions included. + + Also only links to the binary that needs them (xdm, not chooser or greeter) + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 8a10c98d29d0ff2028f109b5671dfae2910df051 +Author: Guillem Jover <[email protected]> +Date: Thu Oct 6 00:11:18 2022 +0000 + + Switch from libbsd to libbsd-overlay + + This is the preferred usage form for libbsd, as it makes the code more + portable and requires no special includes for libbsd, by transparently + injects the needed standard headers that would be used on a BSD. + + Signed-off-by: Guillem Jover <[email protected]> + +commit 468b76023a2dfb750c4d5e9b184f230c5b6ec670 +Author: Callum Farmer <[email protected]> +Date: Sun Sep 11 12:57:05 2022 +0100 + + genauth: fix build with arc4random in glibc 2.36 + + HAVE_ARC4RANDOM is defined under glibc 2.36 but this will attempt to include + <bsd/stdlib.h> from libbsd instead of <stdlib.h> from glibc + + Signed-off-by: Callum Farmer <[email protected]> + +commit 0f46b67b45ef40854ad7924e836134bf3f920e09 +Author: Alan Coopersmith <[email protected]> +Date: Sat Apr 30 11:59:31 2022 -0700 + + chooser: avoid free of uninitialized pointer in allocation failure cleanup + + Resolves issue found by Oracle Parfait static analyzer: + + Error: Uninitialised memory + Uninitialised memory [uninitialised-mem] (CWE 456): + Possible access to uninitialised memory referenced by 'new->fullname' + Memory 'new->fullname' accessed at byte offset '8' + at line 357 of app/xdm/chooser/chooser.c in function 'AddHostname'. + Write does not overlap at line 355 + new allocated at line 329 + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 3544fa9ec2e17e481785382317ef93ec2ac32ddf +Author: Alan Coopersmith <[email protected]> +Date: Sun Apr 10 11:58:38 2022 -0700 + + Use memcpy() instead of memmove() when buffers are known not to overlap + + Most of these came from a mass bcopy() -> memmove() substitution + in 1993 with a commit comment of "ANSIfied for R6". + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit f01b28cf76d641881fa1c5bf7f9dd2487b9ced6b +Author: Alan Coopersmith <[email protected]> +Date: Sun Apr 10 11:33:38 2022 -0700 + + all_query_respond(): handle ConvertAddr failure sooner + + Don't try to process returned data values that may not be set + + Resolves Oracle Parfait issue: + + Error: Uninitialised memory + Uninitialised memory variable [uninitialised-mem-var] (CWE 457): + Possible access to uninitialised memory referenced by variable 'length' + at line 238 of xdm/xdmcp.c in function 'all_query_respond'. + Path in callee avoiding write at line 237 + length allocated at line 231 + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 00e0b3ae11bb1d4681b0206c341f57fc46ea98b1 +Author: Alan Coopersmith <[email protected]> +Date: Sun Apr 10 11:14:50 2022 -0700 + + GetChooserAddr(): verify socket address fit in provided buffer + + Should never happen, but makes Oracle Parfait stop warning: + + Error: Buffer overrun + Read Outside Array Bounds in STD C function [read-outside-array-bounds-call-stdc]: + Read outside array bounds in call to memmove. Buffer ((int8*)&in_addr) of size 256 is read at an offset of len + Array size is 256 bytes, index <= 1024 + at line 130 of xdm/socket.c in function 'GetChooserAddr'. + called at line 197 of xdm/choose.c in function 'FormatChooserArgument' with lenp = &addr_len. + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit c7daccd105a74fe97adb2c8e2842e3b19d5dd34c +Author: Matt Turner <[email protected]> +Date: Sun Apr 10 12:40:13 2022 -0700 + + configure.ac: Add option to disable Xinerama + + Bug: https://bugs.gentoo.org/384371 + Signed-off-by: Matt Turner <[email protected]> + commit df5bb7f4e4039192571de75179658ee9c2ee58eb Author: Alan Coopersmith <[email protected]> Date: Sun Apr 3 14:42:16 2022 -0700 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/Makefile.in new/xdm-1.1.14/Makefile.in --- old/xdm-1.1.13/Makefile.in 2022-04-03 23:45:25.000000000 +0200 +++ new/xdm-1.1.14/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -325,6 +325,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/app-defaults/Makefile.in new/xdm-1.1.14/app-defaults/Makefile.in --- old/xdm-1.1.13/app-defaults/Makefile.in 2022-04-03 23:45:25.000000000 +0200 +++ new/xdm-1.1.14/app-defaults/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -223,6 +223,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/chooser/Makefile.in new/xdm-1.1.14/chooser/Makefile.in --- old/xdm-1.1.13/chooser/Makefile.in 2022-04-03 23:45:25.000000000 +0200 +++ new/xdm-1.1.14/chooser/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -242,6 +242,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/chooser/chooser.c new/xdm-1.1.14/chooser/chooser.c --- old/xdm-1.1.13/chooser/chooser.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/chooser/chooser.c 2022-12-03 22:38:28.000000000 +0100 @@ -326,7 +326,7 @@ } if (!*names) { - new = malloc (sizeof (HostName)); + new = calloc (1, sizeof (HostName)); if (!new) return 0; if (hostname->length) @@ -347,18 +347,17 @@ XdmcpDisposeARRAY8 (hostname); host = (char *)hostent->h_name; XdmcpAllocARRAY8 (hostname, strlen (host)); - memmove( hostname->data, host, hostname->length); + memcpy(hostname->data, host, hostname->length); } } } } if (!XdmcpAllocARRAY8 (&new->hostaddr, hostAddr.length)) { - free (new->fullname); free (new); return 0; } - memmove( new->hostaddr.data, hostAddr.data, hostAddr.length); + memcpy(new->hostaddr.data, hostAddr.data, hostAddr.length); new->connectionType = connectionType; new->hostname = *hostname; @@ -498,7 +497,7 @@ free (host); return; } - memmove( (char *) host->addr, (char *) addr, len); + memcpy(host->addr, addr, len); host->addrlen = len; host->type = type; for (prev = &hostAddrdb; *prev; prev = &(*prev)->next) @@ -638,7 +637,7 @@ if (hostent->h_addrtype != AF_INET || hostent->h_length != 4) return; in_addr.sin_family = hostent->h_addrtype; - memmove( &in_addr.sin_addr, hostent->h_addr, 4); + memcpy(&in_addr.sin_addr, hostent->h_addr, 4); } in_addr.sin_port = htons (XDM_UDP_PORT); # ifdef BSD44SOCKETS @@ -727,8 +726,8 @@ in_addr.sin_len = sizeof(in_addr); #endif in_addr.sin_family = family; - memmove( &in_addr.sin_port, xdm + 2, 2); - memmove( &in_addr.sin_addr, xdm + 4, 4); + memcpy(&in_addr.sin_port, xdm + 2, 2); + memcpy(&in_addr.sin_addr, xdm + 4, 4); addr = (struct sockaddr *) &in_addr; len = sizeof (in_addr); break; @@ -739,8 +738,8 @@ in6_addr.sin6_len = sizeof(in6_addr); # endif in6_addr.sin6_family = family; - memmove( &in6_addr.sin6_port, xdm + 2, 2); - memmove( &in6_addr.sin6_addr, xdm + 4, 16); + memcpy(&in6_addr.sin6_port, xdm + 2, 2); + memcpy(&in6_addr.sin6_addr, xdm + 4, 16); addr = (struct sockaddr *) &in6_addr; len = sizeof (in6_addr); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/config/Makefile.in new/xdm-1.1.14/config/Makefile.in --- old/xdm-1.1.13/config/Makefile.in 2022-04-03 23:45:25.000000000 +0200 +++ new/xdm-1.1.14/config/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -229,6 +229,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/configure new/xdm-1.1.14/configure --- old/xdm-1.1.13/configure 2022-04-03 23:45:24.000000000 +0200 +++ new/xdm-1.1.14/configure 2022-12-03 22:38:37.000000000 +0100 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for xdm 1.1.13. +# Generated by GNU Autoconf 2.71 for xdm 1.1.14. # -# Report bugs to <https://gitlab.freedesktop.org/xorg/app/xdm/issues>. +# Report bugs to <https://gitlab.freedesktop.org/xorg/app/xdm/-/issues>. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -276,7 +276,7 @@ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell [email protected] and -$0: https://gitlab.freedesktop.org/xorg/app/xdm/issues +$0: https://gitlab.freedesktop.org/xorg/app/xdm/-/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 @@ -622,9 +622,9 @@ # Identity of this package. PACKAGE_NAME='xdm' PACKAGE_TARNAME='xdm' -PACKAGE_VERSION='1.1.13' -PACKAGE_STRING='xdm 1.1.13' -PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xdm/issues' +PACKAGE_VERSION='1.1.14' +PACKAGE_STRING='xdm 1.1.14' +PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xdm/-/issues' PACKAGE_URL='' # Factoring default headers for most tests. @@ -711,8 +711,6 @@ XFT_CFLAGS XINERAMA_LIBS XINERAMA_CFLAGS -XDM_LIBS -XDM_CFLAGS SHELL_CMD WTMP_FILE SET_WTMP_FILE_FALSE @@ -743,6 +741,10 @@ HAVE_ARC4RANDOM_FALSE HAVE_ARC4RANDOM_TRUE HAVE_ARC4RANDOM +LIBBSD_LIBS +LIBBSD_CFLAGS +XDM_LIBS +XDM_CFLAGS HAVE_MKTEMP_COMMAND_FALSE HAVE_MKTEMP_COMMAND_TRUE MKTEMP_COMMAND @@ -928,6 +930,7 @@ with_config_type with_utmp_file with_wtmp_file +with_xinerama with_xft enable_xpm_logos with_color_pixmap @@ -955,10 +958,12 @@ CPP LINT LINT_FLAGS -SYSTEMD_DAEMON_CFLAGS -SYSTEMD_DAEMON_LIBS XDM_CFLAGS XDM_LIBS +LIBBSD_CFLAGS +LIBBSD_LIBS +SYSTEMD_DAEMON_CFLAGS +SYSTEMD_DAEMON_LIBS XINERAMA_CFLAGS XINERAMA_LIBS XFT_CFLAGS @@ -1527,7 +1532,7 @@ # 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 xdm 1.1.13 to adapt to many kinds of systems. +\`configure' configures xdm 1.1.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1598,7 +1603,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xdm 1.1.13:";; + short | recursive ) echo "Configuration of xdm 1.1.14:";; esac cat <<\_ACEOF @@ -1686,6 +1691,7 @@ specify file to pass to sessreg -w for login history --without-wtmp-file specify passing "none" to sessreg -w to not record logins in wtmp + --with-xinerama Use Xinerama (default is YES if installed) --with-xft Use Xft to draw text (default is YES if installed) --with-color-pixmap=<filename> specify xpm file to use as color logo @@ -1725,12 +1731,15 @@ CPP C preprocessor LINT Path to a lint-style command LINT_FLAGS Flags for the lint-style command + XDM_CFLAGS C compiler flags for XDM, overriding pkg-config + XDM_LIBS linker flags for XDM, overriding pkg-config + LIBBSD_CFLAGS + C compiler flags for LIBBSD, overriding pkg-config + LIBBSD_LIBS linker flags for LIBBSD, overriding pkg-config SYSTEMD_DAEMON_CFLAGS C compiler flags for SYSTEMD_DAEMON, overriding pkg-config SYSTEMD_DAEMON_LIBS linker flags for SYSTEMD_DAEMON, overriding pkg-config - XDM_CFLAGS C compiler flags for XDM, overriding pkg-config - XDM_LIBS linker flags for XDM, overriding pkg-config XINERAMA_CFLAGS C compiler flags for XINERAMA, overriding pkg-config XINERAMA_LIBS @@ -1763,7 +1772,7 @@ 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://gitlab.freedesktop.org/xorg/app/xdm/issues>. +Report bugs to <https://gitlab.freedesktop.org/xorg/app/xdm/-/issues>. _ACEOF ac_status=$? fi @@ -1827,7 +1836,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xdm configure 1.1.13 +xdm configure 1.1.14 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2295,7 +2304,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xdm $as_me 1.1.13, which was +It was created by xdm $as_me 1.1.14, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4866,7 +4875,7 @@ # Define the identity of the package. PACKAGE='xdm' - VERSION='1.1.13' + VERSION='1.1.14' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -20261,6 +20270,172 @@ # pre-pends the found library to $LIBS. # #------------------------------------------------------------------------------ + + +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDM" >&5 +printf %s "checking for XDM... " >&6; } + +if test -n "$XDM_CFLAGS"; then + pkg_cv_XDM_CFLAGS="$XDM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu x11 xau xproto >= 7.0.17\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xmu x11 xau xproto >= 7.0.17") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XDM_CFLAGS=`$PKG_CONFIG --cflags "xmu x11 xau xproto >= 7.0.17" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XDM_LIBS"; then + pkg_cv_XDM_LIBS="$XDM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu x11 xau xproto >= 7.0.17\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xmu x11 xau xproto >= 7.0.17") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XDM_LIBS=`$PKG_CONFIG --libs "xmu x11 xau xproto >= 7.0.17" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XDM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xmu x11 xau xproto >= 7.0.17" 2>&1` + else + XDM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xmu x11 xau xproto >= 7.0.17" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XDM_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (xmu x11 xau xproto >= 7.0.17) were not met: + +$XDM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XDM_CFLAGS +and XDM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XDM_CFLAGS +and XDM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } +else + XDM_CFLAGS=$pkg_cv_XDM_CFLAGS + XDM_LIBS=$pkg_cv_XDM_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +fi + +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBBSD" >&5 +printf %s "checking for LIBBSD... " >&6; } + +if test -n "$LIBBSD_CFLAGS"; then + pkg_cv_LIBBSD_CFLAGS="$LIBBSD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbsd-overlay\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libbsd-overlay") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBBSD_CFLAGS=`$PKG_CONFIG --cflags "libbsd-overlay" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBBSD_LIBS"; then + pkg_cv_LIBBSD_LIBS="$LIBBSD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbsd-overlay\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libbsd-overlay") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBBSD_LIBS=`$PKG_CONFIG --libs "libbsd-overlay" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBBSD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libbsd-overlay" 2>&1` + else + LIBBSD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbsd-overlay" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBBSD_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + : +else + LIBBSD_CFLAGS=$pkg_cv_LIBBSD_CFLAGS + LIBBSD_LIBS=$pkg_cv_LIBBSD_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + : +fi + + + # Function getifaddrs() comes from the C library, Solaris 11 -lsocket, or # the -lnsl name service library { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getifaddrs" >&5 @@ -20408,7 +20583,7 @@ return 0; } _ACEOF -for ac_lib in '' util bsd +for ac_lib in '' util do if test -z "$ac_lib"; then ac_res="none required" @@ -20446,6 +20621,48 @@ fi +if test "x$ac_cv_search_setproctitle" = "xno"; then + if test "x$LIBBSD_LIBS" != "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setproctitle in libbsd" >&5 +printf %s "checking for setproctitle in libbsd... " >&6; } + xdm_save_LIBS="$LIBS" + LIBS="$LIBS $XDM_LIBS $LIBBSD_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char setproctitle (); +int +main (void) +{ +return setproctitle (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + xdm_res="yes" +else $as_nop + xdm_res="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$xdm_save_LIBS" + if test "x$xdm_res" = "xyes" +then : + + XDM_CFLAGS="$XDM_CFLAGS $LIBBSD_CFLAGS" + XDM_LIBS="$XDM_LIBS $LIBBSD_LIBS" + +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xdm_res" >&5 +printf "%s\n" "$xdm_res" >&6; } + fi +fi + # Function setusercontext() is in BSD -lutil but N/A on Solaris or GNU systems { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5 printf %s "checking for library containing setusercontext... " >&6; } @@ -20507,7 +20724,7 @@ fi -# Function arc4random() is in BSD standard C or GNU systems -lbsd +# Function arc4random() is in BSD standard C, glibc 2.36+, or GNU systems -lbsd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing arc4random" >&5 printf %s "checking for library containing arc4random... " >&6; } if test ${ac_cv_search_arc4random+y} @@ -20530,7 +20747,7 @@ return 0; } _ACEOF -for ac_lib in '' bsd +for ac_lib in '' do if test -z "$ac_lib"; then ac_res="none required" @@ -20568,6 +20785,48 @@ fi +if test "x$ac_cv_search_arc4random" = "xno"; then + if test "x$LIBBSD_LIBS" != "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for arc4random in libbsd" >&5 +printf %s "checking for arc4random in libbsd... " >&6; } + xdm_save_LIBS="$LIBS" + LIBS="$LIBS $XDM_LIBS $LIBBSD_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char arc4random (); +int +main (void) +{ +return arc4random (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + xdm_res="yes" +else $as_nop + xdm_res="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$xdm_save_LIBS" + if test "x$xdm_res" = "xyes" +then : + + XDM_CFLAGS="$XDM_CFLAGS $LIBBSD_CFLAGS" + XDM_LIBS="$XDM_LIBS $LIBBSD_LIBS" + HAVE_ARC4RANDOM="yes" +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xdm_res" >&5 +printf "%s\n" "$xdm_res" >&6; } + fi +fi + if test x$HAVE_ARC4RANDOM = xyes; then HAVE_ARC4RANDOM_TRUE= HAVE_ARC4RANDOM_FALSE='#' @@ -20999,6 +21258,8 @@ fi +xdm_save_LIBS="$LIBS" +LIBS="$LIBS $XDM_LIBS" ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon" if test "x$ac_cv_func_daemon" = xyes then : @@ -21060,10 +21321,7 @@ fi - -XDM_CFLAGS="$XDM_CFLAGS" -GREETER_CFLAGS="$GREETER_CFLAGS" -CHOOSER_CFLAGS="$CHOOSER_CFLAGS" +LIBS="$xdm_save_LIBS" # Find needed libraries for TCP sockets (pre-pended in $LIBS) @@ -22146,104 +22404,25 @@ # Checks for pkg-config packages -pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XDM" >&5 -printf %s "checking for XDM... " >&6; } - -if test -n "$XDM_CFLAGS"; then - pkg_cv_XDM_CFLAGS="$XDM_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu x11 xau xproto >= 7.0.17\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xmu x11 xau xproto >= 7.0.17") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XDM_CFLAGS=`$PKG_CONFIG --cflags "xmu x11 xau xproto >= 7.0.17" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$XDM_LIBS"; then - pkg_cv_XDM_LIBS="$XDM_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu x11 xau xproto >= 7.0.17\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xmu x11 xau xproto >= 7.0.17") 2>&5 +# Check whether --with-xinerama was given. +if test ${with_xinerama+y} +then : + withval=$with_xinerama; USE_XINERAMA="$withval" +else $as_nop + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xinerama\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xinerama") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XDM_LIBS=`$PKG_CONFIG --libs "xmu x11 xau xproto >= 7.0.17" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes + USE_XINERAMA="yes" else - pkg_failed=yes + USE_XINERAMA="no" fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - XDM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xmu x11 xau xproto >= 7.0.17" 2>&1` - else - XDM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xmu x11 xau xproto >= 7.0.17" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$XDM_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (xmu x11 xau xproto >= 7.0.17) were not met: - -$XDM_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables XDM_CFLAGS -and XDM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables XDM_CFLAGS -and XDM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details" "$LINENO" 5; } -else - XDM_CFLAGS=$pkg_cv_XDM_CFLAGS - XDM_LIBS=$pkg_cv_XDM_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - fi -if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xinerama\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xinerama") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then +if test "x$USE_XINERAMA" = "xyes" ; then printf "%s\n" "#define USE_XINERAMA 1" >>confdefs.h @@ -22342,7 +22521,6 @@ CHOOSER_LIBS="$CHOOSER_LIBS $XINERAMA_LIBS" GREETER_CFLAGS="$GREETER_CFLAGS $XINERAMA_CFLAGS" GREETER_LIBS="$GREETER_LIBS $XINERAMA_LIBS" - fi # Xft text drawing for the greeter screen @@ -24259,7 +24437,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xdm $as_me 1.1.13, which was +This file was extended by xdm $as_me 1.1.14, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24319,7 +24497,7 @@ Configuration commands: $config_commands -Report bugs to <https://gitlab.freedesktop.org/xorg/app/xdm/issues>." +Report bugs to <https://gitlab.freedesktop.org/xorg/app/xdm/-/issues>." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` @@ -24327,7 +24505,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -xdm config.status 1.1.13 +xdm config.status 1.1.14 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/configure.ac new/xdm-1.1.14/configure.ac --- old/xdm-1.1.13/configure.ac 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/configure.ac 2022-12-03 22:38:28.000000000 +0100 @@ -22,8 +22,8 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xdm], [1.1.13], - [https://gitlab.freedesktop.org/xorg/app/xdm/issues], [xdm]) +AC_INIT([xdm], [1.1.14], + [https://gitlab.freedesktop.org/xorg/app/xdm/-/issues], [xdm]) AC_USE_SYSTEM_EXTENSIONS AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) @@ -58,6 +58,28 @@ # pre-pends the found library to $LIBS. # #------------------------------------------------------------------------------ + +PKG_CHECK_MODULES([XDM], [xmu x11 xau xproto >= 7.0.17]) +PKG_CHECK_MODULES([LIBBSD], [libbsd-overlay], [:], [:]) + +dnl Check in libbsd for functions that might be there if not already found +dnl XDM_SEARCH_LIBBSD(FUNCTION, PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +AC_DEFUN([XDM_SEARCH_LIBBSD],[ +if test "x$ac_cv_search_$1" = "xno"; then + if test "x$LIBBSD_LIBS" != "x"; then + AC_MSG_CHECKING([for $1 in libbsd]) + xdm_save_LIBS="$LIBS" + LIBS="$LIBS $[$2]_LIBS $LIBBSD_LIBS" + AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [xdm_res="yes"], [xdm_res="no"]) + LIBS="$xdm_save_LIBS" + AS_IF([test "x$xdm_res" = "xyes"], [ + $2_CFLAGS="$[$2]_CFLAGS $LIBBSD_CFLAGS" + $2_LIBS="$[$2]_LIBS $LIBBSD_LIBS" + [$3]], [$4]) + AC_MSG_RESULT([$xdm_res]) + fi +fi]) + # Function getifaddrs() comes from the C library, Solaris 11 -lsocket, or # the -lnsl name service library AC_SEARCH_LIBS([getifaddrs], [socket nsl]) @@ -67,13 +89,15 @@ AC_SEARCH_LIBS([getspnam], [sec gen shadow]) # Function setproctitle() is in BSD -lutil or GNU systems -lbsd but N/A on Solaris -AC_SEARCH_LIBS([setproctitle], [util bsd]) +AC_SEARCH_LIBS([setproctitle], [util]) +XDM_SEARCH_LIBBSD([setproctitle], [XDM]) # Function setusercontext() is in BSD -lutil but N/A on Solaris or GNU systems AC_SEARCH_LIBS([setusercontext], [util]) -# Function arc4random() is in BSD standard C or GNU systems -lbsd -AC_SEARCH_LIBS([arc4random], [bsd], [HAVE_ARC4RANDOM="yes"]) +# Function arc4random() is in BSD standard C, glibc 2.36+, or GNU systems -lbsd +AC_SEARCH_LIBS([arc4random], [], [HAVE_ARC4RANDOM="yes"]) +XDM_SEARCH_LIBBSD([arc4random], [XDM], [HAVE_ARC4RANDOM="yes"]) AC_SUBST(HAVE_ARC4RANDOM) AM_CONDITIONAL(HAVE_ARC4RANDOM, test x$HAVE_ARC4RANDOM = xyes) @@ -97,12 +121,11 @@ # Check for system library functions # Required system libraries have been searched for and are listed in $LIBS AC_FUNC_FORK +xdm_save_LIBS="$LIBS" +LIBS="$LIBS $XDM_LIBS" AC_CHECK_FUNCS([daemon sigaction openlog asprintf setproctitle setusercontext \ mkstemp getifaddrs getspnam arc4random]) - -XDM_CFLAGS="$XDM_CFLAGS" -GREETER_CFLAGS="$GREETER_CFLAGS" -CHOOSER_CFLAGS="$CHOOSER_CFLAGS" +LIBS="$xdm_save_LIBS" # Find needed libraries for TCP sockets (pre-pended in $LIBS) XTRANS_CONNECTION_FLAGS @@ -328,9 +351,13 @@ # Checks for pkg-config packages -PKG_CHECK_MODULES(XDM, [xmu x11 xau xproto >= 7.0.17]) +AC_ARG_WITH(xinerama, + AS_HELP_STRING([--with-xinerama], + [Use Xinerama (default is YES if installed)]), + [USE_XINERAMA="$withval"], + PKG_CHECK_EXISTS(xinerama, [USE_XINERAMA="yes"], [USE_XINERAMA="no"])) -PKG_CHECK_EXISTS(xinerama, [ +if test "x$USE_XINERAMA" = "xyes" ; then AC_DEFINE([USE_XINERAMA], 1, [Define to 1 to use XINERAMA in greeter & chooser]) PKG_CHECK_MODULES(XINERAMA, xinerama) @@ -338,7 +365,7 @@ CHOOSER_LIBS="$CHOOSER_LIBS $XINERAMA_LIBS" GREETER_CFLAGS="$GREETER_CFLAGS $XINERAMA_CFLAGS" GREETER_LIBS="$GREETER_LIBS $XINERAMA_LIBS" -]) +fi # Xft text drawing for the greeter screen AC_ARG_WITH(xft, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/greeter/Makefile.in new/xdm-1.1.14/greeter/Makefile.in --- old/xdm-1.1.13/greeter/Makefile.in 2022-04-03 23:45:26.000000000 +0200 +++ new/xdm-1.1.14/greeter/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -274,6 +274,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/include/Makefile.in new/xdm-1.1.14/include/Makefile.in --- old/xdm-1.1.13/include/Makefile.in 2022-04-03 23:45:26.000000000 +0200 +++ new/xdm-1.1.14/include/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -211,6 +211,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/man/Makefile.in new/xdm-1.1.14/man/Makefile.in --- old/xdm-1.1.13/man/Makefile.in 2022-04-03 23:45:26.000000000 +0200 +++ new/xdm-1.1.14/man/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -245,6 +245,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/Makefile.in new/xdm-1.1.14/xdm/Makefile.in --- old/xdm-1.1.13/xdm/Makefile.in 2022-04-03 23:45:26.000000000 +0200 +++ new/xdm-1.1.14/xdm/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -295,6 +295,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/access.c new/xdm-1.1.14/xdm/access.c --- old/xdm-1.1.13/xdm/access.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/access.c 2022-12-03 22:38:28.000000000 +0100 @@ -165,7 +165,7 @@ hostent = gethostbyname (localHostname()); if (hostent != NULL) { if (XdmcpAllocARRAY8 (&localAddress, hostent->h_length)) { - memmove(localAddress.data, hostent->h_addr, hostent->h_length); + memcpy(localAddress.data, hostent->h_addr, hostent->h_length); haveLocalAddress = 1; } } else { @@ -403,7 +403,7 @@ # endif return NULL; } - memmove( h->entry.hostAddress.data, addr, addr_length); + memcpy(h->entry.hostAddress.data, addr, addr_length); # if defined(IPv6) && defined(AF_INET6) if (ai) freeaddrinfo(ai); @@ -528,7 +528,7 @@ # endif return NULL; } - memmove( display->clientAddress.data, addr, addr_length); + memcpy(display->clientAddress.data, addr, addr_length); # if defined(IPv6) && defined(AF_INET6) if (ai) freeaddrinfo(ai); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/auth.c new/xdm-1.1.14/xdm/auth.c --- old/xdm-1.1.13/xdm/auth.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/auth.c 2022-12-03 22:38:28.000000000 +0100 @@ -683,7 +683,7 @@ free (new); return; } - memmove( new->address, auth->address, (int) auth->address_length); + memcpy(new->address, auth->address, (int) auth->address_length); } else new->address = NULL; if ((new->number_length = auth->number_length) > 0) { @@ -694,7 +694,7 @@ free (new); return; } - memmove( new->number, auth->number, (int) auth->number_length); + memcpy(new->number, auth->number, (int) auth->number_length); } else new->number = NULL; if ((new->name_length = auth->name_length) > 0) { @@ -706,7 +706,7 @@ free (new); return; } - memmove( new->name, auth->name, (int) auth->name_length); + memcpy(new->name, auth->name, (int) auth->name_length); } else new->name = NULL; new->family = auth->family; @@ -1052,7 +1052,7 @@ if (hp != NULL) { saddr.sa.sa_family = hp->h_addrtype; inetaddr = (struct sockaddr_in *) (&(saddr.sa)); - memmove( (char *) &(inetaddr->sin_addr), (char *) hp->h_addr, (int) hp->h_length); + memcpy(&(inetaddr->sin_addr), hp->h_addr, hp->h_length); family = ConvertAddr ( &(saddr.sa), &len, &addr); if ( family >= 0) { writeAddr (FamilyInternet, sizeof (inetaddr->sin_addr), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/choose.c new/xdm-1.1.14/xdm/choose.c --- old/xdm-1.1.13/xdm/choose.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/choose.c 2022-12-03 22:38:28.000000000 +0100 @@ -47,13 +47,8 @@ # include <ctype.h> # include <errno.h> - # ifdef HAVE_SETPROCTITLE -# ifdef __linux__ -# include <bsd/unistd.h> -# else -# include <unistd.h> -# endif +# include <unistd.h> # endif # include <time.h> @@ -227,8 +222,7 @@ result_buf[1] = netfamily & 0xFF; result_buf[2] = port[0]; result_buf[3] = port[1]; - memmove( (char *)result_buf+4, (char *)localAddress->data, - localAddress->length); + memcpy(result_buf+4, localAddress->data, localAddress->length); result_len = 4 + localAddress->length; } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/genauth.c new/xdm-1.1.14/xdm/genauth.c --- old/xdm-1.1.13/xdm/genauth.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/genauth.c 2022-12-03 22:38:28.000000000 +0100 @@ -41,11 +41,7 @@ #include <errno.h> #ifdef HAVE_ARC4RANDOM -# ifdef __linux__ -# include <bsd/stdlib.h> -# else -# include <stdlib.h> -# endif +# include <stdlib.h> #endif #include <time.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/krb5auth.c new/xdm-1.1.14/xdm/krb5auth.c --- old/xdm-1.1.13/xdm/krb5auth.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/krb5auth.c 2022-12-03 22:38:28.000000000 +0100 @@ -132,7 +132,7 @@ free (new); return (Xauth *) 0; } - memmove( new->name, name, namelen); + memcpy(new->name, name, namelen); new->name_length = namelen; return new; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/mitauth.c new/xdm-1.1.14/xdm/mitauth.c --- old/xdm-1.1.13/xdm/mitauth.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/mitauth.c 2022-12-03 22:38:28.000000000 +0100 @@ -79,7 +79,7 @@ free (new); return (Xauth *) 0; } - memmove( (char *)new->name, name, namelen); + memcpy(new->name, name, namelen); new->name_length = namelen; if (!GenerateAuthData (new->data, AUTH_DATA_LEN)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/policy.c new/xdm-1.1.14/xdm/policy.c --- old/xdm-1.1.13/xdm/policy.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/policy.c 2022-12-03 22:38:28.000000000 +0100 @@ -161,7 +161,7 @@ if (!status->data) status->length = 0; else - memmove( status->data, statusBuf, status->length); + memcpy(status->data, statusBuf, status->length); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/protodpy.c new/xdm-1.1.14/xdm/protodpy.c --- old/xdm-1.1.13/xdm/protodpy.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/protodpy.c 2022-12-03 22:38:28.000000000 +0100 @@ -116,7 +116,7 @@ return NULL; } pdpy->addrlen = addrlen; - memmove( pdpy->address, address, addrlen); + memcpy(pdpy->address, address, addrlen); pdpy->displayNumber = displayNumber; pdpy->connectionType = connectionType; pdpy->date = date; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/rpcauth.c new/xdm-1.1.14/xdm/rpcauth.c --- old/xdm-1.1.13/xdm/rpcauth.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/rpcauth.c 2022-12-03 22:38:28.000000000 +0100 @@ -82,8 +82,8 @@ free (new); return (Xauth *) 0; } - memmove( new->name, name, namelen); + memcpy(new->name, name, namelen); new->name_length = namelen; - memmove( new->data, key, new->data_length); + memcpy(new->data, key, new->data_length); return new; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/server.c new/xdm-1.1.14/xdm/server.c --- old/xdm-1.1.13/xdm/server.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/server.c 2022-12-03 22:38:28.000000000 +0100 @@ -257,7 +257,7 @@ d->peer = malloc (len); if (d->peer) { - memmove( (char *) d->peer, buf, len); + memcpy(d->peer, buf, len); d->peerlen = len; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/session.c new/xdm-1.1.14/xdm/session.c --- old/xdm-1.1.13/xdm/session.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/session.c 2022-12-03 22:38:28.000000000 +0100 @@ -53,11 +53,7 @@ # ifdef HAVE_SETPROCTITLE # include <sys/types.h> -# ifdef __linux__ -# include <bsd/unistd.h> -# else -# include <unistd.h> -# endif +# include <unistd.h> # endif #ifndef USE_PAM /* PAM modules should handle these */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/socket.c new/xdm-1.1.14/xdm/socket.c --- old/xdm-1.1.13/xdm/socket.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/socket.c 2022-12-03 22:38:28.000000000 +0100 @@ -116,6 +116,8 @@ return -1; /* TODO check other listening sockets */ if (getsockname (chooserFd, (struct sockaddr *)&in_addr, (void *)&len) < 0) return -1; + if (len > sizeof in_addr) + return -1; # if defined(IPv6) && defined(AF_INET6) if (((struct sockaddr *)&in_addr)->sa_family == AF_INET6) Debug ("Chooser socket port: %d (IPv6)\n", @@ -127,7 +129,7 @@ if (*lenp < len) retval = -2; else - memmove( addr, (char *) &in_addr, len); + memcpy(addr, &in_addr, len); *lenp = len; return retval; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/xdmauth.c new/xdm-1.1.14/xdm/xdmauth.c --- old/xdm-1.1.13/xdm/xdmauth.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/xdmauth.c 2022-12-03 22:38:28.000000000 +0100 @@ -111,7 +111,7 @@ free (new); return (Xauth *) 0; } - memmove( (char *)new->name, name, namelen); + memcpy(new->name, name, namelen); new->name_length = namelen; if (!GenerateAuthData ((char *)new->data, new->data_length)) { @@ -172,9 +172,9 @@ * which is simply the number we've been passing back and * forth via XDMCP */ - memmove( fileauth->name, xdmcpauth->name, xdmcpauth->name_length); - memmove( fileauth->data, pdpy->authenticationData.data, 8); - memmove( fileauth->data + 8, xdmcpauth->data, 8); + memcpy(fileauth->name, xdmcpauth->name, xdmcpauth->name_length); + memcpy(fileauth->data, pdpy->authenticationData.data, 8); + memcpy(fileauth->data + 8, xdmcpauth->data, 8); XdmPrintDataHex ("Accept packet auth", xdmcpauth->data, xdmcpauth->data_length); XdmPrintDataHex ("Auth file auth", fileauth->data, fileauth->data_length); /* encrypt the session key for its trip back to the server */ @@ -245,7 +245,7 @@ while (keylen < 7) key[keylen++] = '\0'; pdpy->key.data[0] = '\0'; - memmove( pdpy->key.data + 1, key, 7); + memcpy(pdpy->key.data + 1, key, 7); bzero(key, sizeof(key)); fclose (keys); return TRUE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdm/xdmcp.c new/xdm-1.1.14/xdm/xdmcp.c --- old/xdm-1.1.13/xdm/xdmcp.c 2022-04-03 23:45:15.000000000 +0200 +++ new/xdm-1.1.14/xdm/xdmcp.c 2022-12-03 22:38:28.000000000 +0100 @@ -163,7 +163,7 @@ in_addr.sin_port = htons ((short) XDM_UDP_PORT); if (address->length != 4) return; - memmove( (char *) &in_addr.sin_addr, address->data, address->length); + memcpy(&in_addr.sin_addr, address->data, address->length); addrlen = sizeof (struct sockaddr_in); break; # endif @@ -178,7 +178,7 @@ in6_addr.sin6_port = htons ((short) XDM_UDP_PORT); if (address->length != 16) return; - memmove( (char *) &in6_addr.sin6_addr, address->data, address->length); + memcpy(&in6_addr.sin6_addr, address->data, address->length); addrlen = sizeof (struct sockaddr_in6); break; # endif @@ -204,12 +204,12 @@ data = NetaddrPort((XdmcpNetaddr) from, &length); XdmcpAllocARRAY8 (port, length); - memmove( port->data, data, length); + memcpy(port->data, data, length); port->length = length; family = ConvertAddr((XdmcpNetaddr) from, &length, &data); XdmcpAllocARRAY8 (addr, length); - memmove( addr->data, data, length); + memcpy(addr->data, data, length); addr->length = length; *type = family; @@ -235,6 +235,10 @@ # endif family = ConvertAddr((XdmcpNetaddr) from, &length, (char **)&(addr.data)); + if (family < 0) { + Debug("all_query_respond: ConvertAddr failed: conntype=%d\n", family); + return; + } addr.length = length; /* convert int to short */ if (debugLevel > 0) { # if defined(IPv6) && defined(AF_INET6) @@ -254,8 +258,6 @@ Debug("all_query_respond: conntype=%d, addr=%s, len=%d\n", family, addrstring, addr.length); } - if (family < 0) - return; connectionType = family; if (type == INDIRECT_QUERY) @@ -743,8 +745,8 @@ in_addr.sin_len = sizeof(in_addr); # endif in_addr.sin_family = AF_INET; - memmove( &in_addr.sin_addr, clientAddress.data, 4); - memmove( (char *) &in_addr.sin_port, clientPort.data, 2); + memcpy(&in_addr.sin_addr, clientAddress.data, 4); + memcpy(&in_addr.sin_port, clientPort.data, 2); client = (struct sockaddr *) &in_addr; clientlen = sizeof (in_addr); all_query_respond (client, clientlen, &authenticationNames, @@ -768,7 +770,7 @@ # endif in6_addr.sin6_family = AF_INET6; if (clientAddress.length == 16) { - memmove(in6_addr.sin6_addr.s6_addr, clientAddress.data, 16); + memcpy(in6_addr.sin6_addr.s6_addr, clientAddress.data, 16); } else { /* If the client wants to forward the xdm server to an ipv4 hosts it sends an ipv4 address in the forward @@ -783,9 +785,10 @@ */ in6_addr.sin6_addr.s6_addr[10] = 0xff; in6_addr.sin6_addr.s6_addr[11] = 0xff; - memmove(in6_addr.sin6_addr.s6_addr + 12, clientAddress.data, 4); + memcpy(in6_addr.sin6_addr.s6_addr + 12, + clientAddress.data, 4); } - memmove((char *) &in6_addr.sin6_port, clientPort.data, 2); + memcpy(&in6_addr.sin6_port, clientPort.data, 2); client = (struct sockaddr *) &in6_addr; clientlen = sizeof (in6_addr); all_query_respond (client, clientlen, &authenticationNames, @@ -802,7 +805,8 @@ goto badAddress; bzero ((char *) &un_addr, sizeof (un_addr)); un_addr.sun_family = AF_UNIX; - memmove( un_addr.sun_path, clientAddress.data, clientAddress.length); + memcpy(un_addr.sun_path, clientAddress.data, + clientAddress.length); un_addr.sun_path[clientAddress.length] = '\0'; client = (struct sockaddr *) &un_addr; # if defined(BSD44SOCKETS) && defined(UNIXCONN) @@ -1190,7 +1194,7 @@ } if (displayClass.length) { - memmove( class, displayClass.data, displayClass.length); + memcpy(class, displayClass.data, displayClass.length); class[displayClass.length] = '\0'; } else @@ -1205,7 +1209,7 @@ "out of memory", fd); goto abort; } - memmove( from_save, from, fromlen); + memcpy(from_save, from, fromlen); d = NewDisplay (name, class); if (!d) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdm-1.1.13/xdmshell/Makefile.in new/xdm-1.1.14/xdmshell/Makefile.in --- old/xdm-1.1.13/xdmshell/Makefile.in 2022-04-03 23:45:26.000000000 +0200 +++ new/xdm-1.1.14/xdmshell/Makefile.in 2022-12-03 22:38:39.000000000 +0100 @@ -243,6 +243,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ +LIBBSD_LIBS = @LIBBSD_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@
