freeradius.git
9 years agoReplaced Nullav with (AV*)NULL in rlm_perl
Herwin Weststrate [Mon, 11 Aug 2014 17:25:26 +0000 (19:25 +0200)]
Replaced Nullav with (AV*)NULL in rlm_perl

Nullav is deperacted, see http://perldoc.perl.org/5.12.1/perlapi.html#Handy-Values

9 years agoShould return NOOP, not fail, to be consistent with other modules
Arran Cudbard-Bell [Mon, 11 Aug 2014 13:42:38 +0000 (09:42 -0400)]
Should return NOOP, not fail, to be consistent with other modules

9 years agoHandle no config for section. Closes #759
Alan T. DeKok [Mon, 11 Aug 2014 12:43:39 +0000 (14:43 +0200)]
Handle no config for section.  Closes #759

9 years agoFix naming in map.c
Arran Cudbard-Bell [Mon, 11 Aug 2014 03:15:14 +0000 (23:15 -0400)]
Fix naming in map.c

9 years agoMark rad_assert_fail as never returning
Arran Cudbard-Bell [Sun, 10 Aug 2014 15:50:12 +0000 (11:50 -0400)]
Mark rad_assert_fail as never returning

9 years agoAggregate tmpl and map functions in their own .c/.h files
Arran Cudbard-Bell [Sun, 10 Aug 2014 14:53:47 +0000 (10:53 -0400)]
Aggregate tmpl and map functions in their own .c/.h files

Rename all 'vpt' references to tmpl

9 years agoUpdate ChangeLog
Arran Cudbard-Bell [Sat, 9 Aug 2014 00:02:27 +0000 (20:02 -0400)]
Update ChangeLog

9 years agoRelease the socket used to load LDAP clients
Arran Cudbard-Bell [Fri, 8 Aug 2014 23:49:53 +0000 (19:49 -0400)]
Release the socket used to load LDAP clients

9 years agoAdd 'Warning:' prefix
Arran Cudbard-Bell [Fri, 8 Aug 2014 16:24:39 +0000 (12:24 -0400)]
Add 'Warning:' prefix

9 years agoNumber of active connections should not be signed
Arran Cudbard-Bell [Fri, 8 Aug 2014 15:17:35 +0000 (11:17 -0400)]
Number of active connections should not be signed

9 years agoFormatting in threads.c
Arran Cudbard-Bell [Fri, 8 Aug 2014 14:32:00 +0000 (10:32 -0400)]
Formatting in threads.c

9 years agoassert(pool->active == pool->num) if we can't find any free connections
Arran Cudbard-Bell [Wed, 6 Aug 2014 22:14:21 +0000 (18:14 -0400)]
assert(pool->active == pool->num) if we can't find any free connections

9 years agoFix weird loop in connection.c
Arran Cudbard-Bell [Wed, 6 Aug 2014 22:07:25 +0000 (18:07 -0400)]
Fix weird loop in connection.c

9 years agoAdd more verbose logging for the connection pool
Arran Cudbard-Bell [Wed, 6 Aug 2014 16:26:11 +0000 (12:26 -0400)]
Add more verbose logging for the connection pool

9 years agoDoxygen
Arran Cudbard-Bell [Wed, 6 Aug 2014 15:07:49 +0000 (11:07 -0400)]
Doxygen

9 years agoDistinguish between single VP inserts, and list merges
Arran Cudbard-Bell [Wed, 6 Aug 2014 14:48:24 +0000 (10:48 -0400)]
Distinguish between single VP inserts, and list merges

9 years agoForce should be a bool
Arran Cudbard-Bell [Tue, 5 Aug 2014 19:01:45 +0000 (15:01 -0400)]
Force should be a bool

9 years agoRefactor radius_map2vp and add support for returning multiple attributes from RHS...
Arran Cudbard-Bell [Tue, 5 Aug 2014 03:10:39 +0000 (23:10 -0400)]
Refactor radius_map2vp and add support for returning multiple attributes from RHS attr references

9 years agoMake it clearer how the switch-attr-cmp test failed
Arran Cudbard-Bell [Tue, 5 Aug 2014 01:00:17 +0000 (21:00 -0400)]
Make it clearer how the switch-attr-cmp test failed

