From ad55fbb67c2ab99e18661945409b67dd197cc674 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sat, 29 Aug 2020 14:02:36 -0700 Subject: sssd: Avoid nss function conflicts with glibc nss.h glibc 2.32 will define these varibles [1] which results in conflicts with these static function names, backport a fix from upstream [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d Signed-off-by: Hongxu Jia Signed-off-by: Armin Kuster --- ...01-nss-Collision-with-external-nss-symbol.patch | 77 ++++++++++++++++++++++ recipes-security/sssd/sssd_1.16.4.bb | 1 + 2 files changed, 78 insertions(+) create mode 100644 recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch diff --git a/recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch b/recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch new file mode 100644 index 0000000..bf79f65 --- /dev/null +++ b/recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch @@ -0,0 +1,77 @@ ++From a069e4186a3cb482226005d4bc73c6fb3dd35c79 Mon Sep 17 00:00:00 2001 ++From: =?UTF-8?q?Michal=20=C5=BDidek?= ++Date: Thu, 27 Feb 2020 06:50:40 +0100 ++Subject: [PATCH] nss: Collision with external nss symbol ++MIME-Version: 1.0 ++Content-Type: text/plain; charset=UTF-8 ++Content-Transfer-Encoding: 8bit ++ ++One of our internal static function names started ++to collide with external nss symbol. Additional ++sss_ suffix was added to avoid the collision. ++ ++This is needed to unblock Fedora Rawhide's ++SSSD build. ++ ++Reviewed-by: Pavel Březina ++ ++Upstream-Status: Backport [https://github.com/SSSD/sssd.git] ++Signed-off-by: Hongxu Jia ++--- ++ src/responder/nss/nss_cmd.c | 18 ++++++++++-------- ++ 1 file changed, 10 insertions(+), 8 deletions(-) ++ ++diff --git a/src/responder/nss/nss_cmd.c b/src/responder/nss/nss_cmd.c ++index 25e663e..a4d4cfc 100644 ++--- a/src/responder/nss/nss_cmd.c +++++ b/src/responder/nss/nss_cmd.c ++@@ -728,11 +728,13 @@ done: ++ talloc_free(cmd_ctx); ++ } ++ ++-static void nss_setnetgrent_done(struct tevent_req *subreq); +++static void sss_nss_setnetgrent_done(struct tevent_req *subreq); ++ ++-static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx, ++- enum cache_req_type type, ++- nss_protocol_fill_packet_fn fill_fn) +++/* This function's name started to collide with external nss symbol, +++ * so it has additional sss_* prefix unlike other functions here. */ +++static errno_t sss_nss_setnetgrent(struct cli_ctx *cli_ctx, +++ enum cache_req_type type, +++ nss_protocol_fill_packet_fn fill_fn) ++ { ++ struct nss_ctx *nss_ctx; ++ struct nss_state_ctx *state_ctx; ++@@ -774,7 +776,7 @@ static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx, ++ goto done; ++ } ++ ++- tevent_req_set_callback(subreq, nss_setnetgrent_done, cmd_ctx); +++ tevent_req_set_callback(subreq, sss_nss_setnetgrent_done, cmd_ctx); ++ ++ ret = EOK; ++ ++@@ -787,7 +789,7 @@ done: ++ return EOK; ++ } ++ ++-static void nss_setnetgrent_done(struct tevent_req *subreq) +++static void sss_nss_setnetgrent_done(struct tevent_req *subreq) ++ { ++ struct nss_cmd_ctx *cmd_ctx; ++ errno_t ret; ++@@ -1037,8 +1039,8 @@ static errno_t nss_cmd_initgroups_ex(struct cli_ctx *cli_ctx) ++ ++ static errno_t nss_cmd_setnetgrent(struct cli_ctx *cli_ctx) ++ { ++- return nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME, ++- nss_protocol_fill_setnetgrent); +++ return sss_nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME, +++ nss_protocol_fill_setnetgrent); ++ } ++ ++ static errno_t nss_cmd_getnetgrent(struct cli_ctx *cli_ctx) ++-- ++2.21.0 ++ diff --git a/recipes-security/sssd/sssd_1.16.4.bb b/recipes-security/sssd/sssd_1.16.4.bb index 916f1ac..e54fa98 100644 --- a/recipes-security/sssd/sssd_1.16.4.bb +++ b/recipes-security/sssd/sssd_1.16.4.bb @@ -18,6 +18,7 @@ SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz \ file://volatiles.99_sssd \ file://fix-ldblibdir.patch \ file://0001-build-Don-t-use-AC_CHECK_FILE-when-building-manpages.patch \ + file://0001-nss-Collision-with-external-nss-symbol.patch \ " SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50" -- cgit v1.2.3-54-g00ecf