Skip to content

Commit

Permalink
Last tranche of config item name standardisation (in modules)
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jul 3, 2013
1 parent 362ae79 commit 62a5d54
Show file tree
Hide file tree
Showing 40 changed files with 504 additions and 407 deletions.
2 changes: 1 addition & 1 deletion doc/deployment/tuning_guide
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ o Add AcctUniqueId in the accounting_stop query. Especially if you have a lot of

------------ COUNTER MODULE ----------
o Enable noatime on the counter db files.
o Tune the cache-size configuration directive to match your needs.
o Tune the cache_size configuration directive to match your needs.
The cache size should be set to 2-3 * number of available nas ports.
o Keep the database in a memory mapped file if you can help. Backup the
file every 10 mins to the disk and copy it to the memory mapped one
Expand Down
4 changes: 2 additions & 2 deletions doc/modules/ldap_howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1580,13 +1580,13 @@ edit radiusd.conf::
#radutmp {
# filename = ${logdir}/radutmp
# permissions = 0600
# callerid = "yes"
# caller_id = "yes"
#}

#radutmp sradutmp {
# filename = ${logdir}/sradutmp
# permissions = 0644
# callerid = "no"
# caller_id = "no"
#}

#attr_filter {
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/rlm_passwd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ A: In case you configured realm to strip username, User-Password attribute

Q: How can I say passwd to add attribute even if it's value is empty?

A: set ignoreempty to "no" in module configuration.
A: set ignore_empty to "no" in module configuration.


5. Acknowlegements:
Expand Down
24 changes: 12 additions & 12 deletions doc/modules/rlm_sqlcounter
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ with the following content (for mysql):

