freeradius.git
13 years agoPrint out DHCP attributes sent / received master origin/HEAD origin/master
Alan T. DeKok [Sat, 29 May 2010 09:34:57 +0000 (11:34 +0200)]
Print out DHCP attributes sent / received

13 years agoFix endless loop when there are multiple DHCP options
Alan T. DeKok [Sat, 29 May 2010 09:26:56 +0000 (11:26 +0200)]
Fix endless loop when there are multiple DHCP options

13 years agoSet line buf on stdout/err when logs go there
Alan T. DeKok [Mon, 24 May 2010 18:20:06 +0000 (20:20 +0200)]
Set line buf on stdout/err when logs go there

This makes log messages appear more quickly.

13 years agoIf an integer is surrounded by whitespace, it's still an integer
Alan T. DeKok [Mon, 24 May 2010 05:35:31 +0000 (07:35 +0200)]
If an integer is surrounded by whitespace, it's still an integer

13 years agoFix template documentation
Alan T. DeKok [Thu, 20 May 2010 15:40:32 +0000 (17:40 +0200)]
Fix template documentation

13 years agoNo longer needed
Alan T. DeKok [Thu, 20 May 2010 13:25:51 +0000 (15:25 +0200)]
No longer needed

13 years agoDo cert configuration stuff
Alan T. DeKok [Thu, 20 May 2010 13:25:22 +0000 (15:25 +0200)]
Do cert configuration stuff

Taken from Redhat

13 years agoNote module return codes
Alan T. DeKok [Wed, 19 May 2010 14:27:04 +0000 (16:27 +0200)]
Note module return codes

13 years agoSource files shouldn't have the executable bit set.
Alan T. DeKok [Wed, 19 May 2010 13:14:53 +0000 (15:14 +0200)]
Source files shouldn't have the executable bit set.

13 years agoAs supplied by RedHat.
Alan T. DeKok [Wed, 19 May 2010 13:08:16 +0000 (15:08 +0200)]
As supplied by RedHat.

These files are direct copies of the upstream RedHat files, and should
work better on most RedHat systems

13 years agoPrint out section name for empty sections
Alan T. DeKok [Wed, 19 May 2010 12:55:26 +0000 (14:55 +0200)]
Print out section name for empty sections

13 years agoRemove some warnings
Peter Nixon [Tue, 18 May 2010 18:00:57 +0000 (21:00 +0300)]
Remove some warnings

13 years agoConvert some more docs to RST
Peter Nixon [Tue, 18 May 2010 16:55:28 +0000 (19:55 +0300)]
Convert some more docs to RST

13 years agoCheckin some initial work on RSTifying our documentation using sphinx
Peter Nixon [Tue, 18 May 2010 12:17:29 +0000 (15:17 +0300)]
Checkin some initial work on RSTifying our documentation using sphinx
The Makefile needs fixing..

13 years agoNote example of SQL in post-auth reject, too
Alan T. DeKok [Fri, 7 May 2010 09:18:14 +0000 (11:18 +0200)]
Note example of SQL in post-auth reject, too

13 years agoAdded server field to NAS table, and updated docs to match
Alan T. DeKok [Fri, 7 May 2010 08:07:25 +0000 (10:07 +0200)]
Added server field to NAS table, and updated docs to match

13 years agoMade connected / disconnected messages into informational
Alan T. DeKok [Fri, 7 May 2010 07:34:20 +0000 (09:34 +0200)]
Made connected / disconnected messages into informational

If the module complains when it can't connect, it should also make
a not when it *can* connect, too.

13 years agoChange %{Acct-}*x -> %{%{Acct-}:-0}*x
Alan T. DeKok [Fri, 7 May 2010 07:18:21 +0000 (09:18 +0200)]
Change %{Acct-}*x -> %{%{Acct-}:-0}*x

This allows the calculation to proceed correctly when the attribute
doesn't exist.  This change was made for other databases, and seems
to have been missed for Oracle

