freeradius.git
13 years agoRevert "Fix typos and regenerate for 2.1.11"
Alan T. DeKok [Sun, 13 Mar 2011 17:50:54 +0000 (18:50 +0100)]
Revert "Fix typos and regenerate for 2.1.11"

This reverts commit 2d0c5fa94938f727b4f37fb7399b777437171eeb.

13 years agoComplain about duplicate virtual servers, too
Alan T. DeKok [Sun, 13 Mar 2011 09:12:11 +0000 (10:12 +0100)]
Complain about duplicate virtual servers, too

13 years agoLook for duplicate module definitions.
Alan T. DeKok [Sun, 13 Mar 2011 09:02:33 +0000 (10:02 +0100)]
Look for duplicate module definitions.

Doing an O(N^2) search over the modules{} section.  If the same module
is defined twice, print an error detailing *both* locations where it
occurs, and exit.

This helps prevent broken configurations by disallowing the server
from loading two conflicting module definitions

13 years agoAdded cf_section_find_name2() API
Alan T. DeKok [Sun, 13 Mar 2011 09:02:06 +0000 (10:02 +0100)]
Added cf_section_find_name2() API

This lets us find the next section by name1 and name2

13 years agoAdded dictionary from Moonshot project
Alan T. DeKok [Fri, 11 Mar 2011 09:49:43 +0000 (10:49 +0100)]
Added dictionary from Moonshot project

13 years agoAdded duplicate names for simplicity
Alan T. DeKok [Sun, 13 Mar 2011 09:14:30 +0000 (10:14 +0100)]
Added duplicate names for simplicity

byte    == uint8
short   == uint16
integer == uint32
signed  == int32

13 years agoHack to let developers catch bad dictionaries
Alan T. DeKok [Sat, 5 Mar 2011 07:07:14 +0000 (08:07 +0100)]
Hack to let developers catch bad dictionaries

uses fprintf to print warning messages when the attributes are
illegally defined in the IANA standard space

13 years agoMove references to illegal dictionaries to raddb/dictionary
Alan T. DeKok [Sat, 5 Mar 2011 06:55:14 +0000 (07:55 +0100)]
Move references to illegal dictionaries to raddb/dictionary

The main dictionary files should NOT be edited.  Ever.  So placing
the "illegal" attributes in a file which can be edited is a good idea.

13 years agoAdded license text
Alan T. DeKok [Sat, 5 Mar 2011 06:50:37 +0000 (07:50 +0100)]
Added license text

13 years agoFix typo
Alan T. DeKok [Sat, 5 Mar 2011 06:48:17 +0000 (07:48 +0100)]
Fix typo

13 years agoRegen configure scripts
Alan T. DeKok [Sat, 5 Mar 2011 06:31:39 +0000 (07:31 +0100)]
Regen configure scripts

13 years agoLook for <openssl/hmac.h>
Alan T. DeKok [Sat, 5 Mar 2011 06:20:21 +0000 (07:20 +0100)]
Look for <openssl/hmac.h>

13 years agoMark pointer NULL when it's free
Alan T. DeKok [Fri, 4 Mar 2011 14:07:56 +0000 (15:07 +0100)]
Mark pointer NULL when it's free

13 years agoUse 3.0 API
Alan T. DeKok [Thu, 3 Mar 2011 14:25:59 +0000 (15:25 +0100)]
Use 3.0 API

13 years agoudpfromto doesn't seem to work for DHCP.
Alan T. DeKok [Thu, 3 Mar 2011 14:22:26 +0000 (15:22 +0100)]
udpfromto doesn't seem to work for DHCP.

It should really be replaced on sending by using an ethernet socket

13 years agoBe more forgiving about policy parsing
Alan T. DeKok [Tue, 1 Mar 2011 15:58:57 +0000 (16:58 +0100)]
Be more forgiving about policy parsing

13 years agoFix typo
Alan T. DeKok [Tue, 1 Mar 2011 12:28:23 +0000 (13:28 +0100)]
Fix typo

13 years agoAllow SQLite to do non-NAS select queries
Alan T. DeKok [Tue, 1 Mar 2011 09:04:24 +0000 (10:04 +0100)]
Allow SQLite to do non-NAS select queries

13 years agoFixes to make debian build for 3.x
Adrien Demarez [Thu, 3 Mar 2011 07:22:04 +0000 (08:22 +0100)]
Fixes to make debian build for 3.x

13 years agoAPI fixes for 3.0
Alan T. DeKok [Mon, 28 Feb 2011 16:46:35 +0000 (17:46 +0100)]
API fixes for 3.0

