when switching to the "icecast" uid/gid, drop root's supplementary

group memberships,
bump PKGREVISION
This commit is contained in:
drochner 2009-07-29 13:59:59 +00:00
parent 2bfc87579b
commit 6c4aae633c
3 changed files with 19 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.47 2008/11/08 21:13:27 bjs Exp $
# $NetBSD: Makefile,v 1.48 2009/07/29 13:59:59 drochner Exp $
#
DISTNAME= icecast-2.3.2
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://downloads.xiph.org/releases/icecast/

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.17 2008/09/08 05:32:59 dholland Exp $
$NetBSD: distinfo,v 1.18 2009/07/29 13:59:59 drochner Exp $
SHA1 (icecast-2.3.2.tar.gz) = a52b13505548c2eff2c64aab95a42dcafda11227
RMD160 (icecast-2.3.2.tar.gz) = ec14553cce652fb80823316c9705f4cb6179cc2a
@ -6,3 +6,4 @@ Size (icecast-2.3.2.tar.gz) = 1152319 bytes
SHA1 (patch-aa) = 2d85cabe25cf3860e42110eaf3fa5e2b1775e0cf
SHA1 (patch-ab) = 3b9ecb2caf222f6c08646d856419595f3585f70b
SHA1 (patch-ac) = 5637f0cd10dc4b8d03e674b701bcb16f45339eaa
SHA1 (patch-ad) = 9b6388d99bae8239138689673dc26286323ae803

View file

@ -0,0 +1,15 @@
$NetBSD: patch-ad,v 1.1 2009/07/29 13:59:59 drochner Exp $
--- src/main.c.orig 2008-04-23 07:18:53.000000000 +0200
+++ src/main.c
@@ -398,6 +398,10 @@ static void _ch_root_uid_setup(void)
fprintf(stdout, "Changed groupid to %i.\n", (int)gid);
else
fprintf(stdout, "Error changing groupid: %s.\n", strerror(errno));
+ if(!setgroups(1, &gid))
+ fprintf(stdout, "Dropped root's group memberships.\n");
+ else
+ fprintf(stdout, "Error dropping group memberships.\n");
}
if(uid != -1) {