git: 7b4ba79abfbb - main - net/pam-nss-ldapd: Update to 0.9.13

From: Ryan Steinmetz <zi_at_FreeBSD.org>
Date: Wed, 23 Apr 2025 14:45:02 UTC
The branch main has been updated by zi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7b4ba79abfbbe24fa8dbcac4ca8218a8089532bc

commit 7b4ba79abfbbe24fa8dbcac4ca8218a8089532bc
Author:     Ryan Steinmetz <zi@FreeBSD.org>
AuthorDate: 2025-04-23 14:43:45 +0000
Commit:     Ryan Steinmetz <zi@FreeBSD.org>
CommitDate: 2025-04-23 14:44:53 +0000

    net/pam-nss-ldapd: Update to 0.9.13
    
    PR:             286039
    Reported by:    Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
---
 net/nss-pam-ldapd/Makefile                         |  5 ++--
 net/nss-pam-ldapd/distinfo                         |  6 ++--
 .../files/lclass-patches/patch-nslcd__attmap.c     |  8 +++---
 .../files/lclass-patches/patch-nslcd__attmap.h     |  6 ++--
 .../files/lclass-patches/patch-nslcd__passwd.c     | 14 ++++-----
 .../files/lclass-patches/patch-nss__passwd.c       |  6 ++--
 net/nss-pam-ldapd/files/patch-Makefile.in          |  4 +--
 net/nss-pam-ldapd/files/patch-config.h.in          |  8 +++---
 net/nss-pam-ldapd/files/patch-configure            |  4 +--
 net/nss-pam-ldapd/files/patch-nslcd_daemonize.c    | 33 ----------------------
 net/nss-pam-ldapd/files/patch-nslcd_invalidator.c  | 29 -------------------
 11 files changed, 30 insertions(+), 93 deletions(-)

diff --git a/net/nss-pam-ldapd/Makefile b/net/nss-pam-ldapd/Makefile
index 04eec308d426..e747fc56680d 100644
--- a/net/nss-pam-ldapd/Makefile
+++ b/net/nss-pam-ldapd/Makefile
@@ -1,13 +1,12 @@
 PORTNAME=		nss-pam-ldapd
-PORTVERSION=		0.9.12
-PORTREVISION=		2
+DISTVERSION=		0.9.13
 CATEGORIES=		net
 MASTER_SITES=		http://arthurdejong.org/nss-pam-ldapd/ \
 			ZI
 
 MAINTAINER?=		zi@FreeBSD.org
 COMMENT?=		Advanced fork of nss_ldap
-WWW=		https://arthurdejong.org/nss-pam-ldapd/
+WWW=			https://arthurdejong.org/nss-pam-ldapd/
 
 LICENSE=		LGPL21 LGPL3
 LICENSE_COMB=		dual
