freeradius.git
10 years agoA better fix for checking single-character expansions release_3_0_0_beta1
Alan T. DeKok [Tue, 4 Jun 2013 13:26:26 +0000 (09:26 -0400)]
A better fix for checking single-character expansions

10 years agoMinor cleanup
Alan T. DeKok [Tue, 4 Jun 2013 13:12:33 +0000 (09:12 -0400)]
Minor cleanup

10 years agoMerge pull request #297 from sionescu/wip-fix-postgres-debug-tag
Alan DeKok [Tue, 4 Jun 2013 13:52:33 +0000 (06:52 -0700)]
Merge pull request #297 from sionescu/wip-fix-postgres-debug-tag

Fix module name in debug message

10 years agoFix module name in debug message
Stelian Ionescu [Tue, 4 Jun 2013 13:42:33 +0000 (15:42 +0200)]
Fix module name in debug message

10 years agoRemove rlm_eap2
Arran Cudbard-Bell [Tue, 4 Jun 2013 13:16:02 +0000 (09:16 -0400)]
Remove rlm_eap2

The name confuses people and requires a special build of hostapd to work.

Any required EAP methods should be implemented by the rlm_eap module.

10 years agoInitialise head as NULL
Arran Cudbard-Bell [Tue, 4 Jun 2013 13:05:55 +0000 (09:05 -0400)]
Initialise head as NULL

10 years agoFormatting
Arran Cudbard-Bell [Tue, 4 Jun 2013 13:04:38 +0000 (09:04 -0400)]
Formatting

10 years ago%{...} is allowed, too
Alan T. DeKok [Tue, 4 Jun 2013 12:52:22 +0000 (08:52 -0400)]
%{...} is allowed, too

10 years agovp may be NULL
Alan T. DeKok [Tue, 4 Jun 2013 01:54:01 +0000 (21:54 -0400)]
vp may be NULL

10 years agoAdded more VERIFY
Alan T. DeKok [Mon, 3 Jun 2013 22:11:27 +0000 (18:11 -0400)]
Added more VERIFY

10 years agoInitialize variable before using it.
Alan T. DeKok [Mon, 3 Jun 2013 20:14:34 +0000 (16:14 -0400)]
Initialize variable before using it.

10 years agoUse correct pointer for de-referencing
Alan T. DeKok [Sat, 1 Jun 2013 13:46:43 +0000 (09:46 -0400)]
Use correct pointer for de-referencing

due to a partial conversion to input_item

10 years agoRevert "Remove -rdynamic"
Arran Cudbard-Bell [Fri, 31 May 2013 18:46:40 +0000 (14:46 -0400)]
Revert "Remove -rdynamic"

This reverts commit 516a781627ebb0c063f11ec0636249f76a41b8c7.

10 years agoWe don't need to export CFLAGS
Arran Cudbard-Bell [Fri, 31 May 2013 17:13:53 +0000 (13:13 -0400)]
We don't need to export CFLAGS

10 years agoRemove -rdynamic
Alan T. DeKok [Fri, 31 May 2013 16:49:08 +0000 (12:49 -0400)]
Remove -rdynamic

It may be needed in older systems.  It breaks newer ones.

Backwards compatibiliy?  Who needs that...

10 years agoBetter fix for GCC stupidity
Arran Cudbard-Bell [Fri, 31 May 2013 16:41:17 +0000 (12:41 -0400)]
Better fix for GCC stupidity

10 years agoCheck for -Wdocumentation and -Qunused-arguments ONLY for clang
Alan T. DeKok [Fri, 31 May 2013 13:34:07 +0000 (09:34 -0400)]
Check for -Wdocumentation and -Qunused-arguments ONLY for clang

10 years agoUse correct dependencies when re-building "configure"
Alan T. DeKok [Fri, 31 May 2013 13:22:30 +0000 (09:22 -0400)]
Use correct dependencies when re-building "configure"

10 years agoAdd "skip_duplicate_checks" for detail && tcp listeners
Alan T. DeKok [Fri, 31 May 2013 12:59:35 +0000 (08:59 -0400)]
Add "skip_duplicate_checks" for detail && tcp listeners

10 years agoDocument the "limit" section, and move max_pps there
Alan T. DeKok [Wed, 29 May 2013 19:51:31 +0000 (15:51 -0400)]
Document the "limit" section, and move max_pps there

