freeradius.git
16 years ago Call it -pre1, as -pre0 has been around forever release_2_0_0_pre1
aland [Tue, 15 May 2007 12:48:04 +0000 (12:48 +0000)]
Call it -pre1, as -pre0 has been around forever

16 years ago Enable udpfromto by default. It's tested, and solves a lot of
aland [Tue, 15 May 2007 12:46:36 +0000 (12:46 +0000)]
Enable udpfromto by default.  It's tested, and solves a lot of
problems.

16 years ago Relax checks a little
aland [Tue, 15 May 2007 12:41:53 +0000 (12:41 +0000)]
Relax checks a little

16 years ago Port fix for Coverity bug #13 from 1.1.x
aland [Tue, 15 May 2007 10:23:03 +0000 (10:23 +0000)]
Port fix for Coverity bug #13 from 1.1.x

16 years ago Port fix for Coverity bug #22 from 1.1.x
aland [Tue, 15 May 2007 10:20:04 +0000 (10:20 +0000)]
Port fix for Coverity bug #22 from 1.1.x

16 years ago Port fix for Coverity bug #23 from 1.1.x
aland [Tue, 15 May 2007 10:18:03 +0000 (10:18 +0000)]
Port fix for Coverity bug #23 from 1.1.x

16 years ago Port fix for Coverity bug #25 from 1.1.x
aland [Tue, 15 May 2007 10:17:23 +0000 (10:17 +0000)]
Port fix for Coverity bug #25 from 1.1.x

16 years ago Port fix for Coverity bug #27 from 1.1.x
aland [Tue, 15 May 2007 10:14:54 +0000 (10:14 +0000)]
Port fix for Coverity bug #27 from 1.1.x

16 years ago Port fix for Coverity bug #37 from 1.1.x
aland [Tue, 15 May 2007 10:10:35 +0000 (10:10 +0000)]
Port fix for Coverity bug #37 from 1.1.x

16 years ago Port fix for Coverity bug #38 from 1.1.x
aland [Tue, 15 May 2007 10:09:20 +0000 (10:09 +0000)]
Port fix for Coverity bug #38 from 1.1.x

16 years ago Port fix for Coverity bug #29 from 1.1.x
aland [Tue, 15 May 2007 10:06:28 +0000 (10:06 +0000)]
Port fix for Coverity bug #29 from 1.1.x

16 years ago Port fix for Coverity bug #33 from 1.1.x
aland [Tue, 15 May 2007 10:04:50 +0000 (10:04 +0000)]
Port fix for Coverity bug #33 from 1.1.x

16 years ago Port fix for Coverity bug #41 from 1.1.x
aland [Tue, 15 May 2007 10:03:12 +0000 (10:03 +0000)]
Port fix for Coverity bug #41 from 1.1.x

16 years ago Port fix for Coverity bug #40 from 1.1.x
aland [Tue, 15 May 2007 10:02:19 +0000 (10:02 +0000)]
Port fix for Coverity bug #40 from 1.1.x

16 years ago Pull fix for Coverity bug #15 from 1.1.x
aland [Tue, 15 May 2007 09:58:25 +0000 (09:58 +0000)]
Pull fix for Coverity bug #15 from 1.1.x

16 years ago Pull suppression of "error in read client cert A" from 1.1.x
aland [Tue, 15 May 2007 09:56:26 +0000 (09:56 +0000)]
Pull suppression of "error in read client cert A" from 1.1.x

16 years ago Free "fake" on error.
aland [Tue, 15 May 2007 09:53:24 +0000 (09:53 +0000)]
Free "fake" on error.

This fixes Coverity bug #43

16 years ago Free "fake" on parse error.
aland [Tue, 15 May 2007 09:52:38 +0000 (09:52 +0000)]
Free "fake" on parse error.

This fixes Coverity bug #44

16 years ago Free "fake" on parse error.
aland [Tue, 15 May 2007 09:52:13 +0000 (09:52 +0000)]
Free "fake" on parse error.

This fixes Coverity bug #45

16 years ago Delete trailing whitespace.
nbk [Mon, 14 May 2007 22:26:57 +0000 (22:26 +0000)]
Delete trailing whitespace.