#-----#
sqlcounter noresetcounter {
counter-name = Max-All-Session-Time
check-name = Max-All-Session
reply-name = Session-Timeout
sqlmod-inst = sql
sql_module_instance = sqlcca3
counter_name = Max-All-Session-Time
check_name = Max-All-Session
reply_name = Session-Timeout
key = User-Name
reset = never

Expand All @@ -36,11 +36,11 @@ sqlcounter noresetcounter {


sqlcounter dailycounter {
sql_module_instance = sqlcca3
driver = "rlm_sqlcounter"
counter-name = Daily-Session-Time
check-name = Max-Daily-Session
reply-name = Session-Timeout
sqlmod-inst = sqlcca3
counter_name = Daily-Session-Time
check_name = Max-Daily-Session
reply_name = Session-Timeout
key = User-Name
reset = daily

Expand All @@ -49,10 +49,10 @@ sqlcounter dailycounter {
}

sqlcounter monthlycounter {
counter-name = Monthly-Session-Time
check-name = Max-Monthly-Session
reply-name = Session-Timeout
sqlmod-inst = sqlcca3
sql_module_instance = sqlcca3
counter_name = Monthly-Session-Time
check_name = Max-Monthly-Session
reply_name = Session-Timeout
key = User-Name
reset = monthly

Expand Down
12 changes: 6 additions & 6 deletions man/man5/rlm_counter.5
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The filename where the usage data is stored.
An attribute which will be present in the Access-Request to be used as
the 'index' value for the counter. A counter entry is tracked for
each unique key. The most likely key you will want to use is User-Name.
.IP count-attribute
.IP count_attribute
An attribute which will be used to increment the counter value. If this
attribute is Acct-Session-Time or an integer value the counter data is
incremented by the Attribute value. For all other attribute types the
Expand All @@ -46,7 +46,7 @@ this variable are:
Alternatively, it can be user defined, in the form: num[hdwm]. num is
a numeric value, followed by one or none of the following letters. h: hours,
d: days, w: weeks, m: months.
.IP check-name
.IP check_name
This defines an attribute name which will be registered by the counter module
and can be used to set the maximum allowed value for the counter after which
the user is rejected. If Daily-Session-Time is set, you can use the following
Expand All @@ -56,21 +56,21 @@ syntax in the Users file to set a cap of 3600 seconds ( 8 hours ):
DEFAULT Max-Daily-Session := 3600
.DE
.PP
.IP reply-name
.IP reply_name
This is the name of the attribute which will contain the remaining value for
the counter in the reply packet when the user is successfully authorized. The
default attribute name is "Session-Timeout".
.IP allowed-servicetype
.IP allowed_service_type
This can be used to only apply the limitations to specific service types of
sessions. For example, setting this to Framed-User will only apply the counter
module to Framed sessions, excluding other types such as Telnet or Rlogin.
.IP cache-size
.IP cache_size
The maximum size of the cache to be used by the module. The default is 1000.
.SH NOTES
This module registers an attribute, so it should be added to the
instantiate section, to be called on server startup. When used
in the authorize section, it must come after any modules which
set the 'check-name' attribute.
set the 'check_name' attribute.
.PP
.SH SECTIONS
.BR instantiate,
Expand Down
12 changes: 6 additions & 6 deletions man/man5/rlm_passwd.5
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ The path to the file.
.IP delimiter\ =\ ":"
The character to use as a delimiter between fields. The default is
":"
.IP hashsize
.IP hash_size
The size of the hashtable. If 0, then the passwords are not cached
and the passwd file is parsed for every request. We do not recommend
such a configuration. A larger hashsize means less probability of
collision and faster search in hashtable. Having a hashsize in the range
such a configuration. A larger hash_size means less probability of
collision and faster search in hashtable. Having a hash_size in the range
of 30-100% of the number of passwd file records is reasonable.
.IP allowmultiplekeys
.IP allow_multiple_keys
If set to 'yes', and more than one record in file matches the request,
then the attributes from all records will be used. If set to 'no' (the
default) the module will warn about duplicated records.
.IP ignorenislike
.IP ignore_nislike
If set to 'yes', then all records from the file beginning with the '+'
sign will be ignored. The default is 'no'.
.IP format
Expand All @@ -66,7 +66,7 @@ prefix the attribute name in the "format" string with the '~' character.
.PP
To add an attribute to the reply (to be sent back to the NAS) prefix
the attribute name in the "format" string with the '=' character.
.IP ignoreempty
.IP ignore_empty
This configuration item defaults to "yes". If there is no value for
the attribute, then the attribute is not added. By setting this value
to "no", you can force the attribute to be added, even if there is no
Expand Down
28 changes: 14 additions & 14 deletions raddb/mods-available/counter
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# reset = 12 (reset every 12 days)
#
#
# The check-name attribute defines an attribute which will be
# The check_name attribute defines an attribute which will be
# registered by the counter module and can be used to set the
# maximum allowed value for the counter after which the user
# is rejected.
Expand All @@ -38,26 +38,26 @@
# Fall-Through = 1
#
# You should add the counter module in the instantiate
# section so that it registers check-name before the files
# section so that it registers check_name before the files
# module reads the users file.
#
# If check-name is set and the user is to be rejected then we
# If check_name is set and the user is to be rejected then we
# send back a Reply-Message and we log a Failure-Message in
# the radius.log
#
# If the count attribute is Acct-Session-Time then on each
# login we send back the remaining online time as a
# Session-Timeout attribute ELSE and if the reply-name is
# set, we send back that attribute. The reply-name attribute
# Session-Timeout attribute ELSE and if the reply_name is
# set, we send back that attribute. The reply_name attribute
# MUST be of an integer type.
#
# The counter-name can also be used instead of using the check-name
# The counter-name can also be used instead of using the check_name
# like below:
#
# DEFAULT Daily-Session-Time > 3600, Auth-Type = Reject
# Reply-Message = "You've used up more than one hour today"
#
# The allowed-servicetype attribute can be used to only take
# The allowed_service_type attribute can be used to only take
# into account specific sessions. For example if a user first
# logs in through a login menu and then selects ppp there will
# be two sessions. One for Login-User and one for Framed-User
Expand All @@ -66,17 +66,17 @@
# The module should be added in the instantiate, authorize and
# accounting sections. Make sure that in the authorize
# section it comes after any module which sets the
# 'check-name' attribute.
# 'check_name' attribute.
#
counter daily {
filename = ${db_dir}/db.daily
key = User-Name
count-attribute = Acct-Session-Time
count_attribute = Acct-Session-Time
reset = daily
counter-name = Daily-Session-Time
check-name = Max-Daily-Session
reply-name = Session-Timeout
allowed-servicetype = Framed-User
cache-size = 5000
counter_name = Daily-Session-Time
check_name = Max-Daily-Session
reply_name = Session-Timeout
allowed_service_type = Framed-User
cache_size = 5000
}

6 changes: 3 additions & 3 deletions raddb/mods-available/dhcp_sqlippool
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
## $Id$

sqlippool dhcp_sqlippool {
sql-instance-name = "sql"
sql_instance_name = "sql"

ippool_table = "radippool"

lease-duration = 7200
lease_duration = 7200

# Client's MAC address is mapped to Calling-Station-Id in policy.conf
pool-key = "%{Calling-Station-Id}"
pool_key = "%{Calling-Station-Id}"

# For now, it only works with MySQL.
$INCLUDE ${modconfdir}/sql/ippool-dhcp/mysql/queries.conf
Expand Down
6 changes: 3 additions & 3 deletions raddb/mods-available/etc_group
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
passwd etc_group {
filename = /etc/group
format = "=Etc-Group-Name:::*,User-Name"
hashsize = 50
ignorenislike = yes
allowmultiplekeys = yes
hash_size = 50
ignore_nislike = yes
allow_multiple_keys = yes
delimiter = ":"
}

14 changes: 7 additions & 7 deletions raddb/mods-available/ippool
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ ippool main_pool {

# range-start,range-stop:
# The start and end ip addresses for this pool.
range-start = 192.168.1.1
range-stop = 192.168.3.254
range_start = 192.168.1.1
range_stop = 192.168.3.254

# netmask:
# The network mask used for this pool.
netmask = 255.255.255.0

# cache-size:
# cache_size:
# The gdbm cache size for the db files. Should
# be equal to the number of ip's available in
# the ip pool
cache-size = 800
cache_size = 800

# session-db:
# The main db file used to allocate addresses.
session-db = ${db_dir}/db.ippool
session_db = ${db_dir}/db.ippool

# ip-index:
# Helper db index file used in multilink
ip-index = ${db_dir}/db.ipindex
ip_index = ${db_dir}/db.ipindex

# override:
# If set, the Framed-IP-Address already in the
Expand All @@ -60,7 +60,7 @@ ippool main_pool {
# Specifies the maximum time in seconds that an
# entry may be active. If set to zero, means
# "no timeout". The default value is 0
maximum-timeout = 0
maximum_timeout = 0

# key:
# The key to use for the session database (which
Expand Down
2 changes: 1 addition & 1 deletion raddb/mods-available/ldap
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ldap {
# If the attribute name is wrapped in double
# quotes it will be xlat expanded.
#
# valuepair_attr = "radiusValuePair"
# valuepair_attribute = "radiusValuePair"

# Set to yes if you have eDirectory and want to use the universal
# password mechanism.
Expand Down
12 changes: 6 additions & 6 deletions raddb/mods-available/passwd
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
# Field marked as ',' may contain a comma separated list
# of attributes.
#
# hashsize - hashtable size. Setting it to 0 is no longer permitted
# hash_size - hashtable size. Setting it to 0 is no longer permitted
# A future version of the server will have the module
# automatically determine the hash size. Having it set
# manually should not be necessary.
#
# allowmultiplekeys - if many records for a key are allowed
# allow_multiple_keys - if many records for a key are allowed
#
# ignorenislike - ignore NIS-related records
# ignore_nislike - ignore NIS-related records
#
# delimiter - symbol to use as a field separator in passwd file,
# for format ':' symbol is always used. '\0', '\n' are
Expand All @@ -51,7 +51,7 @@
passwd etc_passwd {
filename = /etc/passwd
format = "*User-Name:Crypt-Password:"
hashsize = 100
ignorenislike = no
allowmultiplekeys = no
hash_size = 100
ignore_nislike = no
allow_multiple_keys = no
}
2 changes: 1 addition & 1 deletion raddb/mods-available/radutmp
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ radutmp {
# are usually private.
permissions = 0600

callerid = "yes"
caller_id = "yes"
}
16 changes: 8 additions & 8 deletions raddb/mods-available/rediswho
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
rediswho {
# How many sessions to keep track of per user.
# If there are more than this number, older sessions are deleted.
trim-count = 15
trim_count = 15

# Expiry time in seconds. Any sessions which have not received
# an update in this time will be automatically expired.
expire-time = 86400
expire_time = 86400

#
# Each subsection contains insert / trim / expire queries.
Expand All @@ -28,19 +28,19 @@ rediswho {
#
Start {
insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
trim = "LTRIM %{User-Name} 0 ${..trim-count}"
expire = "EXPIRE %{User-Name} ${..expire-time}"
trim = "LTRIM %{User-Name} 0 ${..trim_count}"
expire = "EXPIRE %{User-Name} ${..expire_time}"
}

Interim-Update {
insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
trim = "LTRIM %{User-Name} 0 ${..trim-count}"
expire = "EXPIRE %{User-Name} ${..expire-time}"
trim = "LTRIM %{User-Name} 0 ${..trim_count}"
expire = "EXPIRE %{User-Name} ${..expire_time}"
}

Stop {
insert = "LPUSH %{User-Name} %l,%{Acct-Session-Id},%{NAS-IP-Address},%{Acct-Session-Time},%{Framed-IP-Address},%{%{Acct-Input-Gigawords}:-0},%{%{Acct-Output-Gigawords}:-0},%{%{Acct-Input-Octets}:-0},%{%{Acct-Output-Octets}:-0}"
trim = "LTRIM %{User-Name} 0 ${..trim-count}"
expire = "EXPIRE %{User-Name} ${..expire-time}"
trim = "LTRIM %{User-Name} 0 ${..trim_count}"
expire = "EXPIRE %{User-Name} ${..expire_time}"
}
}
6 changes: 3 additions & 3 deletions raddb/mods-available/smbpasswd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
passwd smbpasswd {
filename = /etc/smbpasswd
format = "*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::"
hashsize = 100
ignorenislike = no
allowmultiplekeys = no
hash_size = 100
ignore_nislike = no
allow_multiple_keys = no
}
Loading

0 comments on commit 62a5d54

Please sign in to comment.