net/pam-nss-ldapd: Update to 0.9.13

PR:		286039
Reported by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
This commit is contained in:
Ryan Steinmetz 2025-04-23 10:43:45 -04:00
parent 774118fa3b
commit 7b4ba79abf
No known key found for this signature in database
GPG key ID: 1EF8BA6BD02846D7
11 changed files with 30 additions and 93 deletions

View file

@ -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

View file

@ -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

View file

@ -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) &&

View file

@ -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;

View file

@ -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);

View file

@ -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

View file

@ -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)`; \

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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);