Skip to content

Commit

Permalink
security/pam-modules: upate to 2.5
Browse files Browse the repository at this point in the history
Major changes in 2.3
    * New module pam_innetgr (NIS)
    * The ldappubkey utility improved

Major changes in 2.3.1
    * Add missing symbol (pam_innetgr lacked pam_sm_setcred)

Major changes in 2.4
    * Major rewrite of memory allocation code
    * Bugfixes

Major changes in 2.4.1
    * Fix pam_mysql and pam_pgsql authentication

Major changes in 2.5:
    * pam_fshadow: skip-password option

Full changelog: https://git.gnu.org.ua/pam-modules.git/tree/NEWS

Port changes:
    * Fix mysql build (optional)
    * Patch pam-modules to fix a naming collision with open ldap (fixed by upstream for upcoming releases)
    * Reorder Makefile to make linters happy
  • Loading branch information
rosorio committed Aug 28, 2023
1 parent 35f356a commit d8073fe
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 31 deletions.
42 changes: 20 additions & 22 deletions security/pam-modules/Makefile
@@ -1,6 +1,5 @@
PORTNAME= pam-modules
PORTVERSION= 2.2
PORTREVISION= 1
PORTVERSION= 2.5
CATEGORIES= security
MASTER_SITES= ftp://download.gnu.org.ua/pub/release/pam-modules/

Expand All @@ -10,36 +9,35 @@ WWW= https://puszcza.gnu.org.ua/software/pam-modules/pam-modules.html

LICENSE= GPLv3

GNU_CONFIGURE= yes
USES= libtool

USE_LDCONFIG= yes

GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-fshadow

OPTIONS_DEFINE= GROUPMEMBER MYSQL REGEX PGSQL SYSLOG
INFO= pam-modules

OPTIONS_DEFINE= GROUPMEMBER MYSQL NIS PGSQL REGEX SYSLOG
OPTIONS_DEFAULT= GROUPMEMBER REGEX SYSLOG
OPTIONS_SUB= yes
OPTIONS_SUB= yes

GROUPMEMBER_CONFIGURE_ENABLE= groupmember
GROUPMEMBER_DESC= Build pam_groupmember
MYSQL_DESC= Build pam_mysql
NIS_DESC= Build pam_innetgr
PGSQL_DESC= Build pam_pgsql
REGEX_DESC= Build pam_regex
SYSLOG_DESC= Build pam_log

MYSQL_CONFIGURE_ENABLE= mysql
MYSQL_DESC= Build pam_mysql
MYSQL_USES= mysql

PGSQL_CONFIGURE_ENABLE= pgsql
PGSQL_DESC= Build pam_pgsql
PGSQL_USES= pgsql
PGSQL_VARS= WANT_PGSQL=client

GROUPMEMBER_CONFIGURE_ENABLE= groupmember
MYSQL_USES= mysql
MYSQL_CONFIGURE_ENABLE= mysql
MYSQL_CFLAGS+= -I${LOCALBASE}/include
NIS_CONFIGURE_ENABLE= NIS
PGSQL_USES= pgsql
PGSQL_CONFIGURE_ENABLE= pgsql
PGSQL_VARS= WANT_PGSQL=client
REGEX_CONFIGURE_ENABLE= regex
SYSLOG_CONFIGURE_ENABLE= log
SYSLOG_DESC= Build pam_log

REGEX_CONFIGURE_ENABLE= regex
REGEX_DESC= Build pam_regex

INFO= pam-modules

.include <bsd.port.options.mk>

Expand Down
6 changes: 3 additions & 3 deletions security/pam-modules/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1514909064
SHA256 (pam-modules-2.2.tar.gz) = 4f56ae7ea7b12455d4d30864a44444d309cbc9d4a3789b2a19e8bbbb72659c70
SIZE (pam-modules-2.2.tar.gz) = 655273
TIMESTAMP = 1693212461
SHA256 (pam-modules-2.5.tar.gz) = 48509a2465a8a35cdcc000ac7dacf0ab3fc49369a6dcdbbda58b9d94d6434231
SIZE (pam-modules-2.5.tar.gz) = 704093
59 changes: 59 additions & 0 deletions security/pam-modules/files/patch-pam_ldaphome_pam_ldaphome.c
@@ -0,0 +1,59 @@
--- pam_ldaphome/pam_ldaphome.c.orig 2021-01-06 16:15:09 UTC
+++ pam_ldaphome/pam_ldaphome.c
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
+#include <signal.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <ldap.h>
@@ -306,7 +307,7 @@
static void ldap_unbind(LDAP *ld);

static LDAP *
-ldap_connect(struct gray_env *env)
+pam_ldap_connect(struct gray_env *env)
{
int rc;
char *ldapuri = NULL;
@@ -510,7 +511,7 @@
}

static int
-ldap_bind(LDAP *ld, struct gray_env *env)
+pam_ldap_bind(LDAP *ld, struct gray_env *env)
{
int msgid, err, rc;
LDAPMessage *result;
@@ -594,7 +595,7 @@
}

static void
-ldap_unbind(LDAP *ld)
+pam_ldap_unbind(LDAP *ld)
{
if (ld) {
ldap_set_option(ld, LDAP_OPT_SERVER_CONTROLS, NULL);
@@ -1579,10 +1580,10 @@
if (!attr)
attr = "sshPublicKey";

- ld = ldap_connect(env);
+ ld = pam_ldap_connect(env);
if (!ld)
return PAM_SERVICE_ERR;
- if (ldap_bind(ld, env))
+ if (pam_ldap_bind(ld, env))
retval = PAM_SERVICE_ERR;
else {
char *filter;
@@ -1597,7 +1598,7 @@
retval = PAM_SUCCESS;
}
}
- ldap_unbind(ld);
+ pam_ldap_unbind(ld);
return retval;
}

10 changes: 4 additions & 6 deletions security/pam-modules/pkg-plist
@@ -1,21 +1,19 @@
bin/pamck
lib/libgraypam.a
lib/libgraypam.so
lib/libgraypam.so.0
lib/libgraypam.so.0.0.0
%%GROUPMEMBER%%lib/security/pam_groupmember.a
%%GROUPMEMBER%%lib/security/pam_groupmember.so
%%SYSLOG%%lib/security/pam_log.a
%%NIS%%lib/security/pam_innetgr.so
%%SYSLOG%%lib/security/pam_log.so
%%MYSQL%%lib/security/pam_mysql.a
%%MYSQL%%lib/security/pam_mysql.so
%%PGSQL%%lib/security/pam_pgsql.a
%%PGSQL%%lib/security/pam_pgsql.so
%%REGEX%%lib/security/pam_regex.a
%%REGEX%%lib/security/pam_regex.so
%%PGSQL%%lib/security/pam_ldaphome.so
man/man1/pamck.1.gz
%%GROUPMEMBER%%man/man8/pam_groupmember.8.gz
%%NIS%%man/man8/pam_innetgr.8.gz
%%SYSLOG%%man/man8/pam_log.8.gz
%%MYSQL%%man/man8/pam_mysql.8.gz
%%PGSQL%%man/man8/pam_pgsql.8.gz
%%REGEX%%man/man8/pam_regex.8.gz
%%PGSQL%%man/man8/pam_ldaphome.8.gz

0 comments on commit d8073fe

Please sign in to comment.