Package: ekeyd Version: 1.1.3-1 Severity: normal Tags: patch
Note that I'm not sure about the necessity/correctness of this bit of the attached patch: # get the status of the entropy key - my @stat_res = ekeyd_command($SOCKET, "StatEntropyKey", $elmnt[5]); + my @stat_res = ekeyd_command($SOCKET, "StatEntropyKey", $name); but it seems to work like this, so probably makes the code more maintainable this way, rather than leaving it as the one unescaped instance. Cheers, Phil. -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (800, 'testing'), (50, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.35-trunk-amd64 (SMP w/6 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages ekeyd depends on: ii libc6 2.11.2-5 Embedded GNU C Library: Shared lib ii liblua5.1-0 5.1.4-5 Simple, extensible, embeddable pro ii liblua5.1-socket2 2.0.2-4 TCP/UDP socket library for Lua 5.1 ii lua5.1 5.1.4-5 Simple, extensible, embeddable pro Versions of packages ekeyd recommends: ii udev 160-1 /dev/ and hotplug management daemo Versions of packages ekeyd suggests: ii munin-node 1.4.5-2 network-wide graphing framework (n -- Configuration Files: /etc/entropykey/ekeyd.conf changed [not included] /etc/entropykey/keyring [Errno 13] Permission denied: u'/etc/entropykey/keyring' /etc/munin/plugin-conf.d/ekeyd [Errno 13] Permission denied: u'/etc/munin/plugin-conf.d/ekeyd' -- no debconf information -- debsums errors found: debsums: changed file /usr/share/munin/plugins/ekeyd_stat_ (from ekeyd package)
--- /tmp/ekeyd_stat_KeyTemperatureC 2010-09-28 08:40:45.324884216 +0100 +++ ekeyd_stat_KeyTemperatureC 2010-09-28 08:44:42.588919669 +0100 @@ -171,7 +171,7 @@ my @elmnt = split(/\t/, $keyline); my $name = $elmnt[5]; $name =~ s,/,_,g; - print "stats" . $name . ".label " . $elmnt[5] . "\n"; + print "stats" . $name . ".label " . $name . "\n"; # set the graph type if (defined $graph_type{$statistic}) { @@ -182,7 +182,7 @@ #set the graph minimum if (defined $graph_min{$statistic}) { - print "stats". $elmnt[5] . ".min " . $graph_min{$statistic} . "\n"; + print "stats". $name . ".min " . $graph_min{$statistic} . "\n"; } } } @@ -192,9 +192,11 @@ # split up the result line my @elmnt = split(/\t/, $keyline); + my $name = $elmnt[5]; + $name =~ s,/,_,g; # get the status of the entropy key - my @stat_res = ekeyd_command($SOCKET, "StatEntropyKey", $elmnt[5]); + my @stat_res = ekeyd_command($SOCKET, "StatEntropyKey", $name); my $tmp; my %key_stats; @@ -207,7 +209,7 @@ $total += $key_stats{$statistic}; if ($total_flag == 0) { - print "stats" . $elmnt[5] . ".value " . $key_stats{$statistic} . "\n"; + print "stats" . $name . ".value " . $key_stats{$statistic} . "\n"; } } if ($total_flag == 1) {