9 years agoAllow Attr[*] in radius_parse_attr
Arran Cudbard-Bell [Tue, 5 Aug 2014 00:57:54 +0000 (20:57 -0400)]
Allow Attr[*] in radius_parse_attr

9 years agoradius_parse_attr writes nice descriptive errors to the error buffer, so use them...
Arran Cudbard-Bell [Mon, 4 Aug 2014 21:43:07 +0000 (17:43 -0400)]
radius_parse_attr writes nice descriptive errors to the error buffer, so use them...

9 years agomake radius_tmply_copy_vp respect instance numbers and NUM_ALL (*)
Arran Cudbard-Bell [Mon, 4 Aug 2014 19:31:29 +0000 (15:31 -0400)]
make radius_tmply_copy_vp respect instance numbers and NUM_ALL (*)

9 years agoRename 'paircopy2' to 'paircopy_by_num'
Arran Cudbard-Bell [Mon, 4 Aug 2014 18:41:39 +0000 (14:41 -0400)]
Rename 'paircopy2' to 'paircopy_by_num'

9 years agoNested extern
Alan T. DeKok [Sun, 3 Aug 2014 06:41:36 +0000 (08:41 +0200)]
Nested extern

9 years agoDon't open proxy UDP socket if it's not needed
Alan T. DeKok [Sat, 2 Aug 2014 16:36:17 +0000 (18:36 +0200)]
Don't open proxy UDP socket if it's not needed

9 years agoRemove double xlat
Alan T. DeKok [Sat, 2 Aug 2014 12:14:12 +0000 (14:14 +0200)]
Remove double xlat

9 years agorename radiusProfileDn to radiusProfileDN
Arran Cudbard-Bell [Wed, 30 Jul 2014 01:35:15 +0000 (21:35 -0400)]
rename radiusProfileDn to radiusProfileDN

9 years agoCN should not be required in radiusProfile schema
Arran Cudbard-Bell [Tue, 29 Jul 2014 19:24:03 +0000 (15:24 -0400)]
CN should not be required in radiusProfile schema

9 years agoUse PSK only if PSK is available
Alan T. DeKok [Tue, 29 Jul 2014 16:26:35 +0000 (18:26 +0200)]
Use PSK only if PSK is available

9 years agoFix OpenSSL checks/linking in modules
Arran Cudbard-Bell [Mon, 28 Jul 2014 19:52:13 +0000 (15:52 -0400)]
Fix OpenSSL checks/linking in modules

9 years agoit's OK for this->server to be NULL
Alan T. DeKok [Mon, 28 Jul 2014 16:15:09 +0000 (12:15 -0400)]
it's OK for this->server to be NULL

9 years agoFix comment. Closes #745
Alan T. DeKok [Sun, 27 Jul 2014 23:10:11 +0000 (19:10 -0400)]
Fix comment. Closes #745

9 years agoRemove redundant pcap.h include
Arran Cudbard-Bell [Sun, 27 Jul 2014 15:21:51 +0000 (11:21 -0400)]
Remove redundant pcap.h include

9 years agoMove net functions which don't depend on PCAP libraries into net.c
Arran Cudbard-Bell [Sun, 27 Jul 2014 15:06:34 +0000 (11:06 -0400)]
Move net functions which don't depend on PCAP libraries into net.c

9 years agoPutting every source file on its own line makes it easier to resolve merge errors
Arran Cudbard-Bell [Sun, 27 Jul 2014 14:14:56 +0000 (10:14 -0400)]
Putting every source file on its own line makes it easier to resolve merge errors

9 years agoThe last 2 functions require pcap.
Alan T. DeKok [Sun, 27 Jul 2014 13:27:03 +0000 (09:27 -0400)]
The last 2 functions require pcap.

9 years agorlm_otp doesn't need a configure script
Arran Cudbard-Bell [Sat, 26 Jul 2014 15:05:24 +0000 (11:05 -0400)]
rlm_otp doesn't need a configure script