10 years agoRemove extraneous brackets
Alan T. DeKok [Mon, 27 May 2013 13:15:00 +0000 (09:15 -0400)]
Remove extraneous brackets

10 years agoand just use cflags
Arran Cudbard-Bell [Thu, 30 May 2013 20:06:49 +0000 (16:06 -0400)]
and just use cflags

10 years agoProbably need to pass -Werror for compiler argument checks
Arran Cudbard-Bell [Thu, 30 May 2013 20:05:36 +0000 (16:05 -0400)]
Probably need to pass -Werror for compiler argument checks

10 years ago-Wdocumentation doesn't warn about unrecognised tags
Arran Cudbard-Bell [Thu, 30 May 2013 19:31:11 +0000 (15:31 -0400)]
-Wdocumentation doesn't warn about unrecognised tags

10 years agoFixup doxygen comments to pass new check
Arran Cudbard-Bell [Thu, 30 May 2013 19:21:00 +0000 (15:21 -0400)]
Fixup doxygen comments to pass new check

10 years agoUpdate main autoconf
Arran Cudbard-Bell [Thu, 30 May 2013 19:04:16 +0000 (15:04 -0400)]
Update main autoconf

Better check for -Qunused-arguments

Pass -Wdocumentation if supported by the compiler, this allows clang >= 3.2 to parse the doxygen documentation and emit warnings if it doesn't match the code.

10 years agoNeed more cursors
Arran Cudbard-Bell [Thu, 30 May 2013 17:21:34 +0000 (13:21 -0400)]
Need more cursors

10 years agoAnd one more...
Arran Cudbard-Bell [Thu, 30 May 2013 14:55:24 +0000 (10:55 -0400)]
And one more...

10 years agoFix reference issues hidden by cast
Arran Cudbard-Bell [Thu, 30 May 2013 14:29:27 +0000 (10:29 -0400)]
Fix reference issues hidden by cast

10 years agoMacro
Arran Cudbard-Bell [Wed, 29 May 2013 22:44:37 +0000 (18:44 -0400)]
Macro

10 years agoVERIFY must only be be called on non-NULL pointers
Arran Cudbard-Bell [Wed, 29 May 2013 17:08:49 +0000 (13:08 -0400)]
VERIFY must only be be called on non-NULL pointers

pairfindnext needs its own pointer to work correctly

Fix typo in evaluate.c

10 years agoFix use after free when iterating over pairlists to be freed
Arran Cudbard-Bell [Wed, 29 May 2013 16:05:32 +0000 (12:05 -0400)]
Fix use after free when iterating over pairlists to be freed

10 years agoUse paircursor for iteration where appropriate
Arran Cudbard-Bell [Wed, 29 May 2013 13:51:47 +0000 (09:51 -0400)]
Use paircursor for iteration where appropriate

10 years agoif len==0, buff may be NULL
Alan T. DeKok [Fri, 24 May 2013 14:25:14 +0000 (10:25 -0400)]
if len==0, buff may be NULL

10 years agoThe "opaque" data belongs to handler, not to reply
Alan T. DeKok [Fri, 24 May 2013 13:54:26 +0000 (09:54 -0400)]
The "opaque" data belongs to handler, not to reply

10 years agoAllow forcible empty expansions
Alan T. DeKok [Fri, 24 May 2013 13:48:49 +0000 (09:48 -0400)]
Allow forcible empty expansions

10 years agoMerge pull request #295 from leprechau/master
Arran Cudbard-Bell [Wed, 22 May 2013 23:45:57 +0000 (16:45 -0700)]
Merge pull request #295 from leprechau/master

fix compilation error in rlm_ruby

10 years agofix compilation error
Aaron Hurt [Wed, 22 May 2013 04:48:07 +0000 (23:48 -0500)]
fix compilation error

10 years agoUpdates
Alan T. DeKok [Tue, 21 May 2013 17:03:59 +0000 (13:03 -0400)]
Updates

10 years agoremoved old comment
Alan T. DeKok [Tue, 21 May 2013 15:04:31 +0000 (11:04 -0400)]
removed old comment

10 years agoInfinite loops are bad.
Alan T. DeKok [Tue, 21 May 2013 13:58:22 +0000 (09:58 -0400)]
Infinite loops are bad.

foo {
...
}