13 years agoAPI fxes for 3.0
Alan T. DeKok [Mon, 28 Feb 2011 16:45:17 +0000 (17:45 +0100)]
API fxes for 3.0

13 years agoUse 2.2 API
Alan T. DeKok [Mon, 28 Feb 2011 16:28:14 +0000 (17:28 +0100)]
Use 2.2 API

13 years agoVendors using "format=1,1" can have attributes of type "tlv"
Alan T. DeKok [Mon, 28 Feb 2011 14:01:15 +0000 (15:01 +0100)]
Vendors using "format=1,1" can have attributes of type "tlv"

They're now encoded properly.  Previously, they were decoded properly,
but not encoded.

13 years agoVendors can only use the TLV format if they follow the specs
Alan T. DeKok [Mon, 28 Feb 2011 13:59:06 +0000 (14:59 +0100)]
Vendors can only use the TLV format if they follow the specs

"format=1,1" are allowed to use TLVs.  Other vendors are not.
Except WiMAX, because they're special.

13 years agoComment out DHCP dictionary by default.
Alan T. DeKok [Mon, 28 Feb 2011 13:58:33 +0000 (14:58 +0100)]
Comment out DHCP dictionary by default.

it should only be enabled if the server does DHCP.

13 years agoAdded sample of using global / static variables
Alan T. DeKok [Mon, 28 Feb 2011 10:00:14 +0000 (11:00 +0100)]
Added sample of using global / static variables

13 years agoUse rad_digest_cmp() to avoid timing attacks
Alan T. DeKok [Wed, 23 Feb 2011 10:04:31 +0000 (11:04 +0100)]
Use rad_digest_cmp() to avoid timing attacks

13 years agoUse rad_digest_cmp() to avoid timing attacks
Alan T. DeKok [Wed, 23 Feb 2011 10:01:17 +0000 (11:01 +0100)]
Use rad_digest_cmp() to avoid timing attacks

13 years agoUse rad_digest_cmp() to avoid timing attacks
Alan T. DeKok [Wed, 23 Feb 2011 10:01:02 +0000 (11:01 +0100)]
Use rad_digest_cmp() to avoid timing attacks

13 years agoExpose digest_cmp function
Alan T. DeKok [Wed, 23 Feb 2011 09:59:55 +0000 (10:59 +0100)]
Expose digest_cmp function

So that it can be used in other places to avoid timing attacks

13 years agoUpdated license to LGPL rather than GPL
Alan T. DeKok [Wed, 23 Feb 2011 08:46:30 +0000 (09:46 +0100)]
Updated license to LGPL rather than GPL

The "lib" directory and everything it needs have been lgpl for a long time.

13 years agoCorrected license to LGPL rather than GPL
Alan T. DeKok [Wed, 23 Feb 2011 08:26:03 +0000 (09:26 +0100)]
Corrected license to LGPL rather than GPL

13 years agoPrint error if we can't send a packet in rad_send()
Alan T. DeKok [Sun, 20 Feb 2011 08:39:57 +0000 (09:39 +0100)]
Print error if we can't send a packet in rad_send()

13 years agoUse new format for %{..:-...}
Alan T. DeKok [Fri, 18 Feb 2011 14:44:20 +0000 (15:44 +0100)]
Use new format for %{..:-...}

13 years agoAdded radtee
Alan T. DeKok [Fri, 18 Feb 2011 09:37:17 +0000 (10:37 +0100)]
Added radtee

Shamelessly taken from http://horde.net/~jwm/software/misc/comparison-tee

13 years agoUse newer expansion
Alan T. DeKok [Fri, 18 Feb 2011 09:29:24 +0000 (10:29 +0100)]
Use newer expansion

13 years agoBasic configure scripts
Alan T. DeKok [Fri, 18 Feb 2011 09:25:07 +0000 (10:25 +0100)]
Basic configure scripts

13 years agoAPI fixes for 3.x
Alan T. DeKok [Fri, 18 Feb 2011 12:20:02 +0000 (13:20 +0100)]
API fixes for 3.x

13 years agoMake CoA proxying work again.
Alan T. DeKok [Fri, 18 Feb 2011 09:01:11 +0000 (10:01 +0100)]
Make CoA proxying work again.

Only set the reply code if it isn't meant to be proxied.

13 years agoMake query lengths match rlm_sql
Alan T. DeKok [Fri, 18 Feb 2011 08:26:31 +0000 (09:26 +0100)]
Make query lengths match rlm_sql

Closes bug #139