13 years agoDon't use msqlippool by default
Alan T. DeKok [Thu, 6 May 2010 12:41:51 +0000 (14:41 +0200)]
Don't use msqlippool by default

13 years agoEnable core dumps after suid_down
Alan T. DeKok [Tue, 4 May 2010 12:36:42 +0000 (14:36 +0200)]
Enable core dumps after suid_down

13 years agoTreat bad records as EOF.
Alan T. DeKok [Tue, 4 May 2010 09:30:50 +0000 (11:30 +0200)]
Treat bad records as EOF.

This helps when the disk is full, and rlm_detail writes a partial record.

14 years agoNote Samba bug
Alan T. DeKok [Fri, 30 Apr 2010 07:58:13 +0000 (09:58 +0200)]
Note Samba bug

14 years agoUse pairadd() properly.
Alan T. DeKok [Fri, 30 Apr 2010 05:46:30 +0000 (07:46 +0200)]
Use pairadd() properly.

14 years agoDocument more proxy functionality
Alan T. DeKok [Thu, 29 Apr 2010 08:26:47 +0000 (10:26 +0200)]
Document more proxy functionality

If the NAS doesn't retransmit, we don't either.

14 years agoMore debugging messages
Alan T. DeKok [Thu, 29 Apr 2010 08:25:47 +0000 (10:25 +0200)]
More debugging messages

So that the user knows when a socket is closed due to lifetime or max_queries

14 years agoRemoved unnecessary fflush()
Alan T. DeKok [Thu, 29 Apr 2010 08:25:12 +0000 (10:25 +0200)]
Removed unnecessary fflush()

14 years agoIgnore autoconf files
Alan T. DeKok [Thu, 29 Apr 2010 08:16:59 +0000 (10:16 +0200)]
Ignore autoconf files

Hopefully for 2.2.0, we can start getting rid of that horrible
system

14 years agoAdd sub-options to Option 82
Alan T. DeKok [Wed, 28 Apr 2010 14:52:05 +0000 (16:52 +0200)]
Add sub-options to Option 82

14 years agoLarge code cleanups.
Alan T. DeKok [Wed, 28 Apr 2010 14:50:13 +0000 (16:50 +0200)]
Large code cleanups.

Fix error messages (no fprintf)
Enable option 82 sub-options
Allow it to originate DHCP packets, too

14 years agoMake dhcp_socket_t structure fall in line with listen_socket_t
Alan T. DeKok [Wed, 28 Apr 2010 11:47:35 +0000 (13:47 +0200)]
Make dhcp_socket_t structure fall in line with listen_socket_t

14 years agoFixed typo
Alan T. DeKok [Wed, 28 Apr 2010 11:39:46 +0000 (13:39 +0200)]
Fixed typo

14 years agoUse readline only if we have the header files
Alan T. DeKok [Wed, 28 Apr 2010 09:01:14 +0000 (11:01 +0200)]
Use readline only if we have the header files

Otherwise people install libreadline, and then the compile stage
fails because there's no header files

14 years agoFix error message for people who don't understand it
Alan T. DeKok [Tue, 27 Apr 2010 16:53:17 +0000 (18:53 +0200)]
Fix error message for people who don't understand it

14 years agoCorrected documentation
Alan T. DeKok [Tue, 27 Apr 2010 09:02:54 +0000 (11:02 +0200)]
Corrected documentation

14 years agoTry to fix link issues, as posted to the list
Alan T. DeKok [Tue, 27 Apr 2010 07:47:38 +0000 (09:47 +0200)]
Try to fix link issues, as posted to the list

14 years agoUse rebind_proc only if args==3
Alan T. DeKok [Tue, 27 Apr 2010 07:46:37 +0000 (09:46 +0200)]
Use  rebind_proc only if args==3

This means that systems which have args != 3 will still build

14 years agoWork around for bug #35.
Alan T. DeKok [Mon, 26 Apr 2010 15:24:41 +0000 (17:24 +0200)]
Work around for bug #35.

The packet is apparently getting freed when the request structure is still
in the list.  Since it's hard to tell when / why this is happening,
the short-term fix is to work around it.

