aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeradius/0001-use-threadsafe-rad_getgrnam.patch
blob: 5743f8eaf1ce93a0ed8f5fb252a1575fa0793029 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From db0fa142e8796a74711f3046b94836125e543e20 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 1 Jan 2015 17:08:29 +0100
Subject: [PATCH] use threadsafe rad_getgrnam

---
 src/modules/rlm_detail/rlm_detail.c   | 2 +-
 src/modules/rlm_linelog/rlm_linelog.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/rlm_detail/rlm_detail.c b/src/modules/rlm_detail/rlm_detail.c
index 712a9d0..01dab6a 100644
--- a/src/modules/rlm_detail/rlm_detail.c
+++ b/src/modules/rlm_detail/rlm_detail.c
@@ -341,7 +341,7 @@ static int do_detail(void *instance, REQUEST *request, RADIUS_PACKET *packet,
 	if (inst->group != NULL) {
 		gid = strtol(inst->group, &endptr, 10);
 		if (*endptr != '\0') {
-			grp = getgrnam(inst->group);
+			grp = rad_getgrnam(inst->group);
 			if (grp == NULL) {
 				RDEBUG2("rlm_detail: Unable to find system group \"%s\"", inst->group);
 				goto skip_group;
diff --git a/src/modules/rlm_linelog/rlm_linelog.c b/src/modules/rlm_linelog/rlm_linelog.c
index 16b553c..192ea6d 100644
--- a/src/modules/rlm_linelog/rlm_linelog.c
+++ b/src/modules/rlm_linelog/rlm_linelog.c
@@ -305,7 +305,7 @@ static int do_linelog(void *instance, REQUEST *request)
 		if (inst->group != NULL) {
 			gid = strtol(inst->group, &endptr, 10);
 			if (*endptr != '\0') {
-				grp = getgrnam(inst->group);
+				grp = rad_getgrnam(inst->group);
 				if (grp == NULL) {
 					RDEBUG2("Unable to find system group \"%s\"", inst->group);
 					goto skip_group;
-- 
2.2.1