13 years agoBetter fixes for bug #141
Alan T. DeKok [Thu, 17 Feb 2011 11:05:54 +0000 (12:05 +0100)]
Better fixes for bug #141

13 years agoSuppress messages if thread pool is ~full.
Alan T. DeKok [Mon, 14 Feb 2011 14:27:40 +0000 (15:27 +0100)]
Suppress messages if thread pool is ~full.

If it's full and all threads are buys, we shouldn't try to create spare
threads.

13 years agoFix typos and regenerate for 2.1.11
Alan T. DeKok [Mon, 14 Feb 2011 14:03:48 +0000 (15:03 +0100)]
Fix typos and regenerate for 2.1.11

13 years agoGenerated for 2.1.11
Alan T. DeKok [Mon, 14 Feb 2011 14:03:00 +0000 (15:03 +0100)]
Generated for 2.1.11

13 years agoUpdate DHCP code to reflect valuepair API changes.
Chris Mikkelson [Tue, 15 Feb 2011 21:21:28 +0000 (15:21 -0600)]
Update DHCP code to reflect valuepair API changes.

13 years agoFix the tests
Alan T. DeKok [Thu, 17 Feb 2011 09:30:18 +0000 (10:30 +0100)]
Fix the tests

13 years agoNote 3.0
Alan T. DeKok [Thu, 17 Feb 2011 09:29:41 +0000 (10:29 +0100)]
Note 3.0

13 years agoIgnore socket if address families don't match. Closes bug #143
Alan T. DeKok [Fri, 11 Feb 2011 10:12:28 +0000 (11:12 +0100)]
Ignore socket if address families don't match.  Closes bug #143

Manual pull of 995b62f847b93ca217d35c1bbbbe8dcc5157635f

13 years agoNo DB handles is an error, not an informational message.
Alan T. DeKok [Thu, 10 Feb 2011 15:20:39 +0000 (16:20 +0100)]
No DB handles is an error, not an informational message.

13 years agoFixed typo
Alan T. DeKok [Thu, 10 Feb 2011 15:13:59 +0000 (16:13 +0100)]
Fixed typo

13 years agoFixed onoff query
Alan T. DeKok [Thu, 10 Feb 2011 13:41:38 +0000 (14:41 +0100)]
Fixed onoff query

13 years agoEnable udpfromto() for IPv6
Alan T. DeKok [Thu, 10 Feb 2011 12:35:52 +0000 (13:35 +0100)]
Enable udpfromto() for IPv6

On the theory that it will work, or that some magic will get it to work

13 years agoTry to fix udpfromto for IPv6
Alan T. DeKok [Thu, 10 Feb 2011 12:34:20 +0000 (13:34 +0100)]
Try to fix udpfromto for IPv6

13 years agoChange the rules for sending DHCP responses
Alan T. DeKok [Thu, 10 Feb 2011 09:49:03 +0000 (10:49 +0100)]
Change the rules for sending DHCP responses

giaddr -> giaddr
broadcast -> broadcast
nak -> broadcast
!ciaddr -> broadcast
ciaddr -> ciaddr BUT
   if the request was not *from* ciaddr, we need to send a "raw"
   response.

Many DHCP clients can handle a broadcast DHCP OFFER / ACK when first
assigning an address.  Some clients expect a response unicast to
their MAC address.

13 years agoAllow spaces and CRs
Alan T. DeKok [Wed, 9 Feb 2011 10:53:50 +0000 (11:53 +0100)]
Allow spaces and CRs

Now that the underlying redis escape function handles spaces and
control characters

13 years agoAdded escape function
Alan T. DeKok [Wed, 9 Feb 2011 10:52:39 +0000 (11:52 +0100)]
Added escape function

The rules for redis escaping aren't overly clear.  So we escape
control characters, spaces, and the backslash.

13 years agofix freeing eap_handler as opaque (and typo)
Ken-ichirou MATSUZAWA [Tue, 8 Feb 2011 12:19:10 +0000 (21:19 +0900)]
fix freeing eap_handler as opaque (and typo)

 Hello,

I hope this would be hint for fixing segfault and
better solution.

Thanks.

Subject: [PATCH 1/2] freeing EAP opaque with one arg

13 years agoAdded sample for dynamic clients from LDAP
Alan T. DeKok [Wed, 2 Feb 2011 09:14:01 +0000 (10:14 +0100)]
Added sample for dynamic clients from LDAP

13 years agoFix compile warnings and check for !vp
Alan T. DeKok [Sat, 29 Jan 2011 14:44:25 +0000 (15:44 +0100)]
Fix compile warnings and check for !vp

