summaryrefslogtreecommitdiffstats
path: root/source/x/x11/patch/xdm/xdm.arc4random.diff
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2022-10-15 20:28:34 +0000
committer Eric Hameleers <alien@slackware.com>2022-10-16 07:00:18 +0200
commit8640934374be30c1d60f9b6b0ebc83a2523d230b (patch)
treea46aa86600c798da0951ca835f9c95f6993f5cb4 /source/x/x11/patch/xdm/xdm.arc4random.diff
parent232faa766ea27511929ce11bee49205d2a823fc1 (diff)
downloadcurrent-8640934374be30c1d60f9b6b0ebc83a2523d230b.tar.gz
current-8640934374be30c1d60f9b6b0ebc83a2523d230b.tar.xz
Sat Oct 15 20:28:34 UTC 202220221015202834
a/kernel-firmware-20221013_49fccf6-noarch-1.txz: Upgraded. a/kernel-generic-5.19.16-x86_64-1.txz: Upgraded. a/kernel-huge-5.19.16-x86_64-1.txz: Upgraded. a/kernel-modules-5.19.16-x86_64-1.txz: Upgraded. ap/man-db-2.11.0-x86_64-1.txz: Upgraded. ap/man-pages-6.00-noarch-1.txz: Upgraded. d/kernel-headers-5.19.16-x86-1.txz: Upgraded. k/kernel-source-5.19.16-noarch-1.txz: Upgraded. l/libedit-20221009_3.1-x86_64-1.txz: Upgraded. l/mozilla-nss-3.84-x86_64-1.txz: Upgraded. l/nodejs-18.11.0-x86_64-1.txz: Upgraded. l/zlib-1.2.13-x86_64-1.txz: Upgraded. Fixed a bug when getting a gzip header extra field with inflateGetHeader(). For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-37434 (* Security fix *) n/fetchmail-6.4.34-x86_64-1.txz: Upgraded. n/gnupg2-2.2.40-x86_64-1.txz: Upgraded. x/bdftopcf-1.1.1-x86_64-1.txz: Upgraded. x/libwacom-2.5.0-x86_64-1.txz: Upgraded. x/smproxy-1.0.7-x86_64-1.txz: Upgraded. x/viewres-1.0.7-x86_64-1.txz: Upgraded. x/xditview-1.0.6-x86_64-1.txz: Upgraded. x/xf86-input-vmmouse-13.2.0-x86_64-1.txz: Added. x/xgc-1.0.6-x86_64-1.txz: Upgraded. x/xkbprint-1.0.6-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to '')
-rw-r--r--source/x/x11/patch/xdm/xdm.arc4random.diff67
1 files changed, 67 insertions, 0 deletions
diff --git a/source/x/x11/patch/xdm/xdm.arc4random.diff b/source/x/x11/patch/xdm/xdm.arc4random.diff
new file mode 100644
index 000000000..06948e63e
--- /dev/null
+++ b/source/x/x11/patch/xdm/xdm.arc4random.diff
@@ -0,0 +1,67 @@
+diff -aurN xdm-1.1.11/xdm/genauth.c xdm-20220911_468b760/xdm/genauth.c
+--- xdm-1.1.11/xdm/genauth.c 2011-09-25 09:35:47.000000000 +0200
++++ xdm-20220911_468b760/xdm/genauth.c 2022-10-08 06:24:57.000000000 +0200
+@@ -40,6 +40,22 @@
+
+ #include <errno.h>
+
++#ifdef HAVE_ARC4RANDOM
++# ifdef __linux__
++# if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
++# if __GLIBC_PREREQ(2, 36)
++# include <stdlib.h>
++# else
++# include <bsd/stdlib.h>
++# endif
++# else
++# include <bsd/stdlib.h>
++# endif
++# else
++# include <stdlib.h>
++# endif
++#endif
++
+ #include <time.h>
+ #define Time_t time_t
+
+@@ -372,7 +388,7 @@
+ randomDevice, errno);
+ }
+ # endif
+- /* Try some pseudo-random number genrator daemon next */
++ /* Try some pseudo-random number generator daemon next */
+ if (prngdSocket != NULL || prngdPort != 0) {
+ if (get_prngd_bytes((char *)tmpkey, sizeof(tmpkey), prngdPort,
+ prngdSocket) == 0) {
+@@ -408,15 +424,20 @@
+ static int xdmcpAuthInited;
+ long ldata[2];
+
+-# ifdef ITIMER_REAL
++# ifndef HAVE_ARC4RANDOM
++# ifdef ITIMER_REAL
+ struct timeval now;
+
+ X_GETTIMEOFDAY (&now);
+ ldata[0] = now.tv_usec;
+ ldata[1] = now.tv_sec;
+-# else
++# else
+ ldata[0] = time ((long *) 0);
+ ldata[1] = getpid ();
++# endif
++# else
++ ldata[0] = arc4random();
++ ldata[1] = arc4random();
+ # endif
+
+ longtochars (ldata[0], data+0);
+@@ -462,7 +483,7 @@
+ LogError("Cannot open randomDevice \"%s\", errno = %d\n",
+ randomDevice, errno);
+ # endif /* DEV_RANDOM */
+- /* Try some pseudo-random number genrator daemon next */
++ /* Try some pseudo-random number generator daemon next */
+ if (prngdSocket != NULL || prngdPort != 0) {
+ if (get_prngd_bytes(auth, len, prngdPort, prngdSocket) == 0) {
+ return 1;