diff --git a/net/nss-pam-ldapd/distinfo b/net/nss-pam-ldapd/distinfo
index a276aed8191e..059ae1c23683 100644
--- a/net/nss-pam-ldapd/distinfo
+++ b/net/nss-pam-ldapd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1649433966
-SHA256 (nss-pam-ldapd-0.9.12.tar.gz) = c6d661e74693cbf531a790631ca93b73f291fb23cc39465b09deb8da2bfb0e14
-SIZE (nss-pam-ldapd-0.9.12.tar.gz) = 791983
+TIMESTAMP = 1744377192
+SHA256 (nss-pam-ldapd-0.9.13.tar.gz) = e01784e17cb533bb66bd0601e205e785263445c3c2df7a6f90232ab4131c716d
+SIZE (nss-pam-ldapd-0.9.13.tar.gz) = 808355
diff --git a/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__attmap.c b/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__attmap.c
index b326d1830662..9227b3f718ca 100644
--- a/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__attmap.c
+++ b/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__attmap.c
@@ -1,6 +1,6 @@
---- nslcd/attmap.c.orig	2019-11-02 16:23:45.000000000 +0100
-+++ nslcd/attmap.c	2023-05-29 19:22:02.233300000 +0200
-@@ -176,6 +176,7 @@
+--- nslcd/attmap.c.orig	2025-02-09 14:17:17 UTC
++++ nslcd/attmap.c
+@@ -176,6 +176,7 @@ const char **attmap_get_var(enum ldap_map_selector map
      if (strcasecmp(name, "gecos") == 0)             return &attmap_passwd_gecos;
      if (strcasecmp(name, "homeDirectory") == 0)     return &attmap_passwd_homeDirectory;
      if (strcasecmp(name, "loginShell") == 0)        return &attmap_passwd_loginShell;
@@ -8,7 +8,7 @@
    }
    else if (map == LM_PROTOCOLS)
    {
-@@ -230,6 +231,7 @@
+@@ -230,6 +231,7 @@ const char *attmap_set_mapping(const char **var, const
          (var != &attmap_shadow_shadowWarning) &&
          (var != &attmap_shadow_shadowInactive) &&
          (var != &attmap_shadow_shadowExpire) &&
diff --git a/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__attmap.h b/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__attmap.h
index 7100e2924193..fd6692d77031 100644
--- a/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__attmap.h
+++ b/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__attmap.h
@@ -1,6 +1,6 @@
---- nslcd/attmap.h.orig	2021-11-15 20:40:49.000000000 +0100
-+++ nslcd/attmap.h	2023-05-29 19:22:02.233912000 +0200
-@@ -67,6 +67,7 @@
+--- nslcd/attmap.h.orig	2023-06-17 15:32:13 UTC
++++ nslcd/attmap.h
+@@ -67,6 +67,7 @@ extern const char *attmap_shadow_shadowFlag;
  extern const char *attmap_shadow_shadowInactive;
  extern const char *attmap_shadow_shadowExpire;
  extern const char *attmap_shadow_shadowFlag;
diff --git a/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__passwd.c b/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__passwd.c
index 1689f2afec2a..4bbca20e0d40 100644
--- a/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__passwd.c
+++ b/net/nss-pam-ldapd/files/lclass-patches/patch-nslcd__passwd.c
@@ -1,6 +1,6 @@
---- nslcd/passwd.c.orig	2021-11-15 20:40:49.000000000 +0100
-+++ nslcd/passwd.c	2023-05-29 19:22:02.234797000 +0200
-@@ -63,6 +63,7 @@
+--- nslcd/passwd.c.orig	2025-02-09 14:17:17 UTC
++++ nslcd/passwd.c
+@@ -63,6 +63,7 @@ const char *attmap_passwd_loginShell    = "loginShell"
  const char *attmap_passwd_gecos         = "\"${gecos:-$cn}\"";
  const char *attmap_passwd_homeDirectory = "homeDirectory";
  const char *attmap_passwd_loginShell    = "loginShell";
@@ -8,7 +8,7 @@
  
  /* special properties for objectSid-based searches
     (these are already LDAP-escaped strings) */
-@@ -150,6 +151,7 @@
+@@ -150,6 +151,7 @@ void passwd_init(void)
    attmap_add_attributes(set, attmap_passwd_gecos);
    attmap_add_attributes(set, attmap_passwd_homeDirectory);
    attmap_add_attributes(set, attmap_passwd_loginShell);
@@ -16,7 +16,7 @@
    passwd_attrs = set_tolist(set);
    if (passwd_attrs == NULL)
    {
-@@ -428,6 +430,7 @@
+@@ -436,6 +438,7 @@ static int write_passwd(TFILE *fp, MYLDAP_ENTRY *entry
    char gecos[1024];
    char homedir[256];
    char shell[64];
@@ -24,7 +24,7 @@
    char passbuffer[BUFLEN_PASSWORDHASH];
    int i, j;
    /* get the usernames for this entry */
-@@ -541,6 +544,8 @@
+@@ -549,6 +552,8 @@ static int write_passwd(TFILE *fp, MYLDAP_ENTRY *entry
              myldap_get_dn(entry), attmap_passwd_homeDirectory);
    /* get the shell for this entry */
    attmap_get_value(entry, attmap_passwd_loginShell, shell, sizeof(shell));
@@ -33,7 +33,7 @@
    /* write the entries */
    for (i = 0; usernames[i] != NULL; i++)
    {
-@@ -565,6 +570,7 @@
+@@ -573,6 +578,7 @@ static int write_passwd(TFILE *fp, MYLDAP_ENTRY *entry
              WRITE_STRING(fp, gecos);
              WRITE_STRING(fp, homedir);
              WRITE_STRING(fp, shell);
diff --git a/net/nss-pam-ldapd/files/lclass-patches/patch-nss__passwd.c b/net/nss-pam-ldapd/files/lclass-patches/patch-nss__passwd.c
index cad4bfffda85..77c9eb0b8f32 100644
--- a/net/nss-pam-ldapd/files/lclass-patches/patch-nss__passwd.c
+++ b/net/nss-pam-ldapd/files/lclass-patches/patch-nss__passwd.c
@@ -1,6 +1,6 @@
---- nss/passwd.c.orig	2019-11-02 16:23:46.000000000 +0100
-+++ nss/passwd.c	2023-05-29 19:22:02.235416000 +0200
-@@ -45,8 +45,8 @@
+--- nss/passwd.c.orig	2021-01-17 13:59:24 UTC
++++ nss/passwd.c
+@@ -45,8 +45,8 @@ static nss_status_t read_passwd(TFILE *fp, struct pass
    READ_BUF_STRING(fp, result->pw_dir);
    READ_BUF_STRING(fp, result->pw_shell);
  #ifdef HAVE_STRUCT_PASSWD_PW_CLASS
diff --git a/net/nss-pam-ldapd/files/patch-Makefile.in b/net/nss-pam-ldapd/files/patch-Makefile.in
index c145d8e3a87c..f84afc72e27e 100644
--- a/net/nss-pam-ldapd/files/patch-Makefile.in
+++ b/net/nss-pam-ldapd/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig	2016-10-03 20:44:13 UTC
+--- Makefile.in.orig	2025-04-11 13:22:51 UTC
 +++ Makefile.in
-@@ -866,7 +866,7 @@ install-nslcd_conf:
+@@ -883,7 +883,7 @@ install-nslcd_conf:
  	  echo "$(DESTDIR)$(NSLCD_CONF_PATH) already exists, install will not overwrite"; \
  	else \
  	  $(mkinstalldirs) `dirname $(DESTDIR)$(NSLCD_CONF_PATH)`; \
diff --git a/net/nss-pam-ldapd/files/patch-config.h.in b/net/nss-pam-ldapd/files/patch-config.h.in
index e9ab0c2bf48b..a066ba722614 100644
--- a/net/nss-pam-ldapd/files/patch-config.h.in
+++ b/net/nss-pam-ldapd/files/patch-config.h.in
@@ -1,8 +1,8 @@
---- config.h.in.orig	2022-10-10 21:16:40 UTC
+--- config.h.in.orig	2025-02-09 15:13:15 UTC
 +++ config.h.in
-@@ -30,6 +30,9 @@
- /* Define to 1 if you have the `clearenv' function. */
- #undef HAVE_CLEARENV
+@@ -33,6 +33,9 @@
+ /* Define to 1 if you have the 'closefrom' function. */
+ #undef HAVE_CLOSEFROM
  
 +/* Define to 1 if you have the `closefrom' function. */
 +#undef HAVE_CLOSEFROM
diff --git a/net/nss-pam-ldapd/files/patch-configure b/net/nss-pam-ldapd/files/patch-configure
index d97e0366b1af..28c785b06c29 100644
--- a/net/nss-pam-ldapd/files/patch-configure
+++ b/net/nss-pam-ldapd/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig	2021-11-20 13:07:41 UTC
+--- configure.orig	2025-02-09 15:13:16 UTC
 +++ configure
-@@ -9684,6 +9684,13 @@ then :
+@@ -9959,6 +9959,13 @@ fi
  
  fi
  
diff --git a/net/nss-pam-ldapd/files/patch-nslcd_daemonize.c b/net/nss-pam-ldapd/files/patch-nslcd_daemonize.c
deleted file mode 100644
index 8a8901baaa80..000000000000
--- a/net/nss-pam-ldapd/files/patch-nslcd_daemonize.c
+++ /dev/null
@@ -1,33 +0,0 @@
---- nslcd/daemonize.c.orig	2022-10-11 18:31:44 UTC
-+++ nslcd/daemonize.c
-@@ -1,7 +1,7 @@
- /*
-    daemoninze.c - functions for properly daemonising an application
- 
--   Copyright (C) 2014-2015 Arthur de Jong
-+   Copyright (C) 2014-2022 Arthur de Jong
- 
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-@@ -43,15 +43,19 @@ void daemonize_closefds(void)
- 
- void daemonize_closefds(void)
- {
--  int i;
-   /* close all file descriptors (except stdin/out/err) */
-+#ifdef HAVE_CLOSEFROM
-+  closefrom(3);
-+#else
-+  int i;
-   i = sysconf(_SC_OPEN_MAX) - 1;
-   /* if the system does not have OPEN_MAX just close the first 32 and
-      hope we closed enough */
-   if (i < 0)
-     i = 32;
--  for (; i > 3; i--)
-+  for (; i > 2; i--)
-     close(i);
-+#endif
- }
- 
- void daemonize_redirect_stdio(void)
diff --git a/net/nss-pam-ldapd/files/patch-nslcd_invalidator.c b/net/nss-pam-ldapd/files/patch-nslcd_invalidator.c
deleted file mode 100644
index c4bfe8ffe3e7..000000000000
--- a/net/nss-pam-ldapd/files/patch-nslcd_invalidator.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- nslcd/invalidator.c.orig	2021-11-15 19:40:49 UTC
-+++ nslcd/invalidator.c
-@@ -1,7 +1,7 @@
- /*
-    invalidator.c - functions for invalidating external caches
- 
--   Copyright (C) 2013-2014 Arthur de Jong
-+   Copyright (C) 2013-2022 Arthur de Jong
- 
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-@@ -97,6 +97,9 @@ static void exec_invalidate(const char *db)
-   {
-     case 0: /* we are the child */
-       /* close all file descriptors */
-+#ifdef HAVE_CLOSEFROM
-+      closefrom(0);
-+#else
-       i = sysconf(_SC_OPEN_MAX) - 1;
-       /* if the system does not have OPEN_MAX just close the first 32 and
-          hope we have closed enough */
-@@ -104,6 +107,7 @@ static void exec_invalidate(const char *db)
-         i = 32;
-       for (; i >= 0; i--)
-         close(i);
-+#endif
-       /* execute command */
- #ifdef HAVE_EXECVPE
-       execvpe(argv[0], argv, newenviron);