13 years agoCheck return value of lseek correctly
Alan T. DeKok [Fri, 28 Jan 2011 11:14:03 +0000 (12:14 +0100)]
Check return value of lseek correctly

13 years agoAdd %{string:...} for printable data
Alan T. DeKok [Thu, 27 Jan 2011 14:33:32 +0000 (15:33 +0100)]
Add %{string:...} for printable data

13 years agomake fr_print_string return the string length
Alan T. DeKok [Thu, 27 Jan 2011 14:33:17 +0000 (15:33 +0100)]
make fr_print_string return the string length

13 years agoClarify parse error for ascend attributes
Alan T. DeKok [Tue, 25 Jan 2011 16:20:54 +0000 (17:20 +0100)]
Clarify parse error for ascend attributes

Printing to the same string we're reading from is a bad idea.

13 years agoThis patch adds a 'key' parameter to rlm_fastusers, in the same way as
B. Candler [Mon, 24 Jan 2011 13:18:08 +0000 (14:18 +0100)]
This patch adds a 'key' parameter to rlm_fastusers, in the same way as
rlm_files has.

Closes bug #126

13 years agoFixed mismatch
Alan T. DeKok [Mon, 24 Jan 2011 13:03:44 +0000 (14:03 +0100)]
Fixed mismatch

13 years agoAdd $(LIBRADIUS) to allow it to link
Alan T. DeKok [Thu, 20 Jan 2011 15:01:17 +0000 (16:01 +0100)]
Add $(LIBRADIUS) to allow it to link

13 years agoUpdate ignore files
Alan T. DeKok [Thu, 20 Jan 2011 09:00:38 +0000 (10:00 +0100)]
Update ignore files

13 years agoUse _sysconfdir instead of /etc
Alan T. DeKok [Thu, 20 Jan 2011 08:52:20 +0000 (09:52 +0100)]
Use _sysconfdir instead of /etc

It allows the config files to be placed anywhere, instead of
a hard-coded path

13 years agoCall write() rather than fwrite()
Alan T. DeKok [Wed, 19 Jan 2011 16:25:10 +0000 (17:25 +0100)]
Call write() rather than fwrite()

It returns real errors...

13 years agoUpdated as per recent WiMAX specs
Alan T. DeKok [Thu, 20 Jan 2011 09:26:03 +0000 (10:26 +0100)]
Updated as per recent WiMAX specs

13 years agoUpdate to work with more recent versions of Oracle
Alexandre Chapellon [Tue, 18 Jan 2011 13:57:05 +0000 (14:57 +0100)]
Update to work with more recent versions of Oracle

13 years agoMove request STOP logic from threads into event code
Alan T. DeKok [Tue, 18 Jan 2011 09:09:36 +0000 (10:09 +0100)]
Move request STOP logic from threads into event code

13 years agoMore sanity checks on attribute numbers
Alan T. DeKok [Tue, 18 Jan 2011 09:09:07 +0000 (10:09 +0100)]
More sanity checks on attribute numbers

13 years agoEnable building without DHCP
Alan T. DeKok [Tue, 18 Jan 2011 09:08:52 +0000 (10:08 +0100)]
Enable building without DHCP

13 years agofixes seg fault whenever the redis server goes down
Gabriel Blanchard [Fri, 14 Jan 2011 06:14:29 +0000 (07:14 +0100)]
fixes seg fault whenever the redis server goes down

13 years agoAPI fixes for 2.2
Alan T. DeKok [Thu, 13 Jan 2011 23:14:18 +0000 (00:14 +0100)]
API fixes for 2.2

13 years agoSample configuration for the "redis" module
Alan T. DeKok [Thu, 13 Jan 2011 23:10:42 +0000 (00:10 +0100)]
Sample configuration for the "redis" module

13 years agoAdded password support (untested)
Alan T. DeKok [Thu, 13 Jan 2011 23:09:57 +0000 (00:09 +0100)]
Added password support (untested)

13 years agoMore fixes
Alan T. DeKok [Thu, 13 Jan 2011 22:51:28 +0000 (23:51 +0100)]
More fixes

13 years agoSample configuration for the rediswho module
Gabriel Blanchard [Thu, 13 Jan 2011 22:47:27 +0000 (23:47 +0100)]
Sample configuration for the rediswho module

13 years agoradwho using the redis database.
Gabriel Blanchard [Thu, 13 Jan 2011 22:35:00 +0000 (23:35 +0100)]
radwho using the redis database.

