(RADIATOR) How can I do this (Globalvar)

Prins, R. r.prins at i-groep.leidenuniv.nl
Tue Nov 8 05:10:47 CST 2005



I try to restrict radmin users to realms

What I tried:

...
<Authby RADMIN>
Identifier Use-Radmin
...
AuthSelect BLABLA where USERNAME=%u && SERVICENAME=%{GlobalVar:Service} ... ... Large RADMIN Clause </Authby>

<Handler Realm=vpn-tnb>
...
DefineFormattedGlobalVar Service Network-Devices-User
Authby Use-Radmin
</Handler>

It seems you can't set global variables from within a Handler-clause. But how can I do what I want to do? 

Greetings, Ryko Prins


-----Original Message-----
From: owner-radiator at open.com.au [mailto:owner-radiator at open.com.au] On Behalf Of Martin Wallner
Sent: 08 november 2005 10:57
To: radiator at open.com.au
Subject: (RADIATOR) SQL-Recovery file ... only numerical values


Hi list,

I'm a bit stuck here.... 

We are using PostGresql (8) to store (among other things) our accounting info.

Last week we had to take down the SQL-Server for a short maintainance cycle, after finishing this, I wanted to restore the accounting data that was stored in the SQL-Restore-File, which was created like it was set up to.

Boy, was I surprised when I found out that only the 'integer' and 'bigint' variables were actually filled out in the statements, but not the strings ... and, besides that, that the syntax for the 'insert' statements was not completely correct (missing semicolon at the end)?.... Any ideas what happened here? Maybe 'declare' in the AcctColumnDef that it's a string? But why does it work then when the db-connection is on?

It was good that this was happening in a controlled maintainance cycle, so the data loss was negligable.

Any ideas?

------------------------- config AuthSQL ----------------- <AuthBy SQL>
   Identifier SQLAccounting
   AuthSelect

# primary database on SQL2, ONLY DB to put Accounting on,
# missed entries due to error will be handled by SQLRecoveryFile
   DBSource dbi:Pg:dbname=radius;host=172.27.0.92
   DBUsername radius
   DBAuth xxxxxx
   AccountingTable accounting
   AcctColumnDef   USERNAME,User-Name
   AcctColumnDef   TIME_STAMP,Timestamp,integer
   AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type
   AcctColumnDef   ACCTDELAYTIME,Acct-Delay-Time,integer
   AcctColumnDef   ACCTINPUTOCTETS,Acct-Input-Octets,integer
   AcctColumnDef   ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
   AcctColumnDef   ACCTSESSIONID,Acct-Session-Id
   AcctColumnDef   ACCTSESSIONTIME,Acct-Session-Time,integer
   AcctColumnDef   ACCTTERMINATECAUSE,Acct-Terminate-Cause
   AcctColumnDef   NASIDENTIFIER,NAS-Identifier
   AcctColumnDef   NASPORT,NAS-Port,integer
   AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
   AcctColumnDef   CALLEDSTATIONID,Called-Station-Id
   AcctColumnDef   CALLINGSTATIONID,Calling-Station-Id
   AcctColumnDef   ACCTINPUTPACKETS,Acct-Input-Packets,integer
   AcctColumnDef   ACCTOUTPUTPACKETS,Acct-Output-Packets,integer
   AcctColumnDef   ACCTMULTISESSID,Acct-Multi-Session-Id
   AcctColumnDef   ACCTLINKCOUNT,Acct-Link-Count,integer
   AcctColumnDef   PORT_NR,NAS-Port,integer
   AcctColumnDef   ACCTAUTHENTIC,Acct-Authentic,integer
   AcctColumnDef   NASIPADDR,NAS-IP-Address
   AcctColumnDef   LOGIN_HOST,Login-IP-Host
   AcctColumnDef   LOGIN_SERVICE,Login-Service,integer
   AcctColumnDef   USER_SERVICE_TYPE,Service-Type,integer
   AcctColumnDef   FRAMED_PROTOCOL,Framed-Protocol,integer
   AcctColumnDef   NASPORTTYPE,NAS-Port-Type
   Description Generic Accounting
   SQLRecoveryFile %L/sqlrecovery-%y-%m-%d.sql
#        AcctLogFileName /var/log/radiator/radacct/radius.acct
</AuthBy>

------------------------- output found in SQL-Recovery ------------------ insert into accounting (ACCTAUTHENTIC,ACCTDELAYTIME,ACCTINPUTOCTETS,ACCTINPUTPACKETS,ACCTOUTPUTOCTETS,ACCTOUTPUTPACKETS,ACCTSESSIONI
D,ACCTSESSIONTIME,ACCTSTATUSTYPE,FRAMEDIPADDRESS,FRAMED_PROTOCOL,NASIPADDR,NASPORT,NASPORTTYPE,PORT_NR,TIME_STAMP,USERNAME,USER_SERV
ICE_TYPE) values (1,5,193088,8681,117254,7329,,37485,,,1,,1345,,1345,1128708835,,2)
insert into accounting (ACCTAUTHENTIC,ACCTDELAYTIME,ACCTINPUTOCTETS,ACCTINPUTPACKETS,ACCTOUTPUTOCTETS,ACCTOUTPUTPACKETS,ACCTSESSIONI
D,ACCTSESSIONTIME,ACCTSTATUSTYPE,FRAMEDIPADDRESS,FRAMED_PROTOCOL,NASIPADDR,NASPORT,NASPORTTYPE,PORT_NR,TIME_STAMP,USERNAME,USER_SERV
ICE_TYPE) values (1,0,2161317,19212,11639864,19004,,3870,,,1,,334,,334,1128708840,,2)
insert into accounting (ACCTAUTHENTIC,ACCTDELAYTIME,ACCTINPUTOCTETS,ACCTINPUTPACKETS,ACCTOUTPUTOCTETS,ACCTOUTPUTPACKETS,ACCTSESSIONI
D,ACCTSESSIONTIME,ACCTSTATUSTYPE,FRAMEDIPADDRESS,FRAMED_PROTOCOL,NASIPADDR,NASPORT,NASPORTTYPE,PORT_NR,TIME_STAMP,USERNAME,USER_SERV
ICE_TYPE) values (1,5,12843276,186390,129036554,208643,,352488,,,1,,490,,490,1128708835,,2)
--------------------------------------------------------

regards
Martin Wallner (=mw=)

-----
Eunet Telekom GmbH			e-mail 'martin.wallner at eunet.co.at
vorm. Nextra Österreich			e-mail 'martin.wallner at nextranet.at'
vorm. ViP EDV-Dienstleistungs GesmbH	e-mail 'hostmaster at vip.at'
vorm. Gramtel Austria GmbH.		e-mail 'hostmaster at gramtel.at'
Systems					RIPE:     WM355-RIPE
Nussdorfer Lände 23			NicAT:    WM503823-NICAT
1190 Wien, Vienna, Austria		Tel. +43 (0) 59 1 59 - 1354     

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


----------------------------------------
I am using the free version of SPAMfighter for private users. It has removed 42146 spam emails to date. Paying users do not have this message in their emails. Try www.SPAMfighter.com for free now!

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