freeradius.git
8 years agoBe more careful about appending duplicate options to the pg connection string Closes...
Arran Cudbard-Bell [Fri, 31 Jul 2015 15:16:54 +0000 (11:16 -0400)]
Be more careful about appending duplicate options to the pg connection string Closes #1172

8 years agoconst for variables
Alan T. DeKok [Fri, 31 Jul 2015 07:22:11 +0000 (09:22 +0200)]
const for variables

8 years agoTests for Tunnel-Password
Alan T. DeKok [Thu, 30 Jul 2015 18:35:48 +0000 (20:35 +0200)]
Tests for Tunnel-Password

And a fix for when it would encode passwords with the
wrong length

8 years agoAdded packet / original for encode / decode attrs
Alan T. DeKok [Thu, 30 Jul 2015 18:29:16 +0000 (20:29 +0200)]
Added packet / original for encode / decode attrs

8 years agoUpdate ChangeLog
Arran Cudbard-Bell [Fri, 31 Jul 2015 03:56:06 +0000 (23:56 -0400)]
Update ChangeLog

8 years agofr_utf8_char should take a string length so that it can operate safely on none \0...
Arran Cudbard-Bell [Fri, 31 Jul 2015 02:50:31 +0000 (22:50 -0400)]
fr_utf8_char should take a string length so that it can operate safely on none \0 terminated buffers

8 years agoFifo code should use unsigned ints
Arran Cudbard-Bell [Wed, 29 Jul 2015 23:21:03 +0000 (19:21 -0400)]
Fifo code should use unsigned ints

8 years agoFix potential buffer overflow in value_data_prints
Arran Cudbard-Bell [Thu, 30 Jul 2015 16:11:51 +0000 (12:11 -0400)]
Fix potential buffer overflow in value_data_prints

8 years agoUpdate ChangeLog
Arran Cudbard-Bell [Tue, 28 Jul 2015 16:21:24 +0000 (12:21 -0400)]
Update ChangeLog

8 years agoRemove unnecessary prototype
Alan T. DeKok [Mon, 27 Jul 2015 19:38:54 +0000 (15:38 -0400)]
Remove unnecessary prototype

8 years agoDon't do mutexes if no threads
Alan T. DeKok [Mon, 27 Jul 2015 19:31:46 +0000 (15:31 -0400)]
Don't do mutexes if no threads

8 years agoDon't check for spawn in area where it's false
Alan T. DeKok [Mon, 27 Jul 2015 16:45:16 +0000 (12:45 -0400)]
Don't check for spawn in area where it's false

8 years agoMore minor tweaks
Alan T. DeKok [Mon, 27 Jul 2015 16:42:18 +0000 (12:42 -0400)]
More minor tweaks

8 years agoRemove "needs_reconnecting"
Alan T. DeKok [Mon, 27 Jul 2015 16:39:12 +0000 (12:39 -0400)]
Remove "needs_reconnecting"

It's not used in v3.0, and won't be needed there

8 years agoDon't use "lock". It's too common
Alan T. DeKok [Mon, 27 Jul 2015 16:34:18 +0000 (12:34 -0400)]
Don't use "lock".  It's too common

8 years agoformatting / comments
Alan T. DeKok [Mon, 27 Jul 2015 15:55:07 +0000 (11:55 -0400)]
formatting / comments

8 years agoDon't recusively grab mutexes.
Alan T. DeKok [Mon, 27 Jul 2015 15:43:33 +0000 (11:43 -0400)]
Don't recusively grab mutexes.

The reconnection logic is complex and fragile

8 years agoredisConnect() may return NULL
Alan T. DeKok [Mon, 27 Jul 2015 15:14:03 +0000 (11:14 -0400)]
redisConnect() may return NULL

It's possible.  Better check for it

8 years agoDo dedup for CoA packets, too
Alan T. DeKok [Mon, 27 Jul 2015 11:13:19 +0000 (07:13 -0400)]
Do dedup for CoA packets, too

8 years agoUse correct VP for port information
Alan T. DeKok [Sun, 26 Jul 2015 12:02:25 +0000 (08:02 -0400)]
Use correct VP for port information

8 years agoMinor updates
Alan T. DeKok [Sun, 26 Jul 2015 10:49:52 +0000 (06:49 -0400)]
Minor updates