13 years agoModule which connects to a redis server.
Gabriel Blanchard [Thu, 13 Jan 2011 22:09:35 +0000 (23:09 +0100)]
Module which connects to a redis server.

13 years agoFile contents .php3 -> .php
Alan T. DeKok [Thu, 13 Jan 2011 10:12:53 +0000 (11:12 +0100)]
File contents .php3 -> .php

13 years agoRenamed *.php3 to *.php
Alan T. DeKok [Thu, 13 Jan 2011 10:11:07 +0000 (11:11 +0100)]
Renamed *.php3 to *.php

13 years agoAdded more sample policies
Alan T. DeKok [Tue, 11 Jan 2011 12:22:09 +0000 (13:22 +0100)]
Added more sample policies

13 years agoFixed typo
Alan T. DeKok [Tue, 11 Jan 2011 10:56:54 +0000 (11:56 +0100)]
Fixed typo

13 years agoAllow hints && huntgroup files to be NULL
Alan T. DeKok [Tue, 11 Jan 2011 08:54:40 +0000 (09:54 +0100)]
Allow hints && huntgroup files to be NULL

13 years agoRemoved notes on CVS
Alan T. DeKok [Sat, 8 Jan 2011 08:55:52 +0000 (09:55 +0100)]
Removed notes on CVS

13 years agoRemoved last use of explicit module configuration
Alan T. DeKok [Tue, 11 Jan 2011 15:12:55 +0000 (16:12 +0100)]
Removed last use of explicit module configuration

13 years agoMoved sqlippool.conf to modules
Alan T. DeKok [Tue, 11 Jan 2011 15:12:30 +0000 (16:12 +0100)]
Moved sqlippool.conf to modules

13 years agoMoved sql.conf to raddb/modules
Alan T. DeKok [Tue, 11 Jan 2011 15:11:54 +0000 (16:11 +0100)]
Moved sql.conf to raddb/modules

13 years agoMoved eap.conf to raddb
Alan T. DeKok [Tue, 11 Jan 2011 15:11:25 +0000 (16:11 +0100)]
Moved eap.conf to raddb

13 years agoFixes as posted by Stefan Winter
Alan T. DeKok [Fri, 7 Jan 2011 11:28:56 +0000 (12:28 +0100)]
Fixes as posted by Stefan Winter

just now I have had to upgrade my dialup_admin installation to a machine running PHP5.3, and also noticed numerous PHP errors.

I have fixed the code, see attached patch. It solves the following bugs/deprecated code warnings:

* replace ereg -> preg_match, ereg_replace -> preg_replace, split -> preg_split for PHP5.3 compatibility
* fix LIMIT not working when using MySQL
* add configuration item "timezone" to make PHP 5.1+ happy

and adds one (trivial, one-liner) feature:

* add comparison operators "!=" and "not like" to Accounting

Now, I have an almost error/warning/notice free installation. There is still something bogus around the use of mktime() someplace, but I don't use that part of dialup_admin, so I'll leave that alone.

13 years agoFixed typo
Alan T. DeKok [Fri, 7 Jan 2011 10:14:06 +0000 (11:14 +0100)]
Fixed typo

13 years agoBe less aggressive about printing message
Alan T. DeKok [Thu, 6 Jan 2011 10:49:18 +0000 (11:49 +0100)]
Be less aggressive about printing message

If the client re-uses the same RADIUS Id, the "check_handler" callback
will be called.  However, it's *not* being called because the RADIUS packet
timed out, so we should *not* print the warning message that the EAP
session didn't finish

13 years agoFix compile warnings
Alan T. DeKok [Thu, 6 Jan 2011 10:49:04 +0000 (11:49 +0100)]
Fix compile warnings

13 years agoFix fd leak
Alan T. DeKok [Mon, 3 Jan 2011 20:25:21 +0000 (21:25 +0100)]
Fix fd leak

13 years agoAdd support for Apple Grand Central Dispatch
Alan T. DeKok [Sat, 1 Jan 2011 14:37:33 +0000 (15:37 +0100)]
Add support for Apple Grand Central Dispatch

used when WITH_GCD is defined.  If it is defined, then any existing thread
configuration is ignored, and the dispatch system is used instead.

13 years agoFixed printing of attributes
Alan T. DeKok [Thu, 30 Dec 2010 10:04:47 +0000 (11:04 +0100)]
Fixed printing of attributes

13 years agoPrint error when foo=`..` is invalid
Alan T. DeKok [Thu, 30 Dec 2010 09:36:59 +0000 (10:36 +0100)]
Print error when foo=`..` is invalid

It can't occur in the main configuration sections, but it can occur
in an "update" section