16 years ago Add new load balancing method "client-port-balance"
aland [Mon, 14 May 2007 11:17:32 +0000 (11:17 +0000)]
Add new load balancing method "client-port-balance"

This method should be removed when we have state tracking of EAP
proxies in a module

16 years ago In preparation for 2.0-pre0
aland [Mon, 14 May 2007 09:56:57 +0000 (09:56 +0000)]
In preparation for 2.0-pre0

16 years ago Update copyright dates
aland [Mon, 14 May 2007 09:43:44 +0000 (09:43 +0000)]
Update copyright dates

16 years ago Use "currently_outstanding" metric for load-balance. i.e. we choose
aland [Mon, 14 May 2007 09:42:51 +0000 (09:42 +0000)]
Use "currently_outstanding" metric for load-balance.  i.e. we choose
the home server with the lowest "currently_outstanding" number.
If there are multiple home servers with the same number, randomly
choose among them.

This means that when a home server is dead and doesn't respond,
the requests will immediately be load-balanced to any live servers

16 years ago Made language more consistent.
aland [Mon, 14 May 2007 07:54:58 +0000 (07:54 +0000)]
Made language more consistent.

When a home server first responds, decrement the
"currently_outstanding" counter.  This counter tracks the requests
being processed by the home server, NOT the number of retransmits

16 years agoAdd eDirectory Token / NMAS support thanks to Peter Lambrechtsen and Vinayak Hegde...
pnixon [Sun, 13 May 2007 21:41:42 +0000 (21:41 +0000)]
Add eDirectory Token / NMAS support thanks to Peter Lambrechtsen and Vinayak Hegde from Novell

17 years ago Use RTT && load_factor to prevent detail file reading from
aland [Fri, 11 May 2007 09:34:00 +0000 (09:34 +0000)]
Use RTT && load_factor to prevent detail file reading from
overloading the system.

17 years ago Use strncasecmp, not strcasecmp
aland [Fri, 11 May 2007 08:58:19 +0000 (08:58 +0000)]
Use strncasecmp, not strcasecmp

17 years ago For old-style realms, make pools by realm name, not server name
aland [Fri, 11 May 2007 08:49:31 +0000 (08:49 +0000)]
For old-style realms, make pools by realm name, not server name

17 years ago Cleaned up debug messages.
aland [Fri, 11 May 2007 08:39:57 +0000 (08:39 +0000)]
Cleaned up debug messages.

Old-style "accthost" goes into acct_pool, not auth_pool

17 years ago Now that we have the "self signal" function, there's no need
aland [Thu, 10 May 2007 08:17:05 +0000 (08:17 +0000)]
Now that we have the "self signal" function, there's no need
to block signals in the child threads

17 years agoFixed small typo in dict
pnixon [Wed, 9 May 2007 15:18:53 +0000 (15:18 +0000)]
Fixed small typo in dict

17 years ago Don't try to install older SQL configs. They've been moved
aland [Wed, 9 May 2007 13:54:42 +0000 (13:54 +0000)]
Don't try to install older SQL configs.  They've been moved
to the "sql" directory

17 years ago Re-parent the SNMP MIBs to use our own OID, rather than gnome's
aland [Wed, 9 May 2007 13:41:35 +0000 (13:41 +0000)]
Re-parent the SNMP MIBs to use our own OID, rather than gnome's
OID.  Gnome also seems to be using 3317 rather than 3319, which
is what IANA says was assigned to them.

17 years ago struct timeval->tv_sec may not be time_t on MAC OS, 64-bit.
aland [Wed, 9 May 2007 13:16:00 +0000 (13:16 +0000)]
struct timeval->tv_sec may not be time_t on MAC OS, 64-bit.
i.e. struct timeval->tv_sec is 64-bit, and localtime_t() etc
take a 32-bit pointer.

If we need to remove "request->timestamp" in the future, we can
update the calls to localtime_r(), etc. to use an intermediate
variable, to avoid 32/64-bit issues.

17 years ago Initialize timestamp from received
aland [Wed, 9 May 2007 13:09:21 +0000 (13:09 +0000)]
Initialize timestamp from received