It's better to leak memory slowly than to crash quickly.

14 years agoRemove from proxy hash after packet has been verified
Alan T. DeKok [Mon, 26 Apr 2010 17:56:54 +0000 (19:56 +0200)]
Remove from proxy hash after packet has been verified

This avoids some esoteric conditions where an attacker who can monitor
the RADIUS packet stream could cause the server to sometimes forget
about packets that it proxied.

Also cleaned up other issues related to counters (home/listener) when
proxying.

14 years agoAdded prototype
Alan T. DeKok [Mon, 26 Apr 2010 13:38:30 +0000 (15:38 +0200)]
Added prototype

14 years agoMore WITH_PROXY fixes
Alan T. DeKok [Mon, 26 Apr 2010 13:32:29 +0000 (15:32 +0200)]
More WITH_PROXY fixes

14 years agoAttributes for "cisco vsa hack" don't need to be string
Alan T. DeKok [Wed, 21 Apr 2010 06:57:29 +0000 (08:57 +0200)]
Attributes for "cisco vsa hack" don't need to be string

14 years agoBetter error messages for missing brace
Alan T. DeKok [Wed, 21 Apr 2010 06:56:54 +0000 (08:56 +0200)]
Better error messages for missing brace

14 years agoAllow to build without pthreads
Alan T. DeKok [Wed, 21 Apr 2010 06:55:00 +0000 (08:55 +0200)]
Allow to build without pthreads

14 years agoFix build error
Alan T. DeKok [Mon, 26 Apr 2010 13:57:40 +0000 (15:57 +0200)]
Fix build error

14 years agoPrint out helpful error if a realm regex can't be parsed
Alan T. DeKok [Wed, 21 Apr 2010 06:52:56 +0000 (08:52 +0200)]
Print out helpful error if a realm regex can't be parsed

14 years agoPrefer IPv4.
Alan T. DeKok [Wed, 21 Apr 2010 06:52:21 +0000 (08:52 +0200)]
Prefer IPv4.

14 years agoAdded WITH_PROXY to allow it to build without proxying
Alan T. DeKok [Wed, 21 Apr 2010 06:51:58 +0000 (08:51 +0200)]
Added WITH_PROXY to allow it to build without proxying

14 years agoDon't block when doing 'exec wait', and reading from pipe.
Alan T. DeKok [Fri, 16 Apr 2010 14:12:01 +0000 (16:12 +0200)]
Don't block when doing 'exec wait', and reading from pipe.

If the child is slow, then reading from the pipe will block until
the child exits.  This will happen even if we intend later to wait
only 10 seconds for the child pid.

The solution is to call select() on the pipe.  After 10 seconds,
if no progress has been made: kill -TERM the child, close the pipe,
and clean up the child PID.

14 years agoappend tunneled reply, rather than moving it
Alan T. DeKok [Wed, 14 Apr 2010 03:00:39 +0000 (05:00 +0200)]
append tunneled reply, rather than moving it

This means that the operators are ignored, and any proxied
packet (with operators '=' for multiple VSAs of the same name) will
get handled properly.

14 years agoFix node comparison on delete
Alan T. DeKok [Wed, 14 Apr 2010 02:59:26 +0000 (04:59 +0200)]
Fix node comparison on delete

This could be the cause of bug #35.

14 years agoFixed typo. This should help divorce CoA from normal packets.
Alan T. DeKok [Tue, 13 Apr 2010 13:16:10 +0000 (15:16 +0200)]
Fixed typo.  This should help divorce CoA from normal packets.

The previous fix worked, but this one is the real source of the bug

14 years agoPrint out hex for invalid data in PEAP tunnel.
Alan T. DeKok [Mon, 12 Apr 2010 09:36:52 +0000 (11:36 +0200)]
Print out hex for invalid data in PEAP tunnel.

This helps debug issues.

Also change the "had sent TLV failure" message to a LONG set of
instructions for people who can't be bothered reading the debug output.

