From: kkalev Date: Fri, 16 Jan 2004 13:50:06 +0000 (+0000) Subject: * Add the ability to erase rows from the badusers table X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=17ed4ec57498a2e4de005bfce53f4a1872ba44c6;p=freeradius-dialup-admin.git * Add the ability to erase rows from the badusers table * In log_badlogins for multiple logins if it is a mppp attempt, log it --- diff --git a/Changelog b/Changelog index e6e8af3..14f3e63 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,8 @@ Ver 1.68: * Huge PostgreSQL compatibility patch by Guy Fraser * Also support the Crypt-Password attribute in lib/sql/password_check.php3. Patch by Guy Fraser * Small fix in user_finger.php3 +* Add the ability to erase rows from the badusers table +* In log_badlogins for multiple logins if it is a mppp attempt, log it Ver 1.65: * Add a captions.conf file with a few configurable captions for now * Move the nas list to a separate file called naslist.conf diff --git a/bin/log_badlogins b/bin/log_badlogins index d517073..5e9c6e8 100755 --- a/bin/log_badlogins +++ b/bin/log_badlogins @@ -87,7 +87,11 @@ for(;;){ $do=1; } elsif (/Multiple logins/){ - $cause='Multiple-Logins'; + if (/MPP attempt/){ + $cause='Multiple-Logins (MPP Attempt)'; + }else{ + $cause='Multiple-Logins'; + } $do=1; } elsif (/(Outside allowed timespan \(.+?\)):/){ diff --git a/htdocs/badusers.php3 b/htdocs/badusers.php3 index cb01648..7657d59 100644 --- a/htdocs/badusers.php3 +++ b/htdocs/badusers.php3 @@ -63,6 +63,45 @@ print <<SQL Error:" . da_sql_error($link2,$config) . "
\n"; + @da_sql_close($link2,$config); + } + else + echo "SQL Error: Could not connect to SQL database: $server
\n"; + } + } + } + } + else + echo "Database query failed: " . da_sql_error($link,$config) . "
\n"; + @da_sql_close($link,$config); +} +else + echo "Could not connect to SQL database
\n"; +} + echo <<
@@ -79,29 +118,38 @@ echo <<
$prev_str up to $now_str +
+ + EOM; ?>

- + = '$prev_str' ORDER BY date $order $limit;"); + WHERE UserName $usercheck AND Date <= '$now_str' + AND Date >= '$prev_str' ORDER BY Date $order $limit;"); if ($search){ while( $row = @da_sql_fetch_array($search,$config) ){ $num++; - $user = "$row[username]"; - $date = "$row[date]"; - $reason = "$row[reason]"; - $admin = "$row[admin]"; + $id = $row[id]; + $user = "$row[UserName]"; + $date = "$row[Date]"; + $reason = "$row[Reason]"; + $admin = "$row[Admin]"; + if ($admin == $auth_user || $admin == '-') + $action = ""; + else + $action = ""; if ($admin == '') $admin = '-'; if ($reason == '') @@ -113,6 +161,7 @@ if ($link){ + $action EOM; } @@ -127,7 +176,6 @@ echo <<
#userdateadminreason#userdateadminreasonadministrator action
-$date $admin $reason

-