authorize = ${foo}

will add "foo" to the parent section, by appending it to the end
of the list.  But foo is already in the section, so we create
a loop inside the linked list of children.  That's bad.

10 years agoA better way of getting empty alternations
Alan T. DeKok [Fri, 17 May 2013 15:26:06 +0000 (11:26 -0400)]
A better way of getting empty alternations

10 years ago'A' is a valid base64 character
Alan T. DeKok [Thu, 16 May 2013 14:43:21 +0000 (10:43 -0400)]
'A' is a valid base64 character

10 years agoTests for xlat output
Alan T. DeKok [Thu, 16 May 2013 13:31:56 +0000 (09:31 -0400)]
Tests for xlat output

10 years agoSave the parsed array reference
Alan T. DeKok [Thu, 16 May 2013 13:31:38 +0000 (09:31 -0400)]
Save the parsed array reference

10 years agoAllow RHS of xlat alternation to be empty
Alan T. DeKok [Thu, 16 May 2013 13:06:03 +0000 (09:06 -0400)]
Allow RHS of xlat alternation to be empty

10 years agoClose FD before returning
Alan T. DeKok [Wed, 15 May 2013 22:11:32 +0000 (18:11 -0400)]
Close FD before returning

10 years agoUse correct version of radius_xlat
Alan T. DeKok [Wed, 15 May 2013 22:10:46 +0000 (18:10 -0400)]
Use correct version of radius_xlat

10 years agoA more robust way of statically removing "if (false)" sections
Alan T. DeKok [Wed, 15 May 2013 16:07:04 +0000 (12:07 -0400)]
A more robust way of statically removing "if (false)" sections

10 years agoNever mind... we'll get to this later
Alan T. DeKok [Wed, 15 May 2013 15:25:00 +0000 (11:25 -0400)]
Never mind... we'll get to this later

10 years agoMinor fixes
Alan T. DeKok [Wed, 15 May 2013 14:20:05 +0000 (10:20 -0400)]
Minor fixes

10 years agoIgnore subsections which statically evaluate to "false"
Alan T. DeKok [Wed, 15 May 2013 14:13:33 +0000 (10:13 -0400)]
Ignore subsections which statically evaluate to "false"

So that large swaths of the configuration can be taken out
of the configuration with zero run-time memory or CPU impact

10 years agoMoved "exec_trigger" to threads.c
Alan T. DeKok [Wed, 15 May 2013 13:49:25 +0000 (09:49 -0400)]
Moved "exec_trigger" to threads.c

It's a function which is useful only for the server core,
and requires access to the mainconfig data structure

10 years agoMove many common functions to a common library
Alan T. DeKok [Tue, 14 May 2013 20:20:30 +0000 (22:20 +0200)]
Move many common functions to a common library

And add stupid wrappers for rad_fork() and rad_waitpid()
We can go fix those later...

10 years agoRemove use of global variable
Alan T. DeKok [Tue, 14 May 2013 20:20:05 +0000 (22:20 +0200)]
Remove use of global variable

10 years agoMake other programs use evaluate.c, too.
Alan T. DeKok [Tue, 14 May 2013 18:48:54 +0000 (14:48 -0400)]
Make other programs use evaluate.c, too.

We'll move these programs into a utility library soon...

10 years agoEvaluate some conditions at parse time.
Alan T. DeKok [Tue, 14 May 2013 18:07:20 +0000 (14:07 -0400)]
Evaluate some conditions at parse time.

If the LHS and RHS are both DATA, then evaluate them statically,
and turn them into true / false conditions

10 years agoAdded 'true' and 'false' as top-level concepts.
Alan T. DeKok [Tue, 14 May 2013 17:45:08 +0000 (13:45 -0400)]
Added 'true' and 'false' as top-level concepts.

So that "false && FOO" gets mapped to "false"

Nice little optimizations...

10 years agoParse literals into VALUE_PAIR_DATA at compile time.
Alan T. DeKok [Tue, 14 May 2013 17:12:20 +0000 (13:12 -0400)]
Parse literals into VALUE_PAIR_DATA at compile time.

So that we have better errors.

However... we don't have type-specific parse errors, as
the current error API in conditions doesn't allow for that.

10 years agoPrint names for enumerated types
Alan T. DeKok [Tue, 14 May 2013 15:27:20 +0000 (11:27 -0400)]
Print names for enumerated types

