blob: c319269e9e3262ec130b2216ce8eabff9a810861 [file] [log] [blame]
Andrew Geisslercc589282020-09-18 13:34:40 -05001From 05c315100a70d3372e891e9a0ea981a875b2ec90 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com>
3Date: Thu, 27 Feb 2020 06:50:40 +0100
4Subject: [PATCH] nss: Collision with external nss symbol
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9One of our internal static function names started
10to collide with external nss symbol. Additional
11sss_ suffix was added to avoid the collision.
12
13This is needed to unblock Fedora Rawhide's
14SSSD build.
15
16Reviewed-by: Pavel Březina <pbrezina@redhat.com>
17
18Upstream-Status: Backport [https://github.com/SSSD/sssd.git]
19Signed-off-by: Hongxu.jia@windriver.com
20Signed-off-by: Qi.Chen@windriver.com
21---
22 src/responder/nss/nss_cmd.c | 18 ++++++++++--------
23 1 file changed, 10 insertions(+), 8 deletions(-)
24
25diff --git a/src/responder/nss/nss_cmd.c b/src/responder/nss/nss_cmd.c
26index 25e663ed5..a4d4cfc0b 100644
27--- a/src/responder/nss/nss_cmd.c
28+++ b/src/responder/nss/nss_cmd.c
29@@ -728,11 +728,13 @@ done:
30 talloc_free(cmd_ctx);
31 }
32
33-static void nss_setnetgrent_done(struct tevent_req *subreq);
34+static void sss_nss_setnetgrent_done(struct tevent_req *subreq);
35
36-static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx,
37- enum cache_req_type type,
38- nss_protocol_fill_packet_fn fill_fn)
39+/* This function's name started to collide with external nss symbol,
40+ * so it has additional sss_* prefix unlike other functions here. */
41+static errno_t sss_nss_setnetgrent(struct cli_ctx *cli_ctx,
42+ enum cache_req_type type,
43+ nss_protocol_fill_packet_fn fill_fn)
44 {
45 struct nss_ctx *nss_ctx;
46 struct nss_state_ctx *state_ctx;
47@@ -774,7 +776,7 @@ static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx,
48 goto done;
49 }
50
51- tevent_req_set_callback(subreq, nss_setnetgrent_done, cmd_ctx);
52+ tevent_req_set_callback(subreq, sss_nss_setnetgrent_done, cmd_ctx);
53
54 ret = EOK;
55
56@@ -787,7 +789,7 @@ done:
57 return EOK;
58 }
59
60-static void nss_setnetgrent_done(struct tevent_req *subreq)
61+static void sss_nss_setnetgrent_done(struct tevent_req *subreq)
62 {
63 struct nss_cmd_ctx *cmd_ctx;
64 errno_t ret;
65@@ -1037,8 +1039,8 @@ static errno_t nss_cmd_initgroups_ex(struct cli_ctx *cli_ctx)
66
67 static errno_t nss_cmd_setnetgrent(struct cli_ctx *cli_ctx)
68 {
69- return nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME,
70- nss_protocol_fill_setnetgrent);
71+ return sss_nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME,
72+ nss_protocol_fill_setnetgrent);
73 }
74
75 static errno_t nss_cmd_getnetgrent(struct cli_ctx *cli_ctx)
76--
772.21.0
78