Unbreak: reinstate part of the patch that was removed in the previous

update.
This commit is contained in:
ajacoutot
2024-12-25 12:33:43 +00:00
parent 98183a5b58
commit 4cfede3b27
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -3,6 +3,7 @@ COMMENT= Pluggable Authentication Module
V= 20241220 V= 20241220
DISTNAME= openbsd_pam-${V} DISTNAME= openbsd_pam-${V}
PKGNAME= openpam-${V} PKGNAME= openpam-${V}
REVISION= 0
GH_ACCOUNT= rnagy GH_ACCOUNT= rnagy
GH_PROJECT= openbsd_pam GH_PROJECT= openbsd_pam
@@ -0,0 +1,12 @@
Index: openpam/lib/libpam/openpam_dynamic.c
--- openpam/lib/libpam/openpam_dynamic.c.orig
+++ openpam/lib/libpam/openpam_dynamic.c
@@ -235,6 +235,8 @@ openpam_dynamic(const char *modname)
else
len = snprintf(modpath, sizeof modpath, "%s/%s%s.%d",
*path, modname, PAM_SOEXT, LIB_MAJ);
+ if (!has_ver)
+ dot = strrchr(modpath, '.') - modpath;
/* check for overflow */
if (len < 0 || (unsigned int)len >= sizeof modpath) {
errno = ENOENT;