14 years agoMake request->number unsigned
Alan T. DeKok [Fri, 9 Apr 2010 14:53:03 +0000 (16:53 +0200)]
Make request->number unsigned

So that we don't print negative numbers

14 years agoEnsure correct build order
Alan T. DeKok [Fri, 9 Apr 2010 10:17:36 +0000 (12:17 +0200)]
Ensure correct build order

include -> lib -> modules -> main

14 years agoMake subdirs before modules
Alan T. DeKok [Thu, 8 Apr 2010 07:59:55 +0000 (09:59 +0200)]
Make subdirs before modules

Fixes "cannot build from clean directory" problem after switching to
the new method of using "make" for recursing into subdirs

14 years agoAdd missing 'break' to escape '%' properly.
Alan T. DeKok [Tue, 6 Apr 2010 23:59:57 +0000 (01:59 +0200)]
Add missing 'break' to escape '%' properly.

14 years agoOn DHCP Discover fail, don't send a NAK
Alan T. DeKok [Tue, 6 Apr 2010 23:58:00 +0000 (01:58 +0200)]
On DHCP Discover fail, don't send a NAK

Instead, just don't respond

14 years agoCatch corner case of update disconnect in post-auth
Alan T. DeKok [Wed, 31 Mar 2010 14:19:28 +0000 (16:19 +0200)]
Catch corner case of update disconnect in post-auth

If we proxy packets, we don't want to send disconnect, too

14 years agoFixed typo
Alan T. DeKok [Wed, 31 Mar 2010 13:33:19 +0000 (15:33 +0200)]
Fixed typo

14 years agoCorrect realm regex examples, and creation of REALM for them
Alan T. DeKok [Wed, 31 Mar 2010 13:06:52 +0000 (15:06 +0200)]
Correct realm regex examples, and creation of REALM for them

The old examples were wrong.  The old code created the Realm
attribute with value of the regex... rather than the actual realm name.

Closes bug #40

14 years agoAllow the "server" field to be blank
Alan T. DeKok [Wed, 31 Mar 2010 09:32:38 +0000 (11:32 +0200)]
Allow the "server" field to be blank

People run into "" != NULL

14 years agoMade 'reconfig' target use PHONY subdirectories, too
Alan T. DeKok [Wed, 31 Mar 2010 09:25:08 +0000 (11:25 +0200)]
Made 'reconfig' target use PHONY subdirectories, too

And added reconfig targets all over the place.  This means that
we can do "make reconfig" from (almost) anywhere, and have it work.

14 years agoMade 'reconfig' target use PHONY subdirectories, too
Alan T. DeKok [Wed, 31 Mar 2010 09:25:08 +0000 (11:25 +0200)]
Made 'reconfig' target use PHONY subdirectories, too

And added reconfig targets all over the place.  This means that
we can do "make reconfig" from (almost) anywhere, and have it work.

14 years agoMove to using phony targets for subdirectories
Alan T. DeKok [Wed, 31 Mar 2010 08:55:39 +0000 (10:55 +0200)]
Move to using phony targets for subdirectories

14 years agoMinor change to error output for clarity
Alan T. DeKok [Tue, 30 Mar 2010 14:13:03 +0000 (16:13 +0200)]
Minor change to error output for clarity

14 years agoRe-open log file after HUP.
Alan T. DeKok [Tue, 30 Mar 2010 14:12:06 +0000 (16:12 +0200)]
Re-open log file after HUP.

This should have been committed in 6563dac620f, but was missed for some
reason.

14 years agoRevert "= NULL" checks. They should be "IS NULL"
Alan T. DeKok [Tue, 30 Mar 2010 14:06:15 +0000 (16:06 +0200)]
Revert "= NULL" checks.  They should be "IS NULL"

14 years agoMove to using phony targets for subdirectories.
Alan T. DeKok [Tue, 30 Mar 2010 14:04:23 +0000 (16:04 +0200)]
Move to using phony targets for subdirectories.

This removes the explicit shell loop over subdirs, which means that
the main "make" program now tracks all dependencies.  I've also updated
some dependencies to be correct.  Now "make -j 4" will work.