17 years ago print out attributes in a more standard method
aland [Wed, 9 May 2007 12:22:46 +0000 (12:22 +0000)]
print out attributes in a more standard method

17 years ago We're copying ranges of bytes fed to us from a regex parse.
aland [Tue, 8 May 2007 14:00:06 +0000 (14:00 +0000)]
We're copying ranges of bytes fed to us from a regex parse.
We need to use memcpy, not strlcpy.

17 years agoSplit queries into dialect specific files and add mysql support
pnixon [Tue, 8 May 2007 07:00:35 +0000 (07:00 +0000)]
Split queries into dialect specific files and add mysql support

17 years ago use new signal stuff
aland [Mon, 7 May 2007 17:31:25 +0000 (17:31 +0000)]
use new signal stuff

17 years ago Be more forgiving about corner cases
aland [Fri, 4 May 2007 13:00:15 +0000 (13:00 +0000)]
Be more forgiving about corner cases

17 years ago When adding a non-detail REQUEST to the queue, mark detail
aland [Fri, 4 May 2007 12:43:51 +0000 (12:43 +0000)]
When adding a non-detail REQUEST to the queue, mark detail
reading as not possible.

When a thread finishes a request, AND the queues are empty,
mark detail reading as possible.

17 years ago Cleanup up detail file handling a little. Fixed a memory
aland [Fri, 4 May 2007 12:42:38 +0000 (12:42 +0000)]
Cleanup up detail file handling a little.  Fixed a memory
leak (how did that get in again?).  It seems to work...

17 years ago Do more initialization
aland [Fri, 4 May 2007 11:57:08 +0000 (11:57 +0000)]
Do more initialization

17 years ago Added a self-pipe as per Emile's ideas at:
aland [Fri, 4 May 2007 09:18:08 +0000 (09:18 +0000)]
Added a self-pipe as per Emile's ideas at:

http://www.xs4all.nl/~evbergen/unix-signals.html

We don't need to handle more than 2-3 signals, so it all fits
into one byte.

Also added "detail" flag, so we can later add feedback from the
child threads.  If there are no queued requests, AND there's at
least one thread waiting for something to do, THEN it's OK to read
from the detail file.

17 years ago more sanity checks, and clarify the code
aland [Fri, 4 May 2007 09:06:15 +0000 (09:06 +0000)]
more sanity checks, and clarify the code

17 years ago Suppress writes to the detail file if the request was read from
aland [Fri, 4 May 2007 08:18:13 +0000 (08:18 +0000)]
Suppress writes to the detail file if the request was read from
a detail file.

In post-proxy, if there's no proxy reply, we must be in a
Post-Proxy-Type = Fail section, so run the accounting section

17 years ago Re-arrange parsing order so that home servers aren't nested
aland [Thu, 3 May 2007 12:47:38 +0000 (12:47 +0000)]
Re-arrange parsing order so that home servers aren't nested
in server pools, and server pools aren't nested in realms.
This makes debugging output easier to read.

17 years ago Copy outer src/dst IP/port to inner tunnel, so Packet-Src-IP-Address
aland [Thu, 3 May 2007 09:32:12 +0000 (09:32 +0000)]
Copy outer src/dst IP/port to inner tunnel, so Packet-Src-IP-Address
etc. can work

17 years ago Make "-c" work
aland [Thu, 3 May 2007 09:31:38 +0000 (09:31 +0000)]
Make "-c" work

17 years ago Add section start/stop debug output.
aland [Thu, 3 May 2007 09:17:31 +0000 (09:17 +0000)]
Add section start/stop debug output.

17 years ago Standardized format for debugging output, after a few trials
aland [Thu, 3 May 2007 09:03:16 +0000 (09:03 +0000)]
Standardized format for debugging output, after a few trials
of different methods.  The new output is cleaner, less noisy,
and it's more obvious what's going on.

17 years ago More readable debug output
aland [Thu, 3 May 2007 08:29:27 +0000 (08:29 +0000)]
More readable debug output

