Subversion Repositories configs

Rev

Rev 4 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
# -*- text -*-
2
#
34 - 3
#  $Id: c950169307009b088b2c31274f496ffe38e8a793 $
4 - 4
 
5
#
6
#  Set an account to expire T seconds after first login.
7
#  Requires the Expire-After attribute to be set, in seconds.
8
#  You may need to edit raddb/dictionary to add the Expire-After
9
#  attribute.
10
#
11
#  This example is for MySQL.  Other SQL variants should be similar.
12
#
13
#  For versions prior to 2.1.11, this module defined the following
14
#  expansion strings:
15
#
16
#	%k	key_name
17
#	%S	sqlmod_inst
18
#
19
#  These SHOULD NOT be used.  If these are used in your configuration,
20
#  they should be replaced by the following strings, which will work
21
#  identically to the previous ones:
22
#
23
#	%k	${key}
24
#	%S	${sqlmod-inst}
25
#
26
sqlcounter expire_on_login {
27
	counter-name = Expire-After-Initial-Login
28
	check-name = Expire-After
29
	sqlmod-inst = sql
30
	key = User-Name
31
	reset = never
32
	query = "SELECT TIME_TO_SEC(TIMEDIFF(NOW(), acctstarttime)) \
33
		 FROM radacct \
34
		 WHERE UserName='%{${key}}' \
35
		 ORDER BY acctstarttime \
36
		 LIMIT 1;"
37
}