9 years agoImport/Export from Apache DS to cleanup formatting
Arran Cudbard-Bell [Sat, 26 Jul 2014 14:21:34 +0000 (10:21 -0400)]
Import/Export from Apache DS to cleanup formatting

9 years agoTypo in clients schema
Arran Cudbard-Bell [Sat, 26 Jul 2014 13:23:31 +0000 (09:23 -0400)]
Typo in clients schema

9 years agoOnly include pcap.h if we have libpcap
Arran Cudbard-Bell [Fri, 25 Jul 2014 20:47:46 +0000 (16:47 -0400)]
Only include pcap.h if we have libpcap

9 years agoOrganise LDAP schemas better
Arran Cudbard-Bell [Fri, 25 Jul 2014 20:06:30 +0000 (16:06 -0400)]
Organise LDAP schemas better

9 years agoChange IANA number in LDAP schemas from 3317 to 11344
Arran Cudbard-Bell [Fri, 25 Jul 2014 19:48:01 +0000 (15:48 -0400)]
Change IANA number in LDAP schemas from 3317 to 11344

No idea who 'Port Community Rotterdam' are, but we have our own IANA number, so should be using it.

9 years agoHack to get TLS-PSK-Identity
Alan T. DeKok [Thu, 24 Jul 2014 00:59:50 +0000 (20:59 -0400)]
Hack to get TLS-PSK-Identity

9 years agoNeeds cast to long long int
Arran Cudbard-Bell [Fri, 25 Jul 2014 16:47:23 +0000 (12:47 -0400)]
Needs cast to long long int

9 years agoprint 64bit rlm_expr result
Arran Cudbard-Bell [Fri, 25 Jul 2014 16:25:39 +0000 (12:25 -0400)]
print 64bit rlm_expr result

9 years agoContinue to build functions which don't rely on libpcap, when we don't have libpcap
Arran Cudbard-Bell [Wed, 23 Jul 2014 16:49:32 +0000 (12:49 -0400)]
Continue to build functions which don't rely on libpcap, when we don't have libpcap

9 years agoFix formatting of switch statements
Arran Cudbard-Bell [Wed, 23 Jul 2014 16:40:57 +0000 (12:40 -0400)]
Fix formatting of switch statements

9 years agoMerge pull request #742 from qnet-herwin/rlm_perl_v3.0.x
Arran Cudbard-Bell [Tue, 22 Jul 2014 17:23:22 +0000 (13:23 -0400)]
Merge pull request #742 from qnet-herwin/rlm_perl_v3.0.x

Fix error in attribute copying to rlm_perl

9 years agoFix error in attribute copying to rlm_perl
Herwin Weststrate [Tue, 22 Jul 2014 15:56:57 +0000 (17:56 +0200)]
Fix error in attribute copying to rlm_perl

Introduced in commit c225c615760d4c907640ebd249f860d5ab3258dd. It copied the RAD_REPLY hash twice, which had the side effects that some keys dropped out.

9 years agoDebian: Ensure some directories exist
Herwin Weststrate [Tue, 15 Jul 2014 10:04:13 +0000 (12:04 +0200)]
Debian: Ensure some directories exist

This prevents some warnings when installing the package.

9 years agoOther perl formatting
Arran Cudbard-Bell [Mon, 21 Jul 2014 14:30:18 +0000 (10:30 -0400)]
Other perl formatting

9 years agoFix multivalues attributes in rlm_perl. Addresses #731, Addresses #722
Arran Cudbard-Bell [Mon, 21 Jul 2014 14:25:25 +0000 (10:25 -0400)]
Fix multivalues attributes in rlm_perl. Addresses #731, Addresses #722

9 years agoAdd the gigawords calculation for MSSQL in accounting stop SQL clause
root [Mon, 21 Jul 2014 06:42:42 +0000 (06:42 +0000)]
Add the gigawords calculation for MSSQL in accounting stop SQL clause

9 years agoAdded a NULL check to rlm_perl
Herwin Weststrate [Sun, 20 Jul 2014 08:57:21 +0000 (10:57 +0200)]
Added a NULL check to rlm_perl

Otherwise, trying to start rlm_perl with an invalid file parameter would cause a segfault.

