Package: mon
Version: 1.2.0-1
Severity: normal
Tags: patch

Comments at the beginning of radius.monitor say you may use
--username, --password, --port, etc.

--port & --attempts are respected by the script, but username,
password, secret, and dictionary command-line options are all
overwritten by the defaults in the script.


Expected behavior: success, no output
Actual behavior: fails, says it tried user "username"
$ ./radius.monitor --username=monitor --password=xxxxxxx \
    --secret=xxxxxxx --port=1812 --attempts=1 radius
radius

radius failed for user username: bad response authenticator



My patch follows the example of the --port option by using the "||="
operator in place of "=". I'm not a perl guy so not sure if this is
the best way or not.


-- System Information:
Debian Release: 6.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages mon depends on:
ii  adduser                       3.112+nmu2 add and remove users and groups
ii  libc6                         2.11.3-2   Embedded GNU C Library: Shared lib
ii  libtime-period-perl           1.20-8     Perl library for testing if a time
ii  mon-client                    1.2.0-1    modules for interfacing with the m

Versions of packages mon recommends:
ii  fping                 2.4b2-to-ipv6-16.1 sends ICMP ECHO_REQUEST packets to
ii  libauthen-pam-perl    0.16-2             Perl interface to PAM library
ii  libcrypt-ssleay-perl  0.57-2             Support for https protocol in LWP
ii  libfilesys-diskspace- 0.05-13            fetch filesystem size and usage in
ii  libnet-dns-perl       0.66-2             Perform DNS queries from a Perl sc
ii  libnet-ldap-perl      1:0.4001-2         client interface to LDAP servers
ii  libnet-telnet-perl    3.03-3             Script telnetable connections
ii  libsnmp-perl          5.4.3~dfsg-2       SNMP (Simple Network Management Pr
ii  libstatistics-descrip 3.0200-1           Perl module for basic descriptive
ii  libtime-modules-perl  2006.0814-2        Various Perl modules for time/date
ii  perl-modules [libnet- 5.10.1-17squeeze3  Core Perl modules

mon suggests no packages.

-- Configuration Files:
/etc/mon/auth.cf changed [not included]
/etc/mon/mon.cf changed [not included]

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/lib/mon/mon.d/snmpvar.monitor (from mon package)

*** ~/patch
--- radius.monitor      2004-11-15 06:45:19.000000000 -0800
+++ radius.monitor      2012-02-07 18:51:16.000000000 -0800
@@ -60,10 +60,10 @@
 # uncomment these three lines and replace with appropriate info if you'd prefer
 # not to pass sensitive information on the command line
 #
-$options{"username"} = "username";
-$options{"password"} = "password";
-$options{"secret"} = "radius-secret";
-$options{"dictionary"} = "/etc/radius/dictionary";
+$options{"username"} ||= "username";
+$options{"password"} ||= "password";
+$options{"secret"} ||= "radius-secret";
+$options{"dictionary"} ||= "/etc/radius/dictionary";

 Authen::Radius->load_dictionary( $options{dictionary} );



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to