8 years agosession_init returns 0/1
Alan T. DeKok [Sun, 26 Jul 2015 00:48:11 +0000 (20:48 -0400)]
session_init returns 0/1

8 years agoconn_pool -> pool. Closes #1165
Alan T. DeKok [Fri, 24 Jul 2015 19:37:37 +0000 (15:37 -0400)]
conn_pool -> pool.  Closes #1165

8 years agoFormatting
Arran Cudbard-Bell [Thu, 23 Jul 2015 04:08:13 +0000 (00:08 -0400)]
Formatting

8 years agoPass error codes back through cf_section_parse
Arran Cudbard-Bell [Thu, 23 Jul 2015 01:32:29 +0000 (21:32 -0400)]
Pass error codes back through cf_section_parse

8 years agoRevert "Don't complain on deprecated. Closes #1131"
Arran Cudbard-Bell [Wed, 22 Jul 2015 22:30:07 +0000 (18:30 -0400)]
Revert "Don't complain on deprecated.  Closes #1131"

DO complain on -C, because we refuse to start without -C, and having different behaviour between daemon mode and -C is worse than some mildly confusing message, as it's the thing that init and salt scripts use to prevent accidental destruction of radius clusters.

8 years agoFix missing %{Packet-Src-IPv6-Address} in the linelog
Jorge Pereira [Wed, 22 Jul 2015 21:47:34 +0000 (18:47 -0300)]
Fix missing %{Packet-Src-IPv6-Address} in the linelog

8 years agoCorrect ldap config note
Arran Cudbard-Bell [Wed, 22 Jul 2015 21:41:04 +0000 (17:41 -0400)]
Correct ldap config note

8 years agoUpdate ldap
Alan Buxey [Mon, 20 Jul 2015 11:13:39 +0000 (12:13 +0100)]
Update ldap

8 years agoAdd 'Alc-Ascend-Data-Filter-Host-Spec' for Alcatel7750
Jorge Pereira [Wed, 22 Jul 2015 21:35:59 +0000 (18:35 -0300)]
Add 'Alc-Ascend-Data-Filter-Host-Spec' for Alcatel7750

8 years agoFix missing %{Packet-Src-IPv6-Address} in the policy insert_acct_class
Jorge Pereira [Wed, 22 Jul 2015 21:26:01 +0000 (18:26 -0300)]
Fix missing %{Packet-Src-IPv6-Address} in the policy insert_acct_class

8 years agoUpdate ChangeLog
Arran Cudbard-Bell [Wed, 22 Jul 2015 21:25:49 +0000 (17:25 -0400)]
Update ChangeLog

8 years agoMerge pull request #1160 from jpereira/dict/alcatel7750-1
Arran Cudbard-Bell [Wed, 22 Jul 2015 21:22:00 +0000 (17:22 -0400)]
Merge pull request #1160 from jpereira/dict/alcatel7750-1

Add 'Alc-Nas-Filter-Rule-Shared' for Alcatel7750

8 years agoDon't check pointer in FR_TIMEVAL_TO_MS
Arran Cudbard-Bell [Wed, 22 Jul 2015 20:38:57 +0000 (16:38 -0400)]
Don't check pointer in FR_TIMEVAL_TO_MS

8 years agoAdd NULL check in originate-coa
Herwin Weststrate [Tue, 21 Jul 2015 12:32:46 +0000 (14:32 +0200)]
Add NULL check in originate-coa

This prevents segfaults that may occur when the COA list could not be created, either by a lack of memory, or a request that is not an Access-Request/Accounting-Request

8 years agoAdd 'Alc-Nas-Filter-Rule-Shared' for Alcatel7750
Jorge Pereira [Wed, 22 Jul 2015 19:09:06 +0000 (16:09 -0300)]
Add 'Alc-Nas-Filter-Rule-Shared' for Alcatel7750

8 years agoMerge pull request #1159 from qnet-herwin/servicetype_authorizeonly_symbolic
Arran Cudbard-Bell [Wed, 22 Jul 2015 12:02:00 +0000 (08:02 -0400)]
Merge pull request #1159 from qnet-herwin/servicetype_authorizeonly_symbolic

Use define for Service-Type value check

