pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/xscreensaver Fix xscreensaver for at least argon2 ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ef85f6703b81
branches:  trunk
changeset: 380198:ef85f6703b81
user:      abs <abs%pkgsrc.org@localhost>
date:      Tue May 31 08:14:44 2022 +0000

description:
Fix xscreensaver for at least argon2 passwords on NetBSD

Limit "terminating pw_passwd at first ," behaviour to HP-UX, as
it breaks at least argon2 passwords on NetBSD

Bump PKGREVISION

diffstat:

 x11/xscreensaver/Makefile                            |   4 +-
 x11/xscreensaver/distinfo                            |   3 +-
 x11/xscreensaver/patches/patch-driver_passwd-pwent.c |  34 ++++++++++++++++++++
 3 files changed, 38 insertions(+), 3 deletions(-)

diffs (63 lines):

diff -r cf0a4e624a89 -r ef85f6703b81 x11/xscreensaver/Makefile
--- a/x11/xscreensaver/Makefile Mon May 30 23:58:13 2022 +0000
+++ b/x11/xscreensaver/Makefile Tue May 31 08:14:44 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.139 2022/05/11 11:31:19 wiz Exp $
+# $NetBSD: Makefile,v 1.140 2022/05/31 08:14:44 abs Exp $
 
 DISTNAME=              xscreensaver-6.03
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            x11
 MASTER_SITES=          https://www.jwz.org/xscreensaver/
 DIST_SUBDIR=           xscreensaver
diff -r cf0a4e624a89 -r ef85f6703b81 x11/xscreensaver/distinfo
--- a/x11/xscreensaver/distinfo Mon May 30 23:58:13 2022 +0000
+++ b/x11/xscreensaver/distinfo Tue May 31 08:14:44 2022 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.88 2022/03/08 07:27:11 wiz Exp $
+$NetBSD: distinfo,v 1.89 2022/05/31 08:14:44 abs Exp $
 
 BLAKE2s (xscreensaver/xscreensaver-6.03.tar.gz) = de81815922c9ae70ea281c694d414b0fa6d88a597755f68d96a596423641b0ce
 SHA512 (xscreensaver/xscreensaver-6.03.tar.gz) = 4aa30824c972a73dc09aeba478cad074f273839a4c7641cddd292da38fc75db10a3f6243cbe8619c5e39cad54c27d33e1e271dfed167458faa7747fb0a090630
 Size (xscreensaver/xscreensaver-6.03.tar.gz) = 25703584 bytes
 SHA1 (patch-configure) = 4821b6f4400976990b6042677960a53e25f03a24
+SHA1 (patch-driver_passwd-pwent.c) = 599a63eda4b890d4673b0e2763d980afb4d44a4e
diff -r cf0a4e624a89 -r ef85f6703b81 x11/xscreensaver/patches/patch-driver_passwd-pwent.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xscreensaver/patches/patch-driver_passwd-pwent.c      Tue May 31 08:14:44 2022 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-driver_passwd-pwent.c,v 1.1 2022/05/31 08:14:44 abs Exp $
+
+Limit "terminating pw_passwd at first ," behaviour to HP-UX, as
+it breaks at least argon2 passwords on NetBSD
+
+--- driver/passwd-pwent.c.orig 2021-10-04 22:18:28.082371172 +0000
++++ driver/passwd-pwent.c
+@@ -163,6 +163,7 @@ get_encrypted_passwd (const char *user)
+         result = strdup(p->pw_passwd);
+     }
+ 
++#ifdef HAVE_HPUX_PASSWD
+   /* The manual for passwd(4) on HPUX 10.10 says:
+ 
+         Password aging is put in effect for a particular user if his
+@@ -173,6 +174,10 @@ get_encrypted_passwd (const char *user)
+      So this means that passwd->pw_passwd isn't simply a string of cyphertext,
+      it might have trailing junk.  So, if there is a comma in the string, and
+      that comma is beyond position 13, terminate the string before the comma.
++
++     Note: This behaviour can break other systems where comma separated data
++     is significant, such as argon2 passwords on NetBSD, so conditionalise
++     to HAVE_HPUX_PASSWD
+    */
+   if (result && strlen(result) > 13)
+     {
+@@ -180,6 +185,7 @@ get_encrypted_passwd (const char *user)
+       if (s)
+       *s = 0;
+     }
++# endif /* HAVE_HPUX_PASSWD */
+ 
+   /* We only issue this warning in non-verbose mode if not compiled with
+      support for PAM.  If we're using PAM, it's common for pwent passwords



Home | Main Index | Thread Index | Old Index