14 years agoCheck for closed sockets.
Alan T. DeKok [Tue, 9 Mar 2010 09:12:01 +0000 (10:12 +0100)]
Check for closed sockets.

This allows the module to continue if the DB suddenly disappears

14 years agoAllow IPv6 to bind to interface with scope.
Alan T. DeKok [Sat, 6 Mar 2010 14:45:08 +0000 (15:45 +0100)]
Allow IPv6 to bind to interface with scope.

A follow-on to the previous patch.

14 years agoAdd IPv6 "scope" for link-local addresses.
Alan T. DeKok [Sat, 6 Mar 2010 13:26:27 +0000 (14:26 +0100)]
Add IPv6 "scope" for link-local addresses.

Added to fr_ipaddr_t.
fr_ipaddr_cmp(), fr_sockaddr2ipaddr(), fr_ipaddr2sockaddr().

Also made ip_hton() call fr_sockaddr2ipaddr() to prevent code duplication.

14 years agoCheck for AF_INET6, not HAVE_AF_INET6
Alan T. DeKok [Sat, 6 Mar 2010 11:40:23 +0000 (12:40 +0100)]
Check for AF_INET6, not HAVE_AF_INET6

HAVE_AF_INET6 isn't defined, AF_INET6 is.

14 years agoWork around implementation-dependent shift results
Alan T. DeKok [Sat, 6 Mar 2010 11:13:54 +0000 (12:13 +0100)]
Work around implementation-dependent shift results

uint32 foo = ~0;

foo <<= 32;

Q: what's foo?
A: undefined.

14 years agoCalculate IPv6 netmask correctly.
Alan T. DeKok [Sat, 6 Mar 2010 10:03:33 +0000 (11:03 +0100)]
Calculate IPv6 netmask correctly.

Closes bug #69

14 years agoReceive CoA packets when they have been separated from parents
Alan T. DeKok [Sat, 6 Mar 2010 07:48:06 +0000 (08:48 +0100)]
Receive CoA packets when they have been separated from parents

Otherwise, the code thinks that there is a proxy reply WITHOUT
an original reply..

There's still likely a bug, as the CoA request->reply is built BEFORE
the original->reply.  The post-proxy CoA work should very likely have
complete access to the original reply packet type

14 years agoClean up log file handling. Fixes bug #63
Alan T. DeKok [Fri, 26 Feb 2010 10:11:02 +0000 (11:11 +0100)]
Clean up log file handling.  Fixes bug #63

We now open the log file from the option parsing (-l file)
OR in mainconfig.c.  That way, the code in log.c can assume that
there is ALWAYS a log file, and it doesn't need to open one.  This
simplifies log.c substantially.

We also moved the syslog "openlog" code from log.c to mainconfig.c
This again makes it simpler.

On HUP, the hup_mainconfig() function takes care of re-opening the
log file.  This is so that the log.c functions don't have to do it.

14 years agoAs posted to the list
Alan T. DeKok [Fri, 26 Feb 2010 09:31:59 +0000 (10:31 +0100)]
As posted to the list

14 years agoSwitch default for acct realms to "no_response_fail"
Alan T. DeKok [Tue, 16 Feb 2010 16:47:27 +0000 (17:47 +0100)]
Switch default for acct realms to "no_response_fail"

Since accounting packets aren't re-tried, failing one packet over
from one server to another isn't a good idea.

14 years agoAdded sample CoA server
Alan T. DeKok [Thu, 11 Feb 2010 11:44:24 +0000 (12:44 +0100)]
Added sample CoA server

14 years agoMake it consisent with the example in decoupled-accounting
Alan T. DeKok [Thu, 11 Feb 2010 09:38:20 +0000 (10:38 +0100)]
Make it consisent with the example in decoupled-accounting

14 years agoAs posted to the list
Alan T. DeKok [Thu, 11 Feb 2010 09:36:51 +0000 (10:36 +0100)]
As posted to the list