9 years agoMerge pull request #732 from nchaigne/v3.0.x
Arran Cudbard-Bell [Wed, 16 Jul 2014 18:51:30 +0000 (14:51 -0400)]
Merge pull request #732 from nchaigne/v3.0.x

dhcpclient - timeout and decline, release, inform

9 years agoMerge pull request #734 from spbnick/switch_cnf_to_sha256
Arran Cudbard-Bell [Wed, 16 Jul 2014 18:50:27 +0000 (14:50 -0400)]
Merge pull request #734 from spbnick/switch_cnf_to_sha256

Switch .cnf files to sha256 message digest

9 years agoMerge pull request #736 from spbnick/add_rlm_krb5_doc
Arran Cudbard-Bell [Wed, 16 Jul 2014 18:50:08 +0000 (14:50 -0400)]
Merge pull request #736 from spbnick/add_rlm_krb5_doc

Add minimal rlm_krb5 documentation file

9 years agoMerge pull request #735 from spbnick/add_P_option_to_man_pages
Arran Cudbard-Bell [Wed, 16 Jul 2014 18:49:51 +0000 (14:49 -0400)]
Merge pull request #735 from spbnick/add_P_option_to_man_pages

Add description of -P option to man pages

9 years agoMerge pull request #733 from spbnick/clarify_snmp_trap_conditions
Arran Cudbard-Bell [Wed, 16 Jul 2014 18:49:22 +0000 (14:49 -0400)]
Merge pull request #733 from spbnick/clarify_snmp_trap_conditions

Clarify conditions of limit hit SNMP notifications

9 years agoAdd description of -P option to man pages
Nikolai Kondrashov [Wed, 16 Jul 2014 16:59:03 +0000 (19:59 +0300)]
Add description of -P option to man pages

Add description of -P option to radtest and radclient man pages.

9 years agoClarify conditions of limit hit SNMP notifications
Nikolai Kondrashov [Wed, 16 Jul 2014 17:04:20 +0000 (20:04 +0300)]
Clarify conditions of limit hit SNMP notifications

Use "hit" instead of "reach" in the descriptions of serverMaxRequest and
serverMaxThreads SNMP notifications to make it clearer that they trigger
upon attempt to exceed the limit, not upon reaching the maximum allowed
value.

9 years agoSwitch .cnf files to sha256 message digest
Nikolai Kondrashov [Wed, 16 Jul 2014 17:22:40 +0000 (20:22 +0300)]
Switch .cnf files to sha256 message digest

Use sha256 as default_md (message digest) in all .cnf files as it is
more secure than the previous, now considered weak, sha1.

9 years agoAdd minimal rlm_krb5 documentation file
Nikolai Kondrashov [Wed, 16 Jul 2014 17:47:53 +0000 (20:47 +0300)]
Add minimal rlm_krb5 documentation file

Add doc/modules/rlm_krb5 - a minimal rlm_krb5 module documentation file,
based on the wiki page. Update raddb/mods-available/krb5 comments to
point to the actual and proper location.

9 years agodhcpclient - timeout and decline, release, inform
Nicolas C [Wed, 16 Jul 2014 14:16:59 +0000 (16:16 +0200)]
dhcpclient - timeout and decline, release, inform

Added receive timeout on socket according to -t option (retries are
still not handled).
Added commands for "decline", "release" and "inform" messages.
Updated usage.

9 years agoMore changes
Alan T. DeKok [Tue, 15 Jul 2014 12:11:50 +0000 (08:11 -0400)]
More changes

9 years agoNote recent changes
Alan T. DeKok [Tue, 15 Jul 2014 12:06:01 +0000 (08:06 -0400)]
Note recent changes

9 years agoCheck BN_rand_range return value
jvoisin [Mon, 14 Jul 2014 23:34:42 +0000 (19:34 -0400)]
Check BN_rand_range return value

CVE-2014-4733.

In practice, the function should never fail.

9 years agoConstant time memory comparison.
jvoisin [Mon, 14 Jul 2014 23:31:02 +0000 (19:31 -0400)]
Constant time memory comparison.

CVE-2014-4731.