8 years agoUse define for Service-Type value check
Herwin Weststrate [Wed, 22 Jul 2015 09:57:16 +0000 (11:57 +0200)]
Use define for Service-Type value check

The value 17 (Authorize-Only) has been added in RFC3576, the other values were already present in RFC 2865, most likely that's the reason the symbolic name was missing.

8 years agoUpdate ChangeLog
Arran Cudbard-Bell [Tue, 21 Jul 2015 15:24:57 +0000 (11:24 -0400)]
Update ChangeLog

8 years agoAvoid modifying dst until we're sure unescaping has succeeded in value_data_from_str...
Arran Cudbard-Bell [Tue, 21 Jul 2015 15:02:15 +0000 (11:02 -0400)]
Avoid modifying dst until we're sure unescaping has succeeded in value_data_from_str.  Closes #1157

8 years agoAlways set error messages in ip_hton
Arran Cudbard-Bell [Mon, 20 Jul 2015 15:48:13 +0000 (11:48 -0400)]
Always set error messages in ip_hton

8 years agoUpdate ChangeLog
Arran Cudbard-Bell [Mon, 20 Jul 2015 18:37:49 +0000 (14:37 -0400)]
Update ChangeLog

8 years agoMove radclient to use fr_pton_port for its host and port parsing
Arran Cudbard-Bell [Mon, 20 Jul 2015 18:23:35 +0000 (14:23 -0400)]
Move radclient to use fr_pton_port for its host and port parsing

fr_pton_port seems to work, whereas what was there before didn't...

8 years agoFix v6 address printing in from/to messages
Arran Cudbard-Bell [Mon, 20 Jul 2015 18:23:04 +0000 (14:23 -0400)]
Fix v6 address printing in from/to messages

8 years agoAllow an af to be specified for fr_pton
Arran Cudbard-Bell [Mon, 20 Jul 2015 18:03:44 +0000 (14:03 -0400)]
Allow an af to be specified for fr_pton

This controls which record we use if the address doesn't look like a v4 or v6 address.

Additionally inet_pton doesn't like addresses being wrapped in [], so strip them off in fr_pton_port.

8 years agoAdd fr_pton_port which parses a v4/v6 ipaddress or host and port
Arran Cudbard-Bell [Mon, 20 Jul 2015 15:48:43 +0000 (11:48 -0400)]
Add fr_pton_port which parses a v4/v6 ipaddress or host and port

8 years agoUse temporary value buffer in fr_pton4/6
Arran Cudbard-Bell [Mon, 20 Jul 2015 15:39:05 +0000 (11:39 -0400)]
Use temporary value buffer in fr_pton4/6

8 years agoRename json_fr_pair_make back to json_pair_make
Arran Cudbard-Bell [Mon, 20 Jul 2015 14:58:50 +0000 (10:58 -0400)]
Rename json_fr_pair_make back to json_pair_make

8 years agoNeed libsasl to build SASL capable rlm_ldap
Arran Cudbard-Bell [Mon, 20 Jul 2015 14:52:56 +0000 (10:52 -0400)]
Need libsasl to build SASL capable rlm_ldap

8 years agoCheck for sasl/sasl.h too
Arran Cudbard-Bell [Mon, 20 Jul 2015 14:47:49 +0000 (10:47 -0400)]
Check for sasl/sasl.h too

8 years agoFormatting
Arran Cudbard-Bell [Sun, 19 Jul 2015 17:14:56 +0000 (13:14 -0400)]
Formatting

8 years agoOnly check if config items are deprecated if they exist
Arran Cudbard-Bell [Sun, 19 Jul 2015 17:14:49 +0000 (13:14 -0400)]
Only check if config items are deprecated if they exist

8 years agoUse inst->pool not inst->conn_pool
Arran Cudbard-Bell [Sun, 19 Jul 2015 05:56:25 +0000 (01:56 -0400)]
Use inst->pool not inst->conn_pool

8 years agoNormalise conn field names in iodbc
Arran Cudbard-Bell [Sun, 19 Jul 2015 05:51:05 +0000 (01:51 -0400)]
Normalise conn field names in iodbc

8 years agoAdditional macros to simplify timeval to ms conversions, and marking things as deprec...
Arran Cudbard-Bell [Sun, 19 Jul 2015 05:47:40 +0000 (01:47 -0400)]
Additional macros to simplify timeval to ms conversions, and marking things as deprecated whilst removing the fields from the struct