10 years agoAdded template "data" type
Alan T. DeKok [Tue, 14 May 2013 14:02:38 +0000 (10:02 -0400)]
Added template "data" type

So that the data can be stored as pre-parsed data, instead of
as strings parsed at run-time

10 years agoMake radlog available in the "init" function of the Perl code
Alan T. DeKok [Mon, 13 May 2013 18:29:59 +0000 (14:29 -0400)]
Make radlog available in the "init" function of the Perl code

10 years agoChecks for empty expansions
Alan T. DeKok [Mon, 13 May 2013 13:06:28 +0000 (09:06 -0400)]
Checks for empty expansions

10 years agoStart of type checks on RHS of conditions
Alan T. DeKok [Mon, 13 May 2013 12:58:11 +0000 (08:58 -0400)]
Start of type checks on RHS of conditions

10 years agoDisallow RHS bare words for string attributes
Alan T. DeKok [Sun, 12 May 2013 23:28:53 +0000 (19:28 -0400)]
Disallow RHS bare words for string attributes

User-Name == "bob" is OK
User-Name == bob is not

10 years agoAdd single quotes around literals for attributes of type string
Alan T. DeKok [Sun, 12 May 2013 23:28:36 +0000 (19:28 -0400)]
Add single quotes around literals for attributes of type string

10 years agoAbstract cidr comparison into common function
Alan T. DeKok [Sun, 12 May 2013 21:11:53 +0000 (17:11 -0400)]
Abstract cidr comparison into common function

And use it for v4 / v6 CIDRs!

10 years agoAllow CIDR comparisons for v4 in paircmp_op
Alan T. DeKok [Sun, 12 May 2013 16:16:55 +0000 (12:16 -0400)]
Allow CIDR comparisons for v4 in paircmp_op

foo/n = bar/m  is true if foo==bar and n==m

foo/n < bar/m is true if n > m and foo is within bar

10 years agoUse better field for printing IP addresses
Alan T. DeKok [Sun, 12 May 2013 16:10:23 +0000 (12:10 -0400)]
Use better field for printing IP addresses

10 years agoRedundant casts get squashed
Alan T. DeKok [Sun, 12 May 2013 15:16:03 +0000 (11:16 -0400)]
Redundant casts get squashed

10 years agoBe more aggressive about freeing intermediate strings.
Alan T. DeKok [Sun, 12 May 2013 14:16:13 +0000 (10:16 -0400)]
Be more aggressive about freeing intermediate strings.

Yes, talloc will free them up.  But there's no reason to leave
them hanging around.

10 years agoAdded -M for talloc report
Alan T. DeKok [Sun, 12 May 2013 14:15:54 +0000 (10:15 -0400)]
Added -M for talloc report

10 years agoLog function prototypes belong in log.h
Alan T. DeKok [Sun, 12 May 2013 14:14:48 +0000 (10:14 -0400)]
Log function prototypes belong in log.h

10 years agoMore tests for conditions and =* and =*
Alan T. DeKok [Sun, 12 May 2013 13:53:51 +0000 (09:53 -0400)]
More tests for conditions and =* and =*

10 years agoChecks for existence / non-existince on strings are invalid
Alan T. DeKok [Sun, 12 May 2013 13:37:34 +0000 (09:37 -0400)]
Checks for existence / non-existince on strings are invalid

"foo" =* bar

doesn't make sense, as the string "foo" always exists

10 years agoFix order of arguments to paircmp_op
Alan T. DeKok [Sun, 12 May 2013 13:32:44 +0000 (09:32 -0400)]
Fix order of arguments to paircmp_op

10 years agoFix compiler warnings
Alan T. DeKok [Sun, 12 May 2013 13:10:15 +0000 (09:10 -0400)]
Fix compiler warnings

10 years agodon't use strlcpy for binary buffers
Alan T. DeKok [Sun, 12 May 2013 13:05:31 +0000 (09:05 -0400)]
don't use strlcpy for binary buffers

10 years agotrack pointer properly
Alan T. DeKok [Sun, 12 May 2013 13:04:01 +0000 (09:04 -0400)]
track pointer properly

10 years agouse talloc for strings
Alan T. DeKok [Sun, 12 May 2013 12:57:51 +0000 (08:57 -0400)]
use talloc for strings