Non-constant time comparisons usually require millions of packets
in order to get enough statistics.  This is VERY hard to do with
WiFi or wired 802.1X.  The delays on switch port open / close
are on the order of seconds.

9 years agoUse *_clear_free instead of *_free.
jvoisin [Mon, 14 Jul 2014 23:29:06 +0000 (19:29 -0400)]
Use *_clear_free instead of *_free.

CVE-2014-4732

9 years agoUpdate ChangeLog
Arran Cudbard-Bell [Sat, 12 Jul 2014 19:02:20 +0000 (15:02 -0400)]
Update ChangeLog

9 years agoAdd module type sanity check
Arran Cudbard-Bell [Sat, 12 Jul 2014 17:41:47 +0000 (13:41 -0400)]
Add module type sanity check

9 years agoAdd support for connection pool reuse
Arran Cudbard-Bell [Sat, 12 Jul 2014 14:28:06 +0000 (10:28 -0400)]
Add support for connection pool reuse

9 years agoConvert another argument to bool
Arran Cudbard-Bell [Thu, 10 Jul 2014 20:45:48 +0000 (16:45 -0400)]
Convert another argument to bool

9 years agoMerge pull request #730 from nchaigne/v3.0.x
Alan DeKok [Sat, 12 Jul 2014 13:40:30 +0000 (09:40 -0400)]
Merge pull request #730 from nchaigne/v3.0.x

dhcpclient - store xid when encoding request

9 years agodhcpclient - store xid when encoding request
Nicolas C [Fri, 11 Jul 2014 16:16:46 +0000 (18:16 +0200)]
dhcpclient - store xid when encoding request

Fixes the incorrect debug message "Encoding DHCP-Discover of id
ffffffff".
And this will allow to correlate xid from response (should be done by
the client, but not yet).

9 years agoTypo
Arran Cudbard-Bell [Thu, 10 Jul 2014 16:40:17 +0000 (12:40 -0400)]
Typo

9 years agoFormatting and documentation
Arran Cudbard-Bell [Thu, 10 Jul 2014 16:35:05 +0000 (12:35 -0400)]
Formatting and documentation

9 years agofind_client: min prefix of 0 needs to work
Sam Hartman [Thu, 10 Jul 2014 11:41:09 +0000 (07:41 -0400)]
find_client: min prefix of 0 needs to work

Use signed loop counter to permit 0-1 to be <= min_prefix

9 years agofr_inaddr_mask fix 0 prefix
Sam Hartman [Thu, 10 Jul 2014 13:42:18 +0000 (09:42 -0400)]
fr_inaddr_mask fix 0 prefix

Don't depend on the behavior of shifting by 32-bits on a 32-bit type.

9 years agoAllow User-Name in CUI reply
Alan T. DeKok [Thu, 10 Jul 2014 03:21:52 +0000 (23:21 -0400)]
Allow User-Name in CUI reply

9 years agoUse loop index to get description. Closes #729
Alan T. DeKok [Wed, 9 Jul 2014 19:33:24 +0000 (15:33 -0400)]
Use loop index to get description.  Closes #729

9 years agoA parent config section might not exist
Alan T. DeKok [Wed, 9 Jul 2014 19:27:37 +0000 (15:27 -0400)]
A parent config section might not exist

when dynamically adding a home server.

9 years agoRemove useless extern declarations
Arran Cudbard-Bell [Wed, 9 Jul 2014 16:34:30 +0000 (12:34 -0400)]
Remove useless extern declarations

9 years agoCleanup EAP-SIM macros
Arran Cudbard-Bell [Wed, 9 Jul 2014 15:26:34 +0000 (11:26 -0400)]
Cleanup EAP-SIM macros

9 years agoDebug condition is now a fr_cond_t
Arran Cudbard-Bell [Wed, 9 Jul 2014 15:25:26 +0000 (11:25 -0400)]
Debug condition is now a fr_cond_t

9 years agoLimit which operators can be used with LDAP group comparison
Arran Cudbard-Bell [Wed, 9 Jul 2014 15:12:23 +0000 (11:12 -0400)]
Limit which operators can be used with LDAP group comparison

