Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/xorg]: xsrc/external/mit/xdm/dist initial import of xdm-1.1.14



details:   https://anonhg.NetBSD.org/xsrc/rev/1c036fa9a79f
branches:  xorg
changeset: 7332:1c036fa9a79f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jan 08 09:18:31 2023 +0000

description:
initial import of xdm-1.1.14

diffstat:

 external/mit/xdm/dist/ChangeLog                |  118 ++++++
 external/mit/xdm/dist/Makefile.in              |    2 +
 external/mit/xdm/dist/app-defaults/Makefile.in |    2 +
 external/mit/xdm/dist/chooser/Makefile.in      |    2 +
 external/mit/xdm/dist/chooser/chooser.c        |   19 +-
 external/mit/xdm/dist/config/Makefile.in       |    2 +
 external/mit/xdm/dist/configure                |  422 +++++++++++++++++-------
 external/mit/xdm/dist/configure.ac             |   51 ++-
 external/mit/xdm/dist/greeter/Makefile.in      |    2 +
 external/mit/xdm/dist/include/Makefile.in      |    2 +
 external/mit/xdm/dist/man/Makefile.in          |    2 +
 external/mit/xdm/dist/xdm/Makefile.in          |    2 +
 external/mit/xdm/dist/xdm/access.c             |    6 +-
 external/mit/xdm/dist/xdm/auth.c               |    8 +-
 external/mit/xdm/dist/xdm/choose.c             |   10 +-
 external/mit/xdm/dist/xdm/genauth.c            |    6 +-
 external/mit/xdm/dist/xdm/krb5auth.c           |    2 +-
 external/mit/xdm/dist/xdm/mitauth.c            |    2 +-
 external/mit/xdm/dist/xdm/policy.c             |    2 +-
 external/mit/xdm/dist/xdm/protodpy.c           |    2 +-
 external/mit/xdm/dist/xdm/rpcauth.c            |    4 +-
 external/mit/xdm/dist/xdm/server.c             |    2 +-
 external/mit/xdm/dist/xdm/session.c            |    6 +-
 external/mit/xdm/dist/xdm/socket.c             |    4 +-
 external/mit/xdm/dist/xdm/xdmauth.c            |   10 +-
 external/mit/xdm/dist/xdm/xdmcp.c              |   32 +-
 external/mit/xdm/dist/xdmshell/Makefile.in     |    2 +
 27 files changed, 528 insertions(+), 196 deletions(-)

diffs (truncated from 1416 to 300 lines):

diff -r 8755d8b1c7c7 -r 1c036fa9a79f external/mit/xdm/dist/ChangeLog
--- a/external/mit/xdm/dist/ChangeLog   Sun Jan 08 09:18:29 2023 +0000
+++ b/external/mit/xdm/dist/ChangeLog   Sun Jan 08 09:18:31 2023 +0000
@@ -1,3 +1,121 @@
+commit 022b959f5f26e6b70d2ab6524ca39b5934e4c42e
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Dec 3 13:34:29 2022 -0800
+
+    xdm 1.1.14
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 968b9c0b390f15f44ab4f3ee5fce23a9cec60720
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+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 <alan.coopersmith%oracle.com@localhost>
+
+commit 8a10c98d29d0ff2028f109b5671dfae2910df051
+Author: Guillem Jover <guillem%hadrons.org@localhost>
+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 <guillem%hadrons.org@localhost>
+
+commit 468b76023a2dfb750c4d5e9b184f230c5b6ec670
+Author: Callum Farmer <gmbr3%opensuse.org@localhost>
+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 <gmbr3%opensuse.org@localhost>
+
+commit 0f46b67b45ef40854ad7924e836134bf3f920e09
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+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 <alan.coopersmith%oracle.com@localhost>
+
+commit 3544fa9ec2e17e481785382317ef93ec2ac32ddf
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+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 <alan.coopersmith%oracle.com@localhost>
+
+commit f01b28cf76d641881fa1c5bf7f9dd2487b9ced6b
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+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 <alan.coopersmith%oracle.com@localhost>
+
+commit 00e0b3ae11bb1d4681b0206c341f57fc46ea98b1
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+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 <alan.coopersmith%oracle.com@localhost>
+
+commit c7daccd105a74fe97adb2c8e2842e3b19d5dd34c
+Author: Matt Turner <mattst88%gmail.com@localhost>
+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 <mattst88%gmail.com@localhost>
+
 commit df5bb7f4e4039192571de75179658ee9c2ee58eb
 Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
 Date:   Sun Apr 3 14:42:16 2022 -0700
diff -r 8755d8b1c7c7 -r 1c036fa9a79f external/mit/xdm/dist/Makefile.in
--- a/external/mit/xdm/dist/Makefile.in Sun Jan 08 09:18:29 2023 +0000
+++ b/external/mit/xdm/dist/Makefile.in Sun Jan 08 09:18:31 2023 +0000
@@ -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 -r 8755d8b1c7c7 -r 1c036fa9a79f external/mit/xdm/dist/app-defaults/Makefile.in
--- a/external/mit/xdm/dist/app-defaults/Makefile.in    Sun Jan 08 09:18:29 2023 +0000
+++ b/external/mit/xdm/dist/app-defaults/Makefile.in    Sun Jan 08 09:18:31 2023 +0000
@@ -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 -r 8755d8b1c7c7 -r 1c036fa9a79f external/mit/xdm/dist/chooser/Makefile.in
--- a/external/mit/xdm/dist/chooser/Makefile.in Sun Jan 08 09:18:29 2023 +0000
+++ b/external/mit/xdm/dist/chooser/Makefile.in Sun Jan 08 09:18:31 2023 +0000
@@ -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 -r 8755d8b1c7c7 -r 1c036fa9a79f external/mit/xdm/dist/chooser/chooser.c
--- a/external/mit/xdm/dist/chooser/chooser.c   Sun Jan 08 09:18:29 2023 +0000
+++ b/external/mit/xdm/dist/chooser/chooser.c   Sun Jan 08 09:18:31 2023 +0000
@@ -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 -r 8755d8b1c7c7 -r 1c036fa9a79f external/mit/xdm/dist/config/Makefile.in
--- a/external/mit/xdm/dist/config/Makefile.in  Sun Jan 08 09:18:29 2023 +0000
+++ b/external/mit/xdm/dist/config/Makefile.in  Sun Jan 08 09:18:31 2023 +0000
@@ -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 -r 8755d8b1c7c7 -r 1c036fa9a79f external/mit/xdm/dist/configure
--- a/external/mit/xdm/dist/configure   Sun Jan 08 09:18:29 2023 +0000
+++ b/external/mit/xdm/dist/configure   Sun Jan 08 09:18:31 2023 +0000
@@ -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 bug-autoconf%gnu.org@localhost 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



Home | Main Index | Thread Index | Old Index