8 years agoGlobbing across directories is not supported. Fixes #1149.
Alan T. DeKok [Fri, 17 Jul 2015 01:07:14 +0000 (21:07 -0400)]
Globbing across directories is not supported.  Fixes #1149.

The rest of the "filename_work" code assumes that the detail.work
file is in the same directory as the files being globbed.  In order
to support globbing for directories, the code will have to be updated
to *not* open detail.work, but instead to do a *second* file
globbing() on .../*/detail.work, in order to get the real filename
of the detail.work file.

In the short term it's easier to just enforce the assumptions
in the rest of the code.

8 years agos/fr_pair_make_any/fr_pair_make_unknown
Arran Cudbard-Bell [Thu, 16 Jul 2015 23:43:28 +0000 (19:43 -0400)]
s/fr_pair_make_any/fr_pair_make_unknown

8 years agoUse modern list names
Arran Cudbard-Bell [Thu, 16 Jul 2015 23:38:57 +0000 (19:38 -0400)]
Use modern list names

8 years agoIf proxying to public IPs, skip link local sockets. Fixes #1148
Alan T. DeKok [Thu, 16 Jul 2015 20:54:32 +0000 (16:54 -0400)]
If proxying to public IPs, skip link local sockets.  Fixes #1148

8 years agofixed message "hex string is not even"
Nicolas C [Thu, 16 Jul 2015 16:02:59 +0000 (18:02 +0200)]
fixed message "hex string is not even"

Length of Hex String is not even, got 7 bytes

Is better than:
Length of Hex String is not even, got 18446744073709551615 bytes

8 years agoMore byte fixes
Alan T. DeKok [Thu, 16 Jul 2015 17:17:42 +0000 (13:17 -0400)]
More byte fixes

8 years agoMore short fixes
Alan T. DeKok [Thu, 16 Jul 2015 12:11:22 +0000 (08:11 -0400)]
More short fixes

8 years agodhcp secs is a short
Nicolas C [Thu, 16 Jul 2015 09:50:50 +0000 (11:50 +0200)]
dhcp secs is a short

Properly encode DHCP field "secs" (using htons instead of htonl).

Also I think in this case using "vp_short" is more correct than
"vp_integer" for a short (even though it still works with "vp_integer").

8 years agoMerge pull request #1133 from jpereira/devel/add-sql_fields-freetds
Arran Cudbard-Bell [Wed, 15 Jul 2015 16:57:58 +0000 (12:57 -0400)]
Merge pull request #1133 from jpereira/devel/add-sql_fields-freetds

Add sql_fields function for freetds refs #993

8 years agonote recent changes
Alan T. DeKok [Wed, 15 Jul 2015 15:32:18 +0000 (11:32 -0400)]
note recent changes

8 years agoClarify message
Alan T. DeKok [Wed, 15 Jul 2015 13:41:11 +0000 (09:41 -0400)]
Clarify message

8 years agoAlternate where we write errors in fr_strerror_printf to allow error messages to...
Arran Cudbard-Bell [Wed, 15 Jul 2015 03:36:16 +0000 (23:36 -0400)]
Alternate where we write errors in fr_strerror_printf to allow error messages to be appended to

8 years agoFormatting in getaddrinfo.c
Arran Cudbard-Bell [Wed, 15 Jul 2015 02:53:17 +0000 (22:53 -0400)]
Formatting in getaddrinfo.c

8 years agos/fr_isbase64/fr_is_base64
Arran Cudbard-Bell [Wed, 15 Jul 2015 01:57:53 +0000 (21:57 -0400)]
s/fr_isbase64/fr_is_base64

8 years agoRename functions in pair.c to be consistent with the established naming scheme
Arran Cudbard-Bell [Tue, 14 Jul 2015 20:38:19 +0000 (16:38 -0400)]
Rename functions in pair.c to be consistent with the established naming scheme

s/pairalloc/fr_pair_afrom_da/;
s/paircreate/fr_pair_afrom_num/;
s/pair2unknown/fr_pair_to_unknown/;
s/pairfree/fr_pair_list_free/;
s/pairfind/fr_pair_find_by_num/;
s/pair_find_by_da/fr_pair_find_by_da/;
s/pairdelete/fr_pair_delete_by_num/;
s/pairadd/fr_pair_add/;
s/pairreplace/fr_pair_replace/;
s/paircmp/fr_pair_cmp/;
s/pairlistcmp/fr_pair_list_cmp/;
s/attrtagcmp/fr_pair_cmp_by_da_tag/;
s/pairsort/fr_pair_list_sort/;
s/pairvalidate_debug/fr_pair_validate_debug/;
s/pairvalidate/fr_pair_validate/;
s/pairvalidate_relaxed/fr_pair_validate_relaxed/;
s/paircopyvp/fr_pair_copy/;
s/paircopy/fr_pair_list_copy/;
s/paircopy_by_num/fr_pair_list_copy_by_num/;
s/pairsteam/fr_pair_steal/;
s/pairmemcpy/fr_pair_value_memcpy/;
s/pairmemsteal/fr_pair_value_memsteal/;
s/pairstrcpy/fr_pair_value_strcpy/;
s/pairbstrncpy/fr_pair_value_bstrncpy/;
s/pairsprintf/fr_pair_value_sprintf/;
s/pairmove/fr_pair_list_move/;
s/pairfilter/fr_pair_list_move_by_num/;
s/pairmakeip/fr_pair_afrom_ip_str/;
s/pairparsevalue/fr_pair_value_from_str/;
s/pairmake/fr_pair_make/;
s/pairmark_xlat/fr_pair_mark_xlat/;
s/pairread/fr_pair_raw_from_str/;
s/userparse/fr_pair_list_afrom_str/;
s/readvp2/fr_pair_list_afrom_file/;
s/fr_pair_verify_vp/fr_pair_verify/;
s/fr_pair_verify_list/fr_pair_list_verify/;

s/radius_pairecreate/radius_pair_create/;
s/pairmake_packet/pair_make_packet/;
s/pairmake_reply/pair_make_reply/;
s/pairmake_config/pair_make_config/;

# Conflicts:
# src/lib/pair.c

8 years agoRemove module_safe grouping
Arran Cudbard-Bell [Tue, 14 Jul 2015 17:07:49 +0000 (13:07 -0400)]
Remove module_safe grouping

8 years agoUpdating man rlm_attr_filter
Jorge Pereira [Mon, 13 Jul 2015 19:54:10 +0000 (16:54 -0300)]
Updating man rlm_attr_filter

8 years agoAdd the module creation guide to the CONTRIBUTING file
Arran Cudbard-Bell [Tue, 14 Jul 2015 03:36:34 +0000 (23:36 -0400)]
Add the module creation guide to the CONTRIBUTING file

8 years agoMark v1.x.x and 2.x.x as EOL in doxygen docs
Arran Cudbard-Bell [Tue, 14 Jul 2015 03:06:13 +0000 (23:06 -0400)]
Mark v1.x.x and 2.x.x as EOL in doxygen docs

8 years agoFix files module so there's no collisions.
Alan T. DeKok [Tue, 14 Jul 2015 01:10:27 +0000 (21:10 -0400)]
Fix files module so there's no collisions.

Move to an rbtree, so each entry is unique.
More talloc work.

8 years agoSet lineno correctly
Alan T. DeKok [Tue, 14 Jul 2015 00:53:56 +0000 (20:53 -0400)]
Set lineno correctly

8 years agoWe can use "lineno" instead of "order"
Alan T. DeKok [Tue, 14 Jul 2015 00:51:39 +0000 (20:51 -0400)]
We can use "lineno" instead of "order"

8 years agoRemove unused field
Alan T. DeKok [Tue, 14 Jul 2015 00:47:17 +0000 (20:47 -0400)]
Remove unused field

8 years agoRemove default cistron compatibility.
Alan T. DeKok [Tue, 14 Jul 2015 00:09:54 +0000 (20:09 -0400)]
Remove default cistron compatibility.

8 years agonote recent changes
Alan T. DeKok [Mon, 13 Jul 2015 13:10:27 +0000 (09:10 -0400)]
note recent changes

8 years agoAdd PW_TYPE to data type mapping table
Arran Cudbard-Bell [Mon, 13 Jul 2015 18:18:25 +0000 (14:18 -0400)]
Add PW_TYPE to data type mapping table

8 years agoAdd doxygen headers for some important enums
Arran Cudbard-Bell [Mon, 13 Jul 2015 17:36:02 +0000 (13:36 -0400)]
Add doxygen headers for some important enums

8 years agoMention the Git tutorial
Arran Cudbard-Bell [Mon, 13 Jul 2015 14:56:17 +0000 (10:56 -0400)]
Mention the Git tutorial

8 years agoWhitespace
Arran Cudbard-Bell [Mon, 13 Jul 2015 14:47:15 +0000 (10:47 -0400)]
Whitespace

8 years agoMention putting log output in backticks
Arran Cudbard-Bell [Mon, 13 Jul 2015 14:46:30 +0000 (10:46 -0400)]
Mention putting log output in backticks

8 years agoRefine the contributing document a little
Arran Cudbard-Bell [Mon, 13 Jul 2015 14:42:58 +0000 (10:42 -0400)]
Refine the contributing document a little

8 years agoAdd contributing document
Arran Cudbard-Bell [Mon, 13 Jul 2015 01:34:18 +0000 (21:34 -0400)]
Add contributing document

8 years agoAdd notes to README.rst about commercial support and abusing the GitHub issue tracker
Arran Cudbard-Bell [Sun, 12 Jul 2015 22:04:57 +0000 (18:04 -0400)]
Add notes to README.rst about commercial support and abusing the GitHub issue tracker

8 years agoMore optimizations
Alan T. DeKok [Fri, 10 Jul 2015 21:26:02 +0000 (17:26 -0400)]
More optimizations

After converting "%{Attr}" to &Attr, do more parsing of the RHS,
and check if teh RHS is an empty string.  If so, the string expansion
and comparison to empty string is just an existence check for the
attribute.

8 years agoStandardize warning messages
Alan T. DeKok [Fri, 10 Jul 2015 21:06:11 +0000 (17:06 -0400)]
Standardize warning messages

8 years agocheck_config is now in conffile.c
Alan T. DeKok [Fri, 10 Jul 2015 15:21:47 +0000 (11:21 -0400)]
check_config is now in conffile.c

8 years agoMove check_config to conffile.c
Alan T. DeKok [Fri, 10 Jul 2015 13:02:12 +0000 (09:02 -0400)]
Move check_config to conffile.c

config things should arguably be here...

8 years agoDon't complain on deprecated. Closes #1131
Alan T. DeKok [Fri, 10 Jul 2015 12:54:09 +0000 (08:54 -0400)]
Don't complain on deprecated.  Closes #1131

8 years agoAdd sql_fields function for freetds refs #993
Jorge Pereira [Fri, 8 May 2015 00:35:32 +0000 (21:35 -0300)]
Add sql_fields function for freetds refs #993

8 years agoDon't convert RHS to data if RHS is empty
Alan T. DeKok [Thu, 9 Jul 2015 17:57:15 +0000 (13:57 -0400)]
Don't convert RHS to data if RHS is empty

FIXME: The test should really be converted to an existence check

8 years agoDon't convert LIST to ATTRIBUTE
Alan T. DeKok [Thu, 9 Jul 2015 17:56:54 +0000 (13:56 -0400)]
Don't convert LIST to ATTRIBUTE

8 years agoDo more optimizations
Alan T. DeKok [Thu, 9 Jul 2015 17:27:04 +0000 (13:27 -0400)]
Do more optimizations

If LHS XLAT was converted to an attribute reference, AND the
RHS is a literal, then convert the RHS to type-specific data, too

8 years agoAlways recurse in pass2
Alan T. DeKok [Thu, 9 Jul 2015 17:26:13 +0000 (13:26 -0400)]
Always recurse in pass2

even if the node is marked as PASS2_FIXUP_NONE.  So that
xlat's can be compiled to attribute references

8 years agoExplictly handle more condition types
Alan T. DeKok [Thu, 9 Jul 2015 17:25:27 +0000 (13:25 -0400)]
Explictly handle more condition types

And recurse on children

8 years agolabel should always be defined
Alan T. DeKok [Thu, 9 Jul 2015 17:24:22 +0000 (13:24 -0400)]
label should always be defined