10 years agodon't call pairfind when we have the vp
Alan T. DeKok [Sun, 12 May 2013 12:55:51 +0000 (08:55 -0400)]
don't call pairfind when we have the vp

10 years agouse correct ptr for pool name
Alan T. DeKok [Sun, 12 May 2013 12:54:44 +0000 (08:54 -0400)]
use correct ptr for pool name

10 years agoRemove dead code
Alan T. DeKok [Sun, 12 May 2013 12:53:27 +0000 (08:53 -0400)]
Remove dead code

10 years agoMade "cidr" a synonym for ipv4prefix
Alan T. DeKok [Sat, 11 May 2013 15:10:45 +0000 (11:10 -0400)]
Made "cidr" a synonym for ipv4prefix

10 years agoDigest buffer for sha1 xlat must be 20 bytes (not 16)
Arran Cudbard-Bell [Sun, 12 May 2013 01:19:47 +0000 (21:19 -0400)]
Digest buffer for sha1 xlat must be 20 bytes (not 16)

10 years agoMissing va_end
Arran Cudbard-Bell [Sun, 12 May 2013 01:17:05 +0000 (21:17 -0400)]
Missing va_end

10 years agoCoverity - missing va_end
Arran Cudbard-Bell [Sun, 12 May 2013 01:15:44 +0000 (21:15 -0400)]
Coverity - missing va_end

10 years agoCoverity - Dealock in firebird
Arran Cudbard-Bell [Sun, 12 May 2013 01:13:58 +0000 (21:13 -0400)]
Coverity - Dealock in firebird

10 years agoDoxygen
Alan T. DeKok [Sat, 11 May 2013 14:22:37 +0000 (10:22 -0400)]
Doxygen

10 years agoAllow casting for LHS of conditions.
Alan T. DeKok [Sat, 11 May 2013 14:13:30 +0000 (10:13 -0400)]
Allow casting for LHS of conditions.

And document them!

10 years agoSample configuration for new rlm_idn
Alan T. DeKok [Fri, 10 May 2013 01:49:53 +0000 (21:49 -0400)]
Sample configuration for new rlm_idn

10 years agoMatch the module configuration
Alan T. DeKok [Fri, 10 May 2013 01:49:18 +0000 (21:49 -0400)]
Match the module configuration

10 years agostrnlen isn't necessary
Alan T. DeKok [Fri, 10 May 2013 01:41:16 +0000 (21:41 -0400)]
strnlen isn't necessary

10 years agoShould be libidn11
Arran Cudbard-Bell [Fri, 10 May 2013 00:00:41 +0000 (20:00 -0400)]
Should be libidn11

10 years agoRemove unneeded lookups in pool_check_home_server
skids [Sun, 5 May 2013 20:17:57 +0000 (16:17 -0400)]
Remove unneeded lookups in pool_check_home_server

  This function no longer adds home servers since 1dbfd81e
  The search for the cs section is unneeded, as is the second rbtree search

10 years agoAdd dependency for rlm_idn to travis
Arran Cudbard-Bell [Thu, 9 May 2013 22:43:42 +0000 (18:43 -0400)]
Add dependency for rlm_idn to travis

10 years agoAdd rlm_idn
skids [Wed, 8 May 2013 23:39:08 +0000 (19:39 -0400)]
Add rlm_idn

This module will support any StringPrep needs especially IDNA.

It will be of limited practical usefulness until DDDS, which
requires it, is implemented, but at least this gets one small
separable task out of the way.

It is not simply added to rlm_expr for packaging reasons.
Despite the appearenceof simplicity, there's a lot of icky
unicode muckery, so it would be a bit onerous to provide an
in-tree implementation.

As such, for distros that split up rlms, this would allow severing
dependencies on libidn11 from the main freeradius package.

10 years agoUpdated for v3
Alan T. DeKok [Thu, 9 May 2013 17:54:49 +0000 (13:54 -0400)]
Updated for v3

10 years agoRFC 6930 and dictionary
Alan T. DeKok [Thu, 9 May 2013 17:45:47 +0000 (13:45 -0400)]
RFC 6930 and dictionary

10 years agoRFC 6911 and dictionary
Alan T. DeKok [Thu, 9 May 2013 17:43:51 +0000 (13:43 -0400)]
RFC 6911 and dictionary