]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Also add support for @ in usernames in log_badlogins
authorkkalev <kkalev>
Wed, 12 Mar 2003 16:26:15 +0000 (16:26 +0000)
committerkkalev <kkalev>
Wed, 12 Mar 2003 16:26:15 +0000 (16:26 +0000)
Changelog
bin/log_badlogins

index d6bfcbaad73e26d325296d80bbfec83ac2f7f9cf..5d022ae78d138ea1621d535dafe09cb8a3a93b04 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -59,6 +59,7 @@ Ver 1.62:
 * Add a few comments in the tot_stats and monthly_tot_stats scripts
 * Add support for ! in usernames in log_badlogins
 * Call gethostbyaddr with an @ in front to suppress error messages
+* Also add support for @ in usernames in log_badlogins
 Ver 1.61:
 * Add a string encoder for greek
 * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future
index 6629669e720fa11162ae564ecc0d081172a343da..3f6915866204c73d8d3a12ce57363087b00d080d 100755 (executable)
@@ -95,16 +95,16 @@ for(;;){
                                        ($year,$mon,$mday,$hour,$min,$sec)=UnixDate($date2,'%Y','%m','%d','%H','%M','%S');
                                }
                                $time = "$year-$mon-$mday $hour:$min:$sec";
-                               if (/\[([\w\-\.\!]+?)\]\s+\(from (.+?)\)/){
+                               if (/\[([\w\-\.\!\@]+?)\]\s+\(from (.+?)\)/){
                                        $user = $1;
                                        ($nas,$port,$caller) = (split /\s+/,$2)[1,3,5];
                                }
-                               elsif (/\[([\w\-\.\!]+?)\/.+?\]\s+\(from (.+?)\)/){
+                               elsif (/\[([\w\-\.\!\@]+?)\/.+?\]\s+\(from (.+?)\)/){
                                        $user = $1;
                                        ($nas,$port,$caller) = (split /\s+/,$2)[1,3,5];
                                }
                                $caller='' if (!defined($caller));
-                               $user =~s/[^\w\-\.\d\!]//g;
+                               $user =~s/[^\w\-\.\d\!\@]//g;
                                $nas =~s/[^\w\.]//g;
                                if ($nas ne 'localhost' && $nas !~ /\.$domain$/){
                                        $nas .= ".$domain";