and other minor cleanups

9 years agoFormatting
Arran Cudbard-Bell [Wed, 9 Jul 2014 00:09:19 +0000 (20:09 -0400)]
Formatting

9 years agoFixup Sqlite schema
Arran Cudbard-Bell [Wed, 9 Jul 2014 00:09:00 +0000 (20:09 -0400)]
Fixup Sqlite schema

9 years agoUpdate cui
Stefan Paetow [Tue, 8 Jul 2014 08:45:01 +0000 (09:45 +0100)]
Update cui

Updated comments to clarify the dual purpose of the unlang fragment.

9 years agoTry and make dlopen library search messages clearer
Arran Cudbard-Bell [Tue, 8 Jul 2014 03:23:25 +0000 (23:23 -0400)]
Try and make dlopen library search messages clearer

9 years agoRemove reply:User-Name only if there's a reply:CUI
Alan T. DeKok [Tue, 8 Jul 2014 02:35:12 +0000 (22:35 -0400)]
Remove reply:User-Name only if there's a reply:CUI

9 years agoChanged integer type for rlm_eap_{ttls,peap} tunnel types to bool where applicable
Herwin Weststrate [Sun, 6 Jul 2014 10:37:27 +0000 (12:37 +0200)]
Changed integer type for rlm_eap_{ttls,peap} tunnel types to bool where applicable

9 years agoUse enums instead of define lists in rlm_eap_peap
Herwin Weststrate [Sun, 6 Jul 2014 10:55:03 +0000 (12:55 +0200)]
Use enums instead of define lists in rlm_eap_peap

But only for the values that are only used internally.

9 years agoFormatting
Arran Cudbard-Bell [Mon, 7 Jul 2014 18:28:21 +0000 (14:28 -0400)]
Formatting

9 years agoAs posted to the list
Alan T. DeKok [Mon, 7 Jul 2014 16:09:28 +0000 (12:09 -0400)]
As posted to the list

9 years agoMerge pull request #725 from nchaigne/v3.0.x
Arran Cudbard-Bell [Fri, 4 Jul 2014 15:08:19 +0000 (11:08 -0400)]
Merge pull request #725 from nchaigne/v3.0.x

radeapclient - fix send_packet

9 years agoradeapclient - fix send_packet
Nicolas C [Fri, 4 Jul 2014 15:03:33 +0000 (17:03 +0200)]
radeapclient - fix send_packet

I spotted two errors in radeapclient.c, introduced in the following
previous commits.
With this fix, radeapclient is now useable again.

1)
Commit: c8a062a112f17a5810d311dc0e0acfe963b2d440
(2014/06/13)

- send_packet(rep, &req);
-
- if (!req) return -1;
+ send_packet(req, &rep);
+ if (!rep) {

Arguments got reversed. Hence segmentation fault later when doing:

for (vp = req->vps; vp != NULL; vp = vpnext) {

Bit of caution on the wording used in radeapclient:
"req" is the request coming FROM the server. (because this is not a
"request" in RADIUS sense, but an EAP-Request within the EAP-SIM
transaction.)
"rep" is the response from the client TO the server (EAP-Response).

2)
Commit: bc3676835c3dcc220ab518d4c3c35962bc0f8be2
(2014/05/02)

In "send_packet":

+ if (!req || !rep || !*rep) return -1;

*rep == NULL is the expected behaviour...

9 years agoIn redhat spec file, update dependency on json-c to version 0.10 as 0.11 only exists...
Philippe Wooding [Fri, 4 Jul 2014 10:33:44 +0000 (12:33 +0200)]
In redhat spec file, update dependency on json-c to version 0.10 as 0.11 only exists for fedora and 0.10 builds ok

9 years agoUpdate redhat spec file to reflect the fact rlm_host is no longer experimental.
Philippe Wooding [Fri, 4 Jul 2014 10:29:29 +0000 (12:29 +0200)]
Update redhat spec file to reflect the fact rlm_host is no longer experimental.

9 years agoUse correct type for length
Alan T. DeKok [Wed, 2 Jul 2014 23:59:51 +0000 (19:59 -0400)]
Use correct type for length