(RADIATOR) <AuthBy EXTERNAL> Can't pass received attribute to external program via STDIN

Man Meng Fei mf_man at unifiedcomms.com
Thu Oct 9 19:38:35 CDT 2003


Hi
Previously i did ask a question regarding test run <AuthBy External> by
using sample configuration (external.cfg) and perl script
(testcommand.pl) which can be found in the goodies directory. 

After read thru all the replied emails and relevant document, i tried to
execute this sample configuration and perl scrip again. But i still fail
to get the correct respond. 

Hope you can answer the following question.
1.Follwoing are the console screen display of RADIUS server after
receive Accept request from the client

-------------------Console Screen-------------------------
Thu Oct  9 22:54:02 2003: DEBUG: Reading dictionary file 'c:/Program
Files/Radia
tor/dictionary'
Thu Oct  9 22:54:02 2003: DEBUG: Creating authentication port
0.0.0.0:1645
Thu Oct  9 22:54:02 2003: DEBUG: Creating accounting port 0.0.0.0:1646
Thu Oct  9 22:54:02 2003: NOTICE: Server started: Radiator 3.7 on man
(EVALUATIO
N)
Thu Oct  9 22:54:04 2003: DEBUG: Packet dump:
*** Received from 127.0.0.1 port 3330 ....
Code:       Access-Request
Identifier: 199
Authentic:  1234567890123456
Attributes:
        User-Name = "mikem"
        Service-Type = Framed-User
        NAS-IP-Address = 203.63.154.1
        NAS-Port = 1234
        Called-Station-Id = "123456789"
        Calling-Station-Id = "987654321"
        NAS-Port-Type = Async
        User-Password =
"<159><249>:<201><175>\<4><246><188>8<9><160><216>}x<153
>"

Thu Oct  9 22:54:04 2003: DEBUG: Handling request with Handler
'Realm=DEFAULT'
Thu Oct  9 22:54:04 2003: DEBUG:  Deleting session for mikem,
203.63.154.1, 1234

Thu Oct  9 22:54:04 2003: DEBUG: Running command: c:/perl/bin/perl
./goodies/tes
tcommand.pl

------------------------------------------------------------------------
----
Above information has shown that radius server received all the
attribute value from client, and it called the external program which
has been define in <AuthBy External>. But somehow radius server didn't
pass those attributes to external program via STDIN after executed the
external program. 

My question do we need to configure radius configuration file in order
to direct radius server pass those attributes to external program via
STDIN ?

2.From the above console screen, i also discovered that radius server
was halt after calling external program testcommand.pl. I found there is
a endless while loop in the testcommand.pl which is shown as following

while (<>)
{
    chomp;

    if ($_ =~ /^\s*([^\s=]+)\s*=\s*"((\\"|[^"])*)"/)
    {
	# Quoted value
	$input{$1} = $2;
    }
    elsif ($_ =~ /^([^\s=]+)\s*=\s*(.*)/)
    {
	# Unquoted value
	$input{$1} = $2;
    }
}
:
:
My question is can it be the root to cause the radius server halt ?


thank you 



MAN MENG FEI






while ($counter < 4)
{
    print "while\n";
    chomp;

    if ($_ =~ /^\s*([^\s=]+)\s*=\s*"((\\"|[^"])*)"/)
    {
	# Quoted value
	print "Quoted value\n";
	$input{$1} = $2;
    }
    elsif ($_ =~ /^([^\s=]+)\s*=\s*(.*)/)
    {
	# Unquoted value
	print "Unquoted value\n";
	$input{$1} = $2;
    }
    $counter++;
}
:
:


===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list