ports/172856: [patch] security/munge: munged is uninterruptible and consumes cpu
Loic Pefferkorn
loic-freebsd at loicp.eu
Thu Oct 18 15:00:01 UTC 2012
>Number: 172856
>Category: ports
>Synopsis: [patch] security/munge: munged is uninterruptible and consumes cpu
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Oct 18 15:00:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Loic Pefferkorn
>Release: 8.2
>Organization:
>Environment:
FreeBSD bsd9-current 9.0-BETA2 FreeBSD 9.0-BETA2 #2 r223142M: Tue Aug 30 12:02:39 CEST 2011 root at bsd9-current:/usr/obj/usr/src/sys/lpn amd64
>Description:
Bug already known upstream: http://code.google.com/p/munge/issues/detail?id=18
"munged should consume negligible cpu when idle, and gracefully terminate upon receipt of a SIGTERM. Instead, munged consumes an entire cpu and must be forcibly terminated with a SIGKILL."
Patch below is the upstream patch to fix this issue, and a least if works for me.
Regards,
Loic
>How-To-Repeat:
# /usr/local/bin/sudo -u daemon /usr/local/sbin/munged -F --key-file=/usr/local/etc/munge/munge.key
Process is then uninterruptible and cannot be killed with SIGKILL.
>Fix:
Applying upstream patch.
Patch attached with submission follows:
diff -ruN munge.orig/Makefile munge/Makefile
--- munge.orig/Makefile 2012-10-18 16:39:17.000000000 +0200
+++ munge/Makefile 2012-10-18 16:41:12.000000000 +0200
@@ -7,6 +7,7 @@
PORTNAME= munge
PORTVERSION= 0.5.10
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= GOOGLE_CODE
diff -ruN munge.orig/files/patch-src-munged-xgetgrent.c munge/files/patch-src-munged-xgetgrent.c
--- munge.orig/files/patch-src-munged-xgetgrent.c 1970-01-01 01:00:00.000000000 +0100
+++ munge/files/patch-src-munged-xgetgrent.c 2012-10-18 16:43:51.000000000 +0200
@@ -0,0 +1,11 @@
+--- src/munged/xgetgrent.c.orig 2012-10-18 16:42:46.000000000 +0200
++++ src/munged/xgetgrent.c 2012-10-18 16:43:17.000000000 +0200
+@@ -194,7 +194,7 @@
+
+ #if HAVE_GETGRENT_R_GNU
+ rv = getgrent_r (gr, buf, buflen, &gr_ptr);
+- if (rv == ENOENT) {
++ if (((rv == ENOENT) || (rv == 0)) && (gr_ptr == NULL)) {
+ got_eof = 1;
+ }
+ else if (rv != 0) {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list