From eb057a04eed7f4707097dc8ae6d322b0982f8cd9 Mon Sep 17 00:00:00 2001 From: kkalev Date: Sat, 9 Feb 2002 13:41:25 +0000 Subject: [PATCH] * Fix a small bug in log_badlogins. The nas domain should be a variable not hard coded. --- Changelog | 1 + bin/log_badlogins | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index afd005e..ac88d86 100644 --- a/Changelog +++ b/Changelog @@ -12,6 +12,7 @@ Ver 1.29: * Fixed a bug in sql/change_attrs which did not allow multi valued attributes in sql. * unset item_vals before adding info in ldap and sql user_info files. * Add support for the rest of the operators. Created the lib/operators.php3 file containing helper functions +* Fix a small bug in log_badlogins. The nas domain should be a variable not hard coded. Ver 1.28: * Make user_delete.php3 print something when a user is deleted * Cache nas hostname lookups in user_accounting diff --git a/bin/log_badlogins b/bin/log_badlogins index ed6808e..9018eec 100755 --- a/bin/log_badlogins +++ b/bin/log_badlogins @@ -5,7 +5,8 @@ use Date::Manip qw(ParseDate UnixDate); $|=1; $file=shift||'none'; -$conf=shift||'/usr/local/dialup_admin/conf/admin.conf'; +$conf=shift||'/src/cvs/radiusd/dialup_admin/conf/admin.conf'; +$domain='company.com'; open CONF, "<$conf" or die "Could not open configuration file\n"; @@ -69,8 +70,8 @@ for(;;){ $caller='' if (!defined($caller)); $user =~s/[^\w]//g; $nas =~s/[^\w]//g; - if ($nas !~ /\.noc\.ntua\.gr$/){ - $nas .= '.noc.ntua.gr'; + if ($nas !~ /\.$domain$/){ + $nas .= '.$domain'; } $port =~s/[^\d]//g; $caller =~s/[^\d]//g; -- 2.39.5