git: 28f442a86592 - main - security/sssd2: fix building on current
Date: Mon, 12 Feb 2024 03:41:26 UTC
The branch main has been updated by jhixson: URL: https://cgit.FreeBSD.org/ports/commit/?id=28f442a8659202f130ae0e4fa05b08d40e2b9734 commit 28f442a8659202f130ae0e4fa05b08d40e2b9734 Author: John Hixson <jhixson@FreeBSD.org> AuthorDate: 2024-02-12 03:23:00 +0000 Commit: John Hixson <jhixson@FreeBSD.org> CommitDate: 2024-02-12 03:41:16 +0000 security/sssd2: fix building on current --- security/sssd2/Makefile | 3 +- security/sssd2/files/bsdnss.c | 44 +++++++++++----------- .../patch-src__lib__certmap__sss_certmap.exports | 10 +++++ .../files/patch-src__sss_client__sss_nss.exports | 28 +++++++------- 4 files changed, 48 insertions(+), 37 deletions(-) diff --git a/security/sssd2/Makefile b/security/sssd2/Makefile index c08fc5aad78d..825b1290b5ee 100644 --- a/security/sssd2/Makefile +++ b/security/sssd2/Makefile @@ -1,6 +1,6 @@ PORTNAME= sssd PORTVERSION= 2.9.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security PKGNAMESUFFIX= -devel @@ -11,7 +11,6 @@ WWW= https://sssd.io/ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_FreeBSD_15= fails to compile: linker fails to resolve nss symbols CONFLICTS_INSTALL?= sssd* BUILD_DEPENDS= bash:shells/bash \ diff --git a/security/sssd2/files/bsdnss.c b/security/sssd2/files/bsdnss.c index 6a1152100c67..ee0592d3aea9 100644 --- a/security/sssd2/files/bsdnss.c +++ b/security/sssd2/files/bsdnss.c @@ -6,6 +6,24 @@ #include <nss.h> #include <netdb.h> +NSS_METHOD_PROTOTYPE(__nss_compat_getgrnam_r); +NSS_METHOD_PROTOTYPE(__nss_compat_getgrgid_r); +NSS_METHOD_PROTOTYPE(__nss_compat_getgrent_r); +NSS_METHOD_PROTOTYPE(__nss_compat_setgrent); +NSS_METHOD_PROTOTYPE(__nss_compat_endgrent); + +NSS_METHOD_PROTOTYPE(__nss_compat_getpwnam_r); +NSS_METHOD_PROTOTYPE(__nss_compat_getpwuid_r); +NSS_METHOD_PROTOTYPE(__nss_compat_getpwent_r); +NSS_METHOD_PROTOTYPE(__nss_compat_setpwent); +NSS_METHOD_PROTOTYPE(__nss_compat_endpwent); + +NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyname); +NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyname2); +NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyaddr); + +NSS_METHOD_PROTOTYPE(__nss_compat_getgroupmembership); + extern enum nss_status _nss_sss_getgrent_r(struct group *, char *, size_t, int *); extern enum nss_status _nss_sss_getgrnam_r(const char *, struct group *, @@ -45,28 +63,10 @@ extern enum nss_status _nss_sss_getgroupmembership(const char *uname, gid_t agroup, gid_t *groups, int maxgrp, int *grpcnt); -NSS_METHOD_PROTOTYPE(__nss_compat_getgroupmembership); -NSS_METHOD_PROTOTYPE(__nss_compat_getgrnam_r); -NSS_METHOD_PROTOTYPE(__nss_compat_getgrgid_r); -NSS_METHOD_PROTOTYPE(__nss_compat_getgrent_r); -NSS_METHOD_PROTOTYPE(__nss_compat_setgrent); -NSS_METHOD_PROTOTYPE(__nss_compat_endgrent); - -NSS_METHOD_PROTOTYPE(__nss_compat_getpwnam_r); -NSS_METHOD_PROTOTYPE(__nss_compat_getpwuid_r); -NSS_METHOD_PROTOTYPE(__nss_compat_getpwent_r); -NSS_METHOD_PROTOTYPE(__nss_compat_setpwent); -NSS_METHOD_PROTOTYPE(__nss_compat_endpwent); - -NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyname); -NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyname2); -NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyaddr); - static ns_mtab methods[] = { { NSDB_GROUP, "getgrnam_r", __nss_compat_getgrnam_r, _nss_sss_getgrnam_r }, { NSDB_GROUP, "getgrgid_r", __nss_compat_getgrgid_r, _nss_sss_getgrgid_r }, { NSDB_GROUP, "getgrent_r", __nss_compat_getgrent_r, _nss_sss_getgrent_r }, -{ NSDB_GROUP, "getgroupmembership", __nss_compat_getgroupmembership, _nss_sss_getgroupmembership }, { NSDB_GROUP, "setgrent", __nss_compat_setgrent, _nss_sss_setgrent }, { NSDB_GROUP, "endgrent", __nss_compat_endgrent, _nss_sss_endgrent }, @@ -76,9 +76,9 @@ static ns_mtab methods[] = { { NSDB_PASSWD, "setpwent", __nss_compat_setpwent, _nss_sss_setpwent }, { NSDB_PASSWD, "endpwent", __nss_compat_endpwent, _nss_sss_endpwent }, -// { NSDB_HOSTS, "gethostbyname", __nss_compat_gethostbyname, _nss_sss_gethostbyname_r }, -//{ NSDB_HOSTS, "gethostbyaddr", __nss_compat_gethostbyaddr, _nss_sss_gethostbyaddr_r }, -//{ NSDB_HOSTS, "gethostbyname2", __nss_compat_gethostbyname2, _nss_sss_gethostbyname2_r }, +{ NSDB_HOSTS, "gethostbyname", __nss_compat_gethostbyname, _nss_sss_gethostbyname_r }, +{ NSDB_HOSTS, "gethostbyaddr", __nss_compat_gethostbyaddr, _nss_sss_gethostbyaddr_r }, +{ NSDB_HOSTS, "gethostbyname2", __nss_compat_gethostbyname2, _nss_sss_gethostbyname2_r }, { NSDB_GROUP_COMPAT, "getgrnam_r", __nss_compat_getgrnam_r, _nss_sss_getgrnam_r }, { NSDB_GROUP_COMPAT, "getgrgid_r", __nss_compat_getgrgid_r, _nss_sss_getgrgid_r }, @@ -92,6 +92,8 @@ static ns_mtab methods[] = { { NSDB_PASSWD_COMPAT, "setpwent", __nss_compat_setpwent, _nss_sss_setpwent }, { NSDB_PASSWD_COMPAT, "endpwent", __nss_compat_endpwent, _nss_sss_endpwent }, +{ NSDB_GROUP, "getgroupmembership", __nss_compat_getgroupmembership, _nss_sss_getgroupmembership }, + }; diff --git a/security/sssd2/files/patch-src__lib__certmap__sss_certmap.exports b/security/sssd2/files/patch-src__lib__certmap__sss_certmap.exports new file mode 100644 index 000000000000..df8fac78ac91 --- /dev/null +++ b/security/sssd2/files/patch-src__lib__certmap__sss_certmap.exports @@ -0,0 +1,10 @@ +--- src/lib/certmap/sss_certmap.exports.orig 2024-01-12 12:05:40 UTC ++++ src/lib/certmap/sss_certmap.exports +@@ -2,7 +2,6 @@ SSS_CERTMAP_0.0 { + global: + sss_certmap_init; + sss_certmap_free_ctx; +- sss_certmap_err_msg; + sss_certmap_add_rule; + sss_certmap_match_cert; + sss_certmap_get_search_filter; diff --git a/security/sssd2/files/patch-src__sss_client__sss_nss.exports b/security/sssd2/files/patch-src__sss_client__sss_nss.exports index 29f97f8540b4..8fadc74c9bd0 100644 --- a/security/sssd2/files/patch-src__sss_client__sss_nss.exports +++ b/security/sssd2/files/patch-src__sss_client__sss_nss.exports @@ -1,4 +1,4 @@ ---- src/sss_client/sss_nss.exports.orig 2023-06-05 03:42:12 UTC +--- src/sss_client/sss_nss.exports.orig 2024-01-12 12:05:40 UTC +++ src/sss_client/sss_nss.exports @@ -3,6 +3,7 @@ EXPORTED { # public functions @@ -15,21 +15,21 @@ + _nss_sss_getgroupmembership; _nss_sss_initgroups_dyn; + -+ __nss_compat_getgrnam_r; -+ __nss_compat_getgrgid_r; -+ __nss_compat_getgrent_r; -+ __nss_compat_setgrent; -+ __nss_compat_endgrent; ++ #__nss_compat_getgrnam_r; ++ #__nss_compat_getgrgid_r; ++ #__nss_compat_getgrent_r; ++ #__nss_compat_setgrent; ++ #__nss_compat_endgrent; + -+ __nss_compat_getpwnam_r; -+ __nss_compat_getpwuid_r; -+ __nss_compat_getpwent_r; -+ __nss_compat_setpwent; -+ __nss_compat_endpwent; ++ #__nss_compat_getpwnam_r; ++ #__nss_compat_getpwuid_r; ++ #__nss_compat_getpwent_r; ++ #__nss_compat_setpwent; ++ #__nss_compat_endpwent; + -+ __nss_compat_gethostbyname; -+ __nss_compat_gethostbyname2; -+ __nss_compat_gethostbyaddr; ++ #__nss_compat_gethostbyname; ++ #__nss_compat_gethostbyname2; ++ #__nss_compat_gethostbyaddr; #_nss_sss_getaliasbyname_r; #_nss_sss_setaliasent;