aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeradius
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-01-01 16:19:10 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-01-01 16:19:10 +0000
commit26b1a36cb96cafdae691afdbb987c9f48fd35094 (patch)
tree97d4cebce3a31bd18cf1ea4dc11b1ad3e36e835d /main/freeradius
parent78e8088bf5c30992f8fcd2995df98029dfbb014a (diff)
downloadaports-26b1a36cb96cafdae691afdbb987c9f48fd35094.tar.bz2
aports-26b1a36cb96cafdae691afdbb987c9f48fd35094.tar.xz
main/freeradius: use threadsafe getgrnam in rlm_linelog and rlm_detail
should fix potensial craches in freeradius
Diffstat (limited to 'main/freeradius')
-rw-r--r--main/freeradius/0001-use-threadsafe-rad_getgrnam.patch39
-rw-r--r--main/freeradius/APKBUILD6
2 files changed, 44 insertions, 1 deletions
diff --git a/main/freeradius/0001-use-threadsafe-rad_getgrnam.patch b/main/freeradius/0001-use-threadsafe-rad_getgrnam.patch
new file mode 100644
index 0000000000..5743f8eaf1
--- /dev/null
+++ b/main/freeradius/0001-use-threadsafe-rad_getgrnam.patch
@@ -0,0 +1,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
+
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD
index 14fcae17cf..6a78f2bff6 100644
--- a/main/freeradius/APKBUILD
+++ b/main/freeradius/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=freeradius
pkgver=2.2.5
-pkgrel=3
+pkgrel=4
pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server"
url="http://freeradius.org/"
arch="all"
@@ -21,6 +21,7 @@ subpackages="$pkgname-doc $pkgname-dev $pkgname-dbg $pkgname-ldap $pkgname-lib
source="ftp://ftp.freeradius.org/pub/freeradius/$pkgname-server-$pkgver.tar.gz
freeradius-fix-openssl-version-check.patch
0001-Use-threadsafe-wrapper-for-getpwnam-getgrnam.patch
+ 0001-use-threadsafe-rad_getgrnam.patch
fix-tls-test.patch
freeradius.confd
freeradius.initd
@@ -247,18 +248,21 @@ webif() {
md5sums="da77eb23b4c5e2f9fc55119025a91b61 freeradius-server-2.2.5.tar.gz
fde9be89b76ed262db1198dfbeb237c6 freeradius-fix-openssl-version-check.patch
f28735060b63d88875783817bcd95586 0001-Use-threadsafe-wrapper-for-getpwnam-getgrnam.patch
+aa00c3ed02b53021113b2e145d312ee4 0001-use-threadsafe-rad_getgrnam.patch
b6bcdba16c65503be4265126cf4d2eee fix-tls-test.patch
fc6693f3df5a0694610110287a28568a freeradius.confd
b3eefdfc466d80c241cd1bb11face405 freeradius.initd"
sha256sums="8c4c2a0b600a8d85d2235589a5e80d4fefd1f52317e9daf8193731566fa9d012 freeradius-server-2.2.5.tar.gz
c0f15867924ae73511cd009cb3c53cbd7eda298ff708a54f02d1900da5ebfc06 freeradius-fix-openssl-version-check.patch
115ae559fc5c8a638c5ebb510cb58478df66ceeb61a6768584e592e4a1fbc9d4 0001-Use-threadsafe-wrapper-for-getpwnam-getgrnam.patch
+8f2dd61e5f90c83198fa26f66bca54394b17cafbb8d2bbb97e948b4f55d1f071 0001-use-threadsafe-rad_getgrnam.patch
38455012b9fc322a7bfdec66e4f8aafeb679d0142eddfba31114aadfd8195b41 fix-tls-test.patch
2d5b3e1af1299373182f2c8021bdf45c29db5d82b0a077b965a16ded32cb6292 freeradius.confd
719bbe4a44df60e76f68d327f7ee70d4dfd6a95e51f9cb01f850cd4ed153f9de freeradius.initd"
sha512sums="511599b4f4f5906441d0cda61946341f2226b9aae69b6f68b03a19898b6385499a8221933c191232d50f736cab93f0f6f271e4defe4552e7738cb21e2415f053 freeradius-server-2.2.5.tar.gz
77ec50125b38e05ee784b4cf724a31074844ea9c935c0d28aa51bd71e3e8a5399ba5194958f65f8c7f6c501b67ea6560da3869917f661178afbe602062a6fdc6 freeradius-fix-openssl-version-check.patch
4fb99b6a0f22cb844382139d448e24cc1b698452e30c1b0f06674a6fbd21463bcece2f2f4121618f9c7c57c8eb882eee35511b4dcea6e2a0904e27e5f2a6a679 0001-Use-threadsafe-wrapper-for-getpwnam-getgrnam.patch
+dfe522350a2d45bf81c362ee87c57021149f196d4d45b8567911a1bd74e6b11b5172042a36e02f651157854251c08e846330e5d862767427ad7850ac6eac4f96 0001-use-threadsafe-rad_getgrnam.patch
77ee33a3c2059fb07841255fefc577f4e04680f4a1968d320a17f1d2769ddb671c36639dadbba0a1b1faaa31b1fb0c900313c375a209e67c41d75ebf9bef9d8f fix-tls-test.patch
e248159c0a44f722e405c51c8015d9ad672e42ad0d38ca28f8a051ff911aa4d3e630b9bd4543e9d610940bc4ae50c022594e219ce341b36abe85c572acad418b freeradius.confd
57f12f06ef9112817204dec4ab2591bcd4baf3c8a033afadb2376e115911f76045c70b7a2c80b294a83dac4e05b1ff22335a3bcc9af1c0760682622ab2cdbd31 freeradius.initd"