Fwd: (RADIATOR) Incomplete entries in syslog

Jan Tomasek jan at tomasek.cz
Fri Aug 27 07:51:45 CDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Mike,
> I notice that the place where the syslog log cuts off corresponds to a '%c' in
> the original log string. I wonder if this is a coincidence, or whether the
> other examples you have seen also correspond to a % followed by a printf
> special character? Can you check?

Confirmed! :) I checked source code and in Radius/LogSYSLOG.pm I see

    if ($self->willLog($priority, $p))
    {
        eval {openlog($self->{LogIdent}, 'pid', $self->{Facility});
              syslog("$self->{Facility}|$priorityToSyslog[$priority]", $s);
              closelog()};

man 3 syslog says:
       void syslog(int priority, const char *format, ...);
it looks that your $s needs to be properly escaped. I tried to add
	$s =~ s/%/%%/;
before that eval. So we will see on Monday.

Few more examples:

Syslog:
Aug 26 14:36:58 radius1 " 	NAS-IP-Address = 195.113.187.19

File:
Thu Aug 26 14:36:58 2004: DEBUG: Handling request with Handler
'Realm=radius1.cesnet.cz'
Thu Aug 26 14:36:58 2004: DEBUG:  Deleting session for
netsaint at radius1.cesnet.cz, 195.113.187.19,
Thu Aug 26 14:36:58 2004: DEBUG: Handling with Radius::AuthRADIUS
Thu Aug 26 14:36:58 2004: DEBUG: Packet dump:
*** Sending to 195.113.144.226 port 1812 ....
Code:       Access-Request
Identifier: 197
Authentic:  <161><198>O<251>f;<184><129><142>"<179><247><244><170><165>b
Attributes:
        Service-Type = Authenticate-Only
        User-Name = "netsaint at radius1.cesnet.cz"
        User-Password = "<180><11><235><147><145><217>[<224>F;<17>|]<136>%c"
        NAS-IP-Address = 195.113.187.19


Syslog:
Aug 25 22:09:49 radius1  Attributes: 	Tunnel-Private-Group-ID = 1:666
Tunnel-Type = 1:VLAN 	Tunnel-Medium-Type = 1:802

File:
Wed Aug 25 22:09:49 2004: DEBUG: Packet dump:
*** Received from 147.251.6.40 port 1812 ....
Code:       Access-Accept
Identifier: 120
Authentic:  <154><23><161><136><196>1h<6>O<226><246>`<8><244>%c
Attributes:
        Tunnel-Private-Group-ID = 1:666
        Tunnel-Type = 1:VLAN
        Tunnel-Medium-Type = 1:802

Syslog:
Aug 25 18:38:42 radius1 <254><174><7>C@<13><137><158><241><139>@|"
NAS-IP-Address = 195.113.187.19

File:
Wed Aug 25 18:38:42 2004: DEBUG: Handling request with Handler
'Realm=radius1.cesnet.cz'
Wed Aug 25 18:38:42 2004: DEBUG:  Deleting session for
netsaint at radius1.cesnet.cz, 195.113.187.19,
Wed Aug 25 18:38:42 2004: DEBUG: Handling with Radius::AuthRADIUS
Wed Aug 25 18:38:42 2004: DEBUG: Packet dump:
*** Sending to 195.113.144.226 port 1812 ....
Code:       Access-Request
Identifier: 42
Authentic:  0<242><171>`<254>a<180><141><253><29>'X<214>%<225><183>
Attributes:
        Service-Type = Authenticate-Only
        User-Name = "netsaint at radius1.cesnet.cz"
        User-Password = "<172>%c<174><254><174><7>C@<13><137><158><241><139>@|"
        NAS-IP-Address = 195.113.187.19

Syslog:
Aug 25 06:10:00 radius1 H<149>2<140>s<231><198><183> Attributes: 	Service-Type
= Authenticate-Only 	User-Name = "netsaint at radius2.cesnet.cz" 	User-Password =
"<195><233>{x<7><1><0><253><153><148>(<250><248><206><2><181>" 	NAS-IP-Address
= 195.113.187.19

File:
Wed Aug 25 06:10:16 2004: DEBUG: Packet dump:
*** Received from 195.178.64.172 port 49363 ....
Code:       Access-Request
Identifier: 11
Authentic:  <238>D<198><206><175><132><142><144><132><22><164><156><4>Q<147><143>
Attributes:
        Service-Type = Authenticate-Only
        User-Name = "netsaint at radius2.cesnet.cz"
        User-Password = "<129><227><136>*,]<140><155><242><165>w<171>\P<229>x"
        NAS-IP-Address = 195.113.187.19


- --
- --------------------------------------------------------------
Jan Tomasek aka Semik           work: CESNET, z.s.p.o.
http://www.tomasek.cz/                Zikova 4, 160 00 Praha 6
                                      Czech Republic
phone(work): +420 2 2435 5279         http://www.cesnet.cz/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBLy5f79++DGvj6tMRAtcWAJ4ngp1q1rrqagMORv826Es0pR8ERgCeMSSt
GJBVRS4j4e2UVmtMsDFA4/w=
=Shs1
-----END PGP SIGNATURE-----

--
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