Package: munin Version: 1.2.6-8 Severity: normal Tags: patch
Hello, I think that following code (/usr/lib/cgi-bin/munin-cgi-graph lines 123-134) is incorrect: # Get semaphore handle my $semid = semget($IPC_KEY, 0, 0 ); if(!$semid) { # Or create it if needed $semid = semget($IPC_KEY, 1 , 0666 | IPC_CREAT ) || die "Creating semaphore: $!"; # And initialize to max_cgi_graph_jobs $opstring = pack("s!s!s!",0, $max_cgi_graph_jobs,0); semop($semid,$opstring) || die "$!"; } Perl function semget() can return 0 as a valid semaphore handle. Patch: --- munin-cgi-graph 2009-01-21 22:02:44.027894000 +0100 +++ /usr/lib/cgi-bin/munin-cgi-graph 2009-01-21 22:19:09.883612090 +0100 @@ -123,10 +123,12 @@ # Get semaphore handle my $semid = semget($IPC_KEY, 0, 0 ); -if(!$semid) { +if(!defined $semid) { # Or create it if needed - $semid = semget($IPC_KEY, 1 , 0666 | IPC_CREAT ) || - die "Creating semaphore: $!"; + $semid = semget($IPC_KEY, 1 , 0666 | IPC_CREAT ); + if (!defined $semid) { + die "Creating semaphore: $!"; + } # And initialize to max_cgi_graph_jobs $opstring = pack("s!s!s!",0, $max_cgi_graph_jobs,0); -- System Information: Debian Release: 5.0 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (x86_64) Kernel: Linux 2.6.20-3-xen-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages munin depends on: ii adduser 3.110 add and remove users and groups pn libdigest-md5-perl <none> (no description available) ii libhtml-template-perl 2.9-1 HTML::Template : A module for usin ii librrds-perl 1.3.1-4 Time-series data storage and displ pn libstorable-perl <none> (no description available) ii perl [libtime-hires-perl] 5.10.0-19 Larry Wall's Practical Extraction ii perl-modules 5.10.0-19 Core Perl modules ii rrdtool 1.3.1-4 Time-series data storage and displ Versions of packages munin recommends: ii libdate-manip-perl 5.54-1 a perl library for manipulating da ii munin-node 1.2.6-8 network-wide graphing framework (n Versions of packages munin suggests: ii lighttpd [httpd] 1.4.19-5.1kupson1 A fast webserver with minimal memo pn www-browser <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org