14 years agoRan it through the formatter.
Alan T. DeKok [Thu, 11 Feb 2010 09:36:26 +0000 (10:36 +0100)]
Ran it through the formatter.

14 years agoAdd more information to warning message
Alan T. DeKok [Thu, 11 Feb 2010 09:33:19 +0000 (10:33 +0100)]
Add more information to warning message

Component && module, if a child thread is stuck for a long time.

14 years agoFunction returns no value
Alan T. DeKok [Thu, 11 Feb 2010 09:41:29 +0000 (10:41 +0100)]
Function returns no value

14 years agoQuiet compiler warnings
Alan T. DeKok [Thu, 11 Feb 2010 09:32:20 +0000 (10:32 +0100)]
Quiet compiler warnings

14 years agoDo waitpid() for ALL children, even if there are no threads waiting
Alan T. DeKok [Thu, 11 Feb 2010 09:24:57 +0000 (10:24 +0100)]
Do waitpid() for ALL children, even if there are no threads waiting

i.e. call radius_exec_program() 4 times for each packet, each
with "nowait".  The "reap_children" function is called ONCE per packet,
and was calling waitpid() ONCE if there were no threads waiting
for a child.

This change makes it KEEP waiting until there are no more children
to wait for.

14 years agoFixes to build without TCP
Alan T. DeKok [Thu, 4 Feb 2010 17:09:22 +0000 (18:09 +0100)]
Fixes to build without TCP

14 years agoAdded note on global CA
Alan T. DeKok [Thu, 4 Feb 2010 07:50:37 +0000 (08:50 +0100)]
Added note on global CA

14 years agoMake MS-CHAP call xlat on NT-Hash and LM-Password
Alan T. DeKok [Thu, 4 Feb 2010 07:45:12 +0000 (08:45 +0100)]
Make MS-CHAP call xlat on NT-Hash and LM-Password

This moves the "expand variable" code to the correct place.

14 years agoin pairmake_any(), value may be NULL
Alan T. DeKok [Sat, 23 Jan 2010 09:08:55 +0000 (10:08 +0100)]
in pairmake_any(), value may be NULL

14 years agoAs posted to the list
Alan T. DeKok [Sat, 23 Jan 2010 08:05:21 +0000 (09:05 +0100)]
As posted to the list

14 years agoAdded more 'const', and changed stats to %u
Alan T. DeKok [Fri, 22 Jan 2010 12:40:30 +0000 (13:40 +0100)]
Added more 'const', and changed stats to %u

Some tests showed that the stats went over 2^31... and then they
went negative

14 years agoAdded more 'const'
Alan T. DeKok [Fri, 22 Jan 2010 12:40:16 +0000 (13:40 +0100)]
Added more 'const'

14 years agoSet flag CORRECTLY for resumed session
Alan T. DeKok [Fri, 22 Jan 2010 09:41:46 +0000 (10:41 +0100)]
Set flag CORRECTLY for resumed session

14 years agoAdd statistics for detail listeners, too
Alan T. DeKok [Thu, 21 Jan 2010 10:37:21 +0000 (11:37 +0100)]
Add statistics for detail listeners, too

14 years agoCheck for allocation failure
Alan T. DeKok [Thu, 4 Feb 2010 07:59:53 +0000 (08:59 +0100)]
Check for allocation failure

14 years agoPrint the request number on every log line.
Alan T. DeKok [Thu, 4 Feb 2010 07:57:26 +0000 (08:57 +0100)]
Print the request number on every log line.

14 years agoMore useful errors
Alan T. DeKok [Thu, 4 Feb 2010 07:55:43 +0000 (08:55 +0100)]
More useful errors

track total number of open sockets, and print "too many sockets" if
there are too many

14 years agoProperly account for accounting responses from a home server
Alan T. DeKok [Tue, 5 Jan 2010 11:53:30 +0000 (12:53 +0100)]
Properly account for accounting responses from a home server

14 years agoCorrectly handle large attributes
Alan T. DeKok [Tue, 5 Jan 2010 11:52:00 +0000 (12:52 +0100)]
Correctly handle large attributes