diff options
author | Armin Kuster <akuster808@gmail.com> | 2020-08-29 14:02:36 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2020-09-05 11:01:47 -0700 |
commit | ad55fbb67c2ab99e18661945409b67dd197cc674 (patch) | |
tree | f27af1449839276be26bbe18d46887ee4e81b32a | |
parent | 95b8dd3619bd8a47f19c899ed4b6419d9ccb20e3 (diff) | |
download | meta-security-ad55fbb67c2ab99e18661945409b67dd197cc674.tar.gz |
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 <hongxu.jia@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch | 77 | ||||
-rw-r--r-- | recipes-security/sssd/sssd_1.16.4.bb | 1 |
2 files changed, 78 insertions, 0 deletions
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 @@ | |||
1 | +From a069e4186a3cb482226005d4bc73c6fb3dd35c79 Mon Sep 17 00:00:00 2001 | ||
2 | +From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com> | ||
3 | +Date: Thu, 27 Feb 2020 06:50:40 +0100 | ||
4 | +Subject: [PATCH] nss: Collision with external nss symbol | ||
5 | +MIME-Version: 1.0 | ||
6 | +Content-Type: text/plain; charset=UTF-8 | ||
7 | +Content-Transfer-Encoding: 8bit | ||
8 | + | ||
9 | +One of our internal static function names started | ||
10 | +to collide with external nss symbol. Additional | ||
11 | +sss_ suffix was added to avoid the collision. | ||
12 | + | ||
13 | +This is needed to unblock Fedora Rawhide's | ||
14 | +SSSD build. | ||
15 | + | ||
16 | +Reviewed-by: Pavel Březina <pbrezina@redhat.com> | ||
17 | + | ||
18 | +Upstream-Status: Backport [https://github.com/SSSD/sssd.git] | ||
19 | +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
20 | +--- | ||
21 | + src/responder/nss/nss_cmd.c | 18 ++++++++++-------- | ||
22 | + 1 file changed, 10 insertions(+), 8 deletions(-) | ||
23 | + | ||
24 | +diff --git a/src/responder/nss/nss_cmd.c b/src/responder/nss/nss_cmd.c | ||
25 | +index 25e663e..a4d4cfc 100644 | ||
26 | +--- a/src/responder/nss/nss_cmd.c | ||
27 | ++++ b/src/responder/nss/nss_cmd.c | ||
28 | +@@ -728,11 +728,13 @@ done: | ||
29 | + talloc_free(cmd_ctx); | ||
30 | + } | ||
31 | + | ||
32 | +-static void nss_setnetgrent_done(struct tevent_req *subreq); | ||
33 | ++static void sss_nss_setnetgrent_done(struct tevent_req *subreq); | ||
34 | + | ||
35 | +-static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx, | ||
36 | +- enum cache_req_type type, | ||
37 | +- nss_protocol_fill_packet_fn fill_fn) | ||
38 | ++/* This function's name started to collide with external nss symbol, | ||
39 | ++ * so it has additional sss_* prefix unlike other functions here. */ | ||
40 | ++static errno_t sss_nss_setnetgrent(struct cli_ctx *cli_ctx, | ||
41 | ++ enum cache_req_type type, | ||
42 | ++ nss_protocol_fill_packet_fn fill_fn) | ||
43 | + { | ||
44 | + struct nss_ctx *nss_ctx; | ||
45 | + struct nss_state_ctx *state_ctx; | ||
46 | +@@ -774,7 +776,7 @@ static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx, | ||
47 | + goto done; | ||
48 | + } | ||
49 | + | ||
50 | +- tevent_req_set_callback(subreq, nss_setnetgrent_done, cmd_ctx); | ||
51 | ++ tevent_req_set_callback(subreq, sss_nss_setnetgrent_done, cmd_ctx); | ||
52 | + | ||
53 | + ret = EOK; | ||
54 | + | ||
55 | +@@ -787,7 +789,7 @@ done: | ||
56 | + return EOK; | ||
57 | + } | ||
58 | + | ||
59 | +-static void nss_setnetgrent_done(struct tevent_req *subreq) | ||
60 | ++static void sss_nss_setnetgrent_done(struct tevent_req *subreq) | ||
61 | + { | ||
62 | + struct nss_cmd_ctx *cmd_ctx; | ||
63 | + errno_t ret; | ||
64 | +@@ -1037,8 +1039,8 @@ static errno_t nss_cmd_initgroups_ex(struct cli_ctx *cli_ctx) | ||
65 | + | ||
66 | + static errno_t nss_cmd_setnetgrent(struct cli_ctx *cli_ctx) | ||
67 | + { | ||
68 | +- return nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME, | ||
69 | +- nss_protocol_fill_setnetgrent); | ||
70 | ++ return sss_nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME, | ||
71 | ++ nss_protocol_fill_setnetgrent); | ||
72 | + } | ||
73 | + | ||
74 | + static errno_t nss_cmd_getnetgrent(struct cli_ctx *cli_ctx) | ||
75 | +-- | ||
76 | +2.21.0 | ||
77 | + | ||
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 \ | |||
18 | file://volatiles.99_sssd \ | 18 | file://volatiles.99_sssd \ |
19 | file://fix-ldblibdir.patch \ | 19 | file://fix-ldblibdir.patch \ |
20 | file://0001-build-Don-t-use-AC_CHECK_FILE-when-building-manpages.patch \ | 20 | file://0001-build-Don-t-use-AC_CHECK_FILE-when-building-manpages.patch \ |
21 | file://0001-nss-Collision-with-external-nss-symbol.patch \ | ||
21 | " | 22 | " |
22 | 23 | ||
23 | SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50" | 24 | SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50" |