17 years ago Reformatted debugging output to make it easier to read.
aland [Thu, 3 May 2007 08:02:04 +0000 (08:02 +0000)]
Reformatted debugging output to make it easier to read.

17 years ago Reformatted debug output to make it easier to read
aland [Thu, 3 May 2007 08:01:38 +0000 (08:01 +0000)]
Reformatted debug output to make it easier to read

17 years ago Don't complain about no "known good" passwords for EAP-TLS, TTLS,
aland [Wed, 2 May 2007 13:32:36 +0000 (13:32 +0000)]
Don't complain about no "known good" passwords for EAP-TLS, TTLS,
and PEAP.

17 years ago Add more documentation to the LDAP module.
aland [Wed, 2 May 2007 13:25:42 +0000 (13:25 +0000)]
Add more documentation to the LDAP module.

Note "ok = return" for EAP, to avoid the round trips of TTLS and
PEAP.

17 years ago In the authorize stage, return OK if we see TTLS or PEAP, which
aland [Wed, 2 May 2007 13:19:01 +0000 (13:19 +0000)]
In the authorize stage, return OK if we see TTLS or PEAP, which
means that the administrator can use configurable failover to skip
whole chunks of LDAP lookups, etc. if the outer tunnel setup
is going on

17 years ago updated documentation
aland [Mon, 30 Apr 2007 07:55:09 +0000 (07:55 +0000)]
updated documentation

17 years ago Discard packets from unknown clients
aland [Mon, 30 Apr 2007 07:49:37 +0000 (07:49 +0000)]
Discard packets from unknown clients

17 years ago New function to discard a RADIUS packet.
aland [Mon, 30 Apr 2007 07:45:08 +0000 (07:45 +0000)]
New function to discard a RADIUS packet.

17 years ago Switch over "code", not "packet->code"
aland [Thu, 26 Apr 2007 13:46:30 +0000 (13:46 +0000)]
Switch over "code", not "packet->code"

17 years ago Fixed typo
aland [Thu, 26 Apr 2007 07:16:13 +0000 (07:16 +0000)]
Fixed typo

17 years ago Forgot to include this earlier...
aland [Wed, 25 Apr 2007 14:19:26 +0000 (14:19 +0000)]
Forgot to include this earlier...

17 years ago Remember to install the bootstrap file, too
aland [Wed, 25 Apr 2007 13:25:30 +0000 (13:25 +0000)]
Remember to install the bootstrap file, too

17 years ago Corrected typos
aland [Wed, 25 Apr 2007 13:06:20 +0000 (13:06 +0000)]
Corrected typos

17 years ago Note new method
aland [Wed, 25 Apr 2007 10:06:56 +0000 (10:06 +0000)]
Note new method

17 years ago Added "bootstrap" script for creating initial certificates
aland [Wed, 25 Apr 2007 09:54:20 +0000 (09:54 +0000)]
Added "bootstrap" script for creating initial certificates

Added "make_cert_command" to EAP-TLS.  Have EAP-TLS run the
"make_cert_command" if in debugging mode, AND there's no server
certificate.

Updated the README to talk about this.

Updated eap.conf to enable tls, ttls, and peap by default.

17 years ago Don't call radius_xlat if there's no request pointer
aland [Wed, 25 Apr 2007 09:13:28 +0000 (09:13 +0000)]
Don't call radius_xlat if there's no request pointer

17 years ago If the server is built without OpenSSL, do not load EAP types
aland [Wed, 25 Apr 2007 09:04:00 +0000 (09:04 +0000)]
If the server is built without OpenSSL, do not load EAP types
requiring OpenSSL, even if they are configured in eap.conf.

This allows more magic.

17 years ago Note CSR stuff
aland [Wed, 25 Apr 2007 08:01:45 +0000 (08:01 +0000)]
Note CSR stuff

17 years ago Added better dependencies
aland [Wed, 25 Apr 2007 07:54:29 +0000 (07:54 +0000)]
Added better dependencies

17 years ago Qualify "make distclean" so that it's almost impossible for
aland [Tue, 24 Apr 2007 15:52:44 +0000 (15:52 +0000)]
Qualify "make distclean" so that it's almost impossible for
admins to accidentally delete their CA and server certs.

17 years ago These horrible things are no longer needed
aland [Tue, 24 Apr 2007 15:35:51 +0000 (15:35 +0000)]
These horrible things are no longer needed

17 years ago Install the new certificate scripts, not the old ones
aland [Tue, 24 Apr 2007 15:35:12 +0000 (15:35 +0000)]
Install the new certificate scripts, not the old ones

17 years ago Noted new, sane, method to create certificates
aland [Tue, 24 Apr 2007 15:31:05 +0000 (15:31 +0000)]
Noted new, sane, method to create certificates

17 years ago Deleted old certificates, and added new OpenSSL configuration
aland [Tue, 24 Apr 2007 15:30:05 +0000 (15:30 +0000)]
Deleted old certificates, and added new OpenSSL configuration
files and Makefile to create certificates via a sane method.

17 years ago Run Status-Server packets through Autz-Type or Acct-Type of
aland [Tue, 24 Apr 2007 09:20:41 +0000 (09:20 +0000)]
Run Status-Server packets through Autz-Type or Acct-Type of
Status-Server.  Then, depending on the result (OK/fail), either
respond to the Status-Server request, or suppress the response.

This should make Peter Nixon happy. :)

17 years ago Suppress responses to Status-Server if there's no response
aland [Tue, 24 Apr 2007 09:18:58 +0000 (09:18 +0000)]
Suppress responses to Status-Server if there's no response
configured

17 years ago Added configurable timeouts specifically for ping checks.
aland [Tue, 24 Apr 2007 08:52:32 +0000 (08:52 +0000)]
Added configurable timeouts specifically for ping checks.

17 years ago Rename "ping" check to "status" check. This means existing
aland [Tue, 24 Apr 2007 07:52:01 +0000 (07:52 +0000)]
Rename "ping" check to "status" check.  This means existing
configurations break.  However, given discussion on the users list,
calling the packets "pings" will confuse a certain segment of
the population in ways that are difficult to correct politely.

17 years ago added functions to peek at the head of the queue, and to obtain
aland [Tue, 24 Apr 2007 07:33:09 +0000 (07:33 +0000)]
added functions to peek at the head of the queue, and to obtain
the number of elements

17 years ago Now that we're handling queues by priority, remember to remove
aland [Mon, 23 Apr 2007 13:51:46 +0000 (13:51 +0000)]
Now that we're handling queues by priority, remember to remove
old requests from queues we may not have serviced in a while.

17 years ago Remove assertion that there's no child thread. We can add it back
aland [Mon, 23 Apr 2007 13:26:45 +0000 (13:26 +0000)]
Remove assertion that there's no child thread.  We can add it back
again later, once we audit the rest of the code.

17 years ago Remove assertion that there's no child thread processing this
aland [Mon, 23 Apr 2007 13:25:39 +0000 (13:25 +0000)]
Remove assertion that there's no child thread processing this
request.  The design of event.c makes it difficult to track

17 years ago Keep array in sync with defs in radiusd.h
aland [Mon, 23 Apr 2007 13:10:51 +0000 (13:10 +0000)]
Keep array in sync with defs in radiusd.h

17 years ago Now that we have priorities for thread queues, push the
aland [Mon, 23 Apr 2007 13:03:20 +0000 (13:03 +0000)]
Now that we have priorities for thread queues, push the
post-proxy-type "fail" entry into the highest priority queue, so
that it's dealt with as soon as possible, but in a child thread

17 years ago Re-ordered RAD_LISTEN_TYPE by priority, and added "priority"
aland [Mon, 23 Apr 2007 12:29:33 +0000 (12:29 +0000)]
Re-ordered RAD_LISTEN_TYPE by priority, and added "priority"
field to the REQUEST.

Updated threads to have RAD_LISTEN_TYPE_MAX fifo's, and to insert
REQUEST's into the appropriate fifo.  Then, when pulling requests
from the queue, we pull from high priority to low, and starve
any lower priority queues.  This should make the server more robust
in high load situations.

i.e. we handle responses from home servers first, then authentication
requests, then accounting requests (because the NAS will retransmit
them), then the "detail" file, and finally SNMP.

We haven't integrated SNMP sockets into this scheme yet, but the
idea will work.  We also need to update the code so that it doesn't
even look at a socket if there are pending requests.

i.e. if all the threads are busy, AND fifo N has entries, then do
NOT look at sockets associated with priorities N+1 and following.

17 years ago Use new radius_paircreate() function.
aland [Mon, 23 Apr 2007 12:03:40 +0000 (12:03 +0000)]
Use new radius_paircreate() function.

Fix Novell code that wrote to vp_strvalue for integer type

If we've added a "known good" password to config items, then
DO NOT SET AUTH-TYPE = LDAP.  It's confusing too many peopl

17 years ago Note new Post-Proxy-Type Fail section.
aland [Mon, 23 Apr 2007 11:31:12 +0000 (11:31 +0000)]
Note new Post-Proxy-Type Fail section.

17 years ago corrected typos
aland [Mon, 23 Apr 2007 11:28:30 +0000 (11:28 +0000)]
corrected typos

17 years ago Clean up post-proxy-type fail handlers. They make more sense now.
aland [Mon, 23 Apr 2007 11:25:07 +0000 (11:25 +0000)]
Clean up post-proxy-type fail handlers.  They make more sense now.

17 years ago New function post_proxy_fail(), which runs the request through
aland [Mon, 23 Apr 2007 10:08:50 +0000 (10:08 +0000)]
New function post_proxy_fail(), which runs the request through
a Post-Proxy-Type = Fail.

Wrapper function proxy_proxy_fail_handler(), which does some other
things, (setup, re-does wait_a_bit, etc).  Once we have multiple
queues for the threads, we can push the post-proxy handler onto
the thread queue, as it may do DB calls, which we should avoid
in the main server.

This has also cleaned up some corner cases, were the server could
respond without copying Proxy-State from the request, if the
proxying failed.  We now run the REQUEST through standard functions
for everything...

17 years ago Moved 'hash' to before 'vector', as it was right next to vps.
aland [Mon, 23 Apr 2007 08:46:52 +0000 (08:46 +0000)]
Moved 'hash' to before 'vector', as it was right next to vps.
hash is read in the main thread, and vps is written to in child
threads.  Having them next to each other results in cache line
bouncing.  Moving it means that there won't be cache line
bouncing, for a small performance increase

17 years ago We don't need to hash the ID twice
aland [Mon, 23 Apr 2007 08:44:55 +0000 (08:44 +0000)]
We don't need to hash the ID twice

17 years ago Move SNMP increments to earlier in the request handling, to make
aland [Mon, 23 Apr 2007 08:25:42 +0000 (08:25 +0000)]
Move SNMP increments to earlier in the request handling, to make
the counters available sooner rather than later

17 years ago Start removing request->timestamp, now that we have
aland [Mon, 23 Apr 2007 08:10:28 +0000 (08:10 +0000)]
Start removing request->timestamp, now that we have
request->received

17 years ago Added RADCLIENT* pointer to the REQUEST structure. It makes some
aland [Mon, 23 Apr 2007 08:09:14 +0000 (08:09 +0000)]
Added RADCLIENT* pointer to the REQUEST structure.  It makes some
things easier, and will let us know on HUP which request is using
what client

17 years ago Use new radius_paircreate() function.
aland [Fri, 20 Apr 2007 14:31:29 +0000 (14:31 +0000)]
Use new radius_paircreate() function.

also cleaned up wrong code in Novell's eDir solution, that
put strings into vp_strvalue for integer types

17 years ago New radius_paircreate() function that takes a REQUEST* and a
aland [Fri, 20 Apr 2007 14:30:11 +0000 (14:30 +0000)]
New radius_paircreate() function that takes a REQUEST* and a
VALUE_PAIR**, along with the attr & type of paircreate().

It creates the pair (or exits if it can't, because it's OOM).
then adds the pair to the VP**.

This ends up removing a fair amount of code in the modules &&
server core, that did:

vp = pairmake()
if (!vp) {
oom
...
}

pairadd()