freeradius.git
9 years agoMerge pull request #920 from leprechau/small_updates
Alan DeKok [Fri, 6 Mar 2015 19:38:54 +0000 (14:38 -0500)]
Merge pull request #920 from leprechau/small_updates

small updates

9 years agoMake print match parse
Alan T. DeKok [Fri, 6 Mar 2015 19:37:58 +0000 (14:37 -0500)]
Make print match parse

9 years agosmall updates
Aaron Hurt [Fri, 6 Mar 2015 17:49:10 +0000 (11:49 -0600)]
small updates
* fixed documentation typos and corrected other sections
* modified client loading to respect keys returned from view payloads

9 years agoLeave regexes unmolested.
Alan T. DeKok [Fri, 6 Mar 2015 17:40:29 +0000 (12:40 -0500)]
Leave regexes unmolested.

The regex compiler can do necessary de-quoting

9 years agoRelax restrictions on group membership query
Alan T. DeKok [Fri, 6 Mar 2015 17:33:38 +0000 (12:33 -0500)]
Relax restrictions on group membership query

We don't need to have groupcheck / group reply attrs

9 years agoAllow "netmask" to work again
Alan T. DeKok [Fri, 6 Mar 2015 17:29:29 +0000 (12:29 -0500)]
Allow "netmask" to work again

9 years agonote recent changes
Alan T. DeKok [Fri, 6 Mar 2015 16:42:37 +0000 (11:42 -0500)]
note recent changes

9 years agoPut TCP listeners into a tree in their parent
Alan T. DeKok [Fri, 6 Mar 2015 16:42:13 +0000 (11:42 -0500)]
Put TCP listeners into a tree in their parent

For various talloc issues

9 years agoOne more regex test
Alan T. DeKok [Fri, 6 Mar 2015 16:41:05 +0000 (11:41 -0500)]
One more regex test

9 years agonote recent changes
Alan T. DeKok [Thu, 5 Mar 2015 23:07:26 +0000 (18:07 -0500)]
note recent changes

9 years agoEnsure that types can't have value 0
Alan T. DeKok [Thu, 5 Mar 2015 23:04:45 +0000 (18:04 -0500)]
Ensure that types can't have value 0

So we don't run into the previous problem again

9 years agoMake tls_new_client_session set a destructor, too.
Alan T. DeKok [Thu, 5 Mar 2015 17:27:15 +0000 (12:27 -0500)]
Make tls_new_client_session set a destructor, too.

So that ssn->ssl gets freed

9 years agoNo need for these functions to be exported
Alan T. DeKok [Thu, 5 Mar 2015 17:23:59 +0000 (12:23 -0500)]
No need for these functions to be exported

9 years agoDon't use 0 for any value. It's reserved for the default section
Alan T. DeKok [Thu, 5 Mar 2015 16:35:52 +0000 (11:35 -0500)]
Don't use 0 for any value.  It's reserved for the default section

9 years agoMore doc fixes
Arran Cudbard-Bell [Thu, 5 Mar 2015 16:21:47 +0000 (11:21 -0500)]
More doc fixes

9 years agoLimit talloc report depth
Alan T. DeKok [Thu, 5 Mar 2015 14:07:46 +0000 (09:07 -0500)]
Limit talloc report depth

So that we don't blow up on talloc loops. Which shouldn't happen.

9 years agouse separate definitions and declarations for mod_* functions in rlm_sql
Arran Cudbard-Bell [Thu, 5 Mar 2015 04:56:14 +0000 (23:56 -0500)]
use separate definitions and declarations for mod_* functions in rlm_sql

9 years agorlm_sql should return noop if we can't find a matching query section
Arran Cudbard-Bell [Thu, 5 Mar 2015 04:45:51 +0000 (23:45 -0500)]
rlm_sql should return noop if we can't find a matching query section

9 years agoOnly print cleanup messages if a message about the request was logged
Arran Cudbard-Bell [Thu, 5 Mar 2015 03:35:25 +0000 (22:35 -0500)]
Only print cleanup messages if a message about the request was logged

9 years agoFix @return in tmpl_*expand
Arran Cudbard-Bell [Thu, 5 Mar 2015 03:33:48 +0000 (22:33 -0500)]
Fix @return in tmpl_*expand

9 years agoReturn int not bool for all tmpl functions
Arran Cudbard-Bell [Thu, 5 Mar 2015 01:35:24 +0000 (20:35 -0500)]
Return int not bool for all tmpl functions

9 years agoMinor corrections
Arran Cudbard-Bell [Thu, 5 Mar 2015 00:31:40 +0000 (19:31 -0500)]
Minor corrections

9 years agoComplete documentation for templates
Arran Cudbard-Bell [Wed, 4 Mar 2015 23:47:20 +0000 (18:47 -0500)]
Complete documentation for templates

9 years agotmpl_free function is no longer needed, as value_pair_tmpl_t have an internal buffer...
Arran Cudbard-Bell [Wed, 4 Mar 2015 19:00:47 +0000 (14:00 -0500)]
tmpl_free function is no longer needed, as value_pair_tmpl_t have an internal buffer for storing unknown attributes.

9 years agoExample virtual server which does challenge / response
Alan T. DeKok [Wed, 4 Mar 2015 22:08:32 +0000 (17:08 -0500)]
Example virtual server which does challenge / response

9 years agoDon't put state vps until we're in post-auth
Alan T. DeKok [Wed, 4 Mar 2015 22:05:39 +0000 (17:05 -0500)]
Don't put state vps until we're in post-auth

9 years agoClean up proxy state machine
Alan T. DeKok [Wed, 4 Mar 2015 18:18:43 +0000 (13:18 -0500)]
Clean up proxy state machine

Encode the proxied packet && debug print it before changing
request->process or request->child_state.

set request->process = proxy_wait_for_reply just prior to
proxying the packet.

Clean up the timer code to not muck with request->process
in PROXIED state.  It MUST be already set to a useful value.

When we get PROXY_REPLY in wait_for_reply, we queue up the
"running" function.

9 years agoTYPDEF_HIDES_STRUCT breaks the doc build on Linux
Arran Cudbard-Bell [Wed, 4 Mar 2015 15:29:10 +0000 (10:29 -0500)]
TYPDEF_HIDES_STRUCT breaks the doc build on Linux

9 years agonote recent changes
Alan T. DeKok [Wed, 4 Mar 2015 15:29:31 +0000 (10:29 -0500)]
note recent changes

9 years agoUpdate assertions
Alan T. DeKok [Wed, 4 Mar 2015 15:07:33 +0000 (10:07 -0500)]
Update assertions

9 years agoMerge pull request #918 from nchaigne/3.0.x-fb2
Alan DeKok [Wed, 4 Mar 2015 15:02:30 +0000 (10:02 -0500)]
Merge pull request #918 from nchaigne/3.0.x-fb2

Allow to set DHCP packet code from input VPs

9 years agoConvert explicit frees to asserts that the parents are correct
Alan T. DeKok [Wed, 4 Mar 2015 14:50:34 +0000 (09:50 -0500)]
Convert explicit frees to asserts that the parents are correct

Because the talloc hierarchy should be correct, which means that
talloc should clean everything up

9 years agoMake tls_new_client_session() take talloc_ctx
Alan T. DeKok [Wed, 4 Mar 2015 14:47:06 +0000 (09:47 -0500)]
Make tls_new_client_session() take talloc_ctx

and pass in correct ctx so we don't leak memory

9 years agoPass "sock" as talloc ctx instead of stealing to sock
Alan T. DeKok [Wed, 4 Mar 2015 14:46:36 +0000 (09:46 -0500)]
Pass "sock" as talloc ctx instead of stealing to sock

9 years agoAllow to set DHCP packet code from input VPs
Nicolas C [Wed, 4 Mar 2015 10:30:07 +0000 (11:30 +0100)]
Allow to set DHCP packet code from input VPs

The command argument is now optional, and can also be 'auto'.
In this case, the packet code must be specified in the value pairs
provided as input (either from DHCP-Message-Type, or Packet-Code).

(This also fixes the segfault that occured if command was ommited)

9 years agoCONF_PARSER docs
Arran Cudbard-Bell [Tue, 3 Mar 2015 21:11:07 +0000 (16:11 -0500)]
CONF_PARSER docs

9 years agoDocument more macros
Arran Cudbard-Bell [Tue, 3 Mar 2015 20:37:53 +0000 (15:37 -0500)]
Document more macros

9 years agoDocument CONF_PAIR
Arran Cudbard-Bell [Tue, 3 Mar 2015 20:06:44 +0000 (15:06 -0500)]
Document CONF_PAIR

9 years agoDoxygen
Arran Cudbard-Bell [Tue, 3 Mar 2015 19:54:36 +0000 (14:54 -0500)]
Doxygen

9 years agoUse the default value (if available) when processing PW_TYPE_TMPL items Fixes #916
Arran Cudbard-Bell [Tue, 3 Mar 2015 18:39:53 +0000 (13:39 -0500)]
Use the default value (if available) when processing PW_TYPE_TMPL items Fixes #916

9 years agoDocument cf_item_parse
Arran Cudbard-Bell [Tue, 3 Mar 2015 18:39:09 +0000 (13:39 -0500)]
Document cf_item_parse

9 years agoMore documentation for tmpl_afrom_str
Arran Cudbard-Bell [Tue, 3 Mar 2015 18:03:34 +0000 (13:03 -0500)]
More documentation for tmpl_afrom_str

9 years agoDocumentation
Arran Cudbard-Bell [Tue, 3 Mar 2015 18:03:15 +0000 (13:03 -0500)]
Documentation

9 years agoCall VERIFY_TMPL before accessing tmpl fields
Arran Cudbard-Bell [Tue, 3 Mar 2015 18:03:07 +0000 (13:03 -0500)]
Call VERIFY_TMPL before accessing tmpl fields

9 years agoAssert we have a tmpl in verify_tmpl
Arran Cudbard-Bell [Tue, 3 Mar 2015 18:02:49 +0000 (13:02 -0500)]
Assert we have a tmpl in verify_tmpl

9 years agoMerge pull request #915 from nchaigne/3.0.x-fb1
Arran Cudbard-Bell [Tue, 3 Mar 2015 15:46:39 +0000 (10:46 -0500)]
Merge pull request #915 from nchaigne/3.0.x-fb1

Don't wait for a reply to DHCP release and decline

9 years agoSeperate messages for invalid packet and unknown types
Alan T. DeKok [Tue, 3 Mar 2015 15:10:23 +0000 (10:10 -0500)]
Seperate messages for invalid packet and unknown types

9 years agoMisplaced increment
Arran Cudbard-Bell [Tue, 3 Mar 2015 14:39:56 +0000 (09:39 -0500)]
Misplaced increment

9 years agoAdd missing line
Alan T. DeKok [Tue, 3 Mar 2015 12:35:10 +0000 (07:35 -0500)]
Add missing line

9 years agoDon't wait for a reply to DHCP release and decline
Nicolas C [Tue, 3 Mar 2015 08:52:48 +0000 (09:52 +0100)]
Don't wait for a reply to DHCP release and decline

DHCP release and decline never get a reply, so don't wait for one.

Also I defined the requests types in a FR_NAME_NUMBER array (as is done
in radclient).
And I removed the "offer" command (because this is a response sent back
from the server, not something a client sends).

9 years agoDocument more clients code
Arran Cudbard-Bell [Tue, 3 Mar 2015 05:26:32 +0000 (00:26 -0500)]
Document more clients code

9 years ago!TAG_EQ fix here, too
Alan T. DeKok [Tue, 3 Mar 2015 00:29:23 +0000 (19:29 -0500)]
!TAG_EQ fix here, too

9 years agoUpdate ChangeLog
Arran Cudbard-Bell [Mon, 2 Mar 2015 23:40:43 +0000 (18:40 -0500)]
Update ChangeLog

9 years agoUpdate ChangeLog
Arran Cudbard-Bell [Mon, 2 Mar 2015 23:40:31 +0000 (18:40 -0500)]
Update ChangeLog

9 years agoAdd bulk clients templates to couchbase
Arran Cudbard-Bell [Mon, 2 Mar 2015 23:15:41 +0000 (18:15 -0500)]
Add bulk clients templates to couchbase

9 years agoFix couchbase issues thrown up by clang
Arran Cudbard-Bell [Mon, 2 Mar 2015 23:11:58 +0000 (18:11 -0500)]
Fix couchbase issues thrown up by clang

9 years agoAdd support for bulk client templates
Arran Cudbard-Bell [Mon, 2 Mar 2015 22:27:31 +0000 (17:27 -0500)]
Add support for bulk client templates

9 years agoFormatting
Arran Cudbard-Bell [Mon, 2 Mar 2015 22:16:53 +0000 (17:16 -0500)]
Formatting

9 years agonote recent changes
Alan T. DeKok [Mon, 2 Mar 2015 19:03:33 +0000 (14:03 -0500)]
note recent changes

9 years agoLog message should print the virtual server name
Alan T. DeKok [Mon, 2 Mar 2015 19:00:52 +0000 (14:00 -0500)]
Log message should print the virtual server name

9 years agoCopy tags if equal
Alan T. DeKok [Mon, 2 Mar 2015 18:57:13 +0000 (13:57 -0500)]
Copy tags if equal

9 years agoTweak priorities
Alan T. DeKok [Mon, 2 Mar 2015 18:37:37 +0000 (13:37 -0500)]
Tweak priorities

4 is more important than 1

9 years agoUpdate comments in code for clarity
Alan T. DeKok [Mon, 2 Mar 2015 18:22:03 +0000 (13:22 -0500)]
Update comments in code for clarity

9 years agoRemove unnecessary debug messages in request_done()
Alan T. DeKok [Mon, 2 Mar 2015 18:07:24 +0000 (13:07 -0500)]
Remove unnecessary debug messages in request_done()

9 years agoRe-parent the packet to NULL after initial TLS setup
Alan T. DeKok [Mon, 2 Mar 2015 18:07:06 +0000 (13:07 -0500)]
Re-parent the packet to NULL after initial TLS setup

9 years agoAllocate request from the correct context
Alan T. DeKok [Mon, 2 Mar 2015 18:06:25 +0000 (13:06 -0500)]
Allocate request from the correct context

9 years agoUpdate names to be consistent
Sam Hartman [Mon, 2 Mar 2015 17:53:46 +0000 (12:53 -0500)]
Update names to be consistent

Between 3.0.6 and 3.0.7 the home_server changed field names to use
log_name rather than hostname.  Update to be consistent.

9 years agoClean up the request before logging anything
Alan T. DeKok [Mon, 2 Mar 2015 14:22:49 +0000 (09:22 -0500)]
Clean up the request before logging anything

9 years agoFix typo
Alan T. DeKok [Mon, 2 Mar 2015 12:34:26 +0000 (07:34 -0500)]
Fix typo

9 years agoAdd license
Alan T. DeKok [Sun, 1 Mar 2015 15:03:51 +0000 (10:03 -0500)]
Add license

9 years agoTaken from vmpsd on sourceforge, under the GPLv2
Alan T. DeKok [Sun, 1 Mar 2015 15:02:09 +0000 (10:02 -0500)]
Taken from vmpsd on sourceforge, under the GPLv2

9 years agonote recent changes
Alan T. DeKok [Sun, 1 Mar 2015 14:59:18 +0000 (09:59 -0500)]
note recent changes

9 years agoEncode / decode ethernet data types
Alan T. DeKok [Sun, 1 Mar 2015 14:56:23 +0000 (09:56 -0500)]
Encode / decode ethernet data types

9 years agoChange priorities of Auth-Type sections. Fixes #914
Alan T. DeKok [Sat, 28 Feb 2015 20:39:50 +0000 (15:39 -0500)]
Change priorities of Auth-Type sections.  Fixes #914

Based on authorize, but now different.  The priorities are
from high to low:

notfound, ok, noop, updated

So that any module return "notfound" means failure.
But noop and "updated" are lower priority than "ok"

9 years agoRemove "append". It was never used for anything
Alan T. DeKok [Sat, 28 Feb 2015 17:30:39 +0000 (12:30 -0500)]
Remove "append".  It was never used for anything

Or documented.  Code which has been unused for 16 years
can probably be deleted

9 years agouse v3 syntax for update statements
Alan T. DeKok [Fri, 27 Feb 2015 22:50:43 +0000 (17:50 -0500)]
use v3 syntax for update statements

9 years agofr_pton returns -1 on error
Arran Cudbard-Bell [Sat, 28 Feb 2015 16:27:40 +0000 (11:27 -0500)]
fr_pton returns -1 on error

9 years agoAttribute constants in rlm_wimax
Matthew Newton [Fri, 27 Feb 2015 23:32:33 +0000 (23:32 +0000)]
Attribute constants in rlm_wimax

9 years agoUse constants instead of hardcoded numbers
Matthew Newton [Fri, 27 Feb 2015 23:26:06 +0000 (23:26 +0000)]
Use constants instead of hardcoded numbers

9 years agoWe don't always have the original request
Arran Cudbard-Bell [Fri, 27 Feb 2015 20:50:43 +0000 (15:50 -0500)]
We don't always have the original request

9 years agonote recent changes
Alan T. DeKok [Fri, 27 Feb 2015 18:24:12 +0000 (13:24 -0500)]
note recent changes

9 years agoDoxygen
Alan T. DeKok [Fri, 27 Feb 2015 18:24:05 +0000 (13:24 -0500)]
Doxygen

9 years agoAdd _fr_talloc_fault_simple to avoid calling the fault handler code entirely unless...
Arran Cudbard-Bell [Fri, 27 Feb 2015 18:17:36 +0000 (13:17 -0500)]
Add _fr_talloc_fault_simple to avoid calling the fault handler code entirely unless a panic_action was registered

9 years agoWe only use an FD for writing panic action log messages
Arran Cudbard-Bell [Fri, 27 Feb 2015 18:06:00 +0000 (13:06 -0500)]
We only use an FD for writing panic action log messages

9 years agoPreserve quotation characters when creating templates
Alan T. DeKok [Fri, 27 Feb 2015 17:59:58 +0000 (12:59 -0500)]
Preserve quotation characters when creating templates

9 years agoFix escaping for once and all.
Alan T. DeKok [Fri, 27 Feb 2015 17:51:16 +0000 (12:51 -0500)]
Fix escaping for once and all.

Simplify value_data_from_str(), and fr_print_string().
Add test cases so that they work.

update parser so that it tells tmpl_afrom_str() that the input
string has already been run through value_data_from_str(), and
that tmp_afrom_str() doesn't need to do that again.

Make tmpl_afrom_str() handle backslashes for the above situation.

Make tmpl_afrom_str() use inlen instead of -1 for name length

9 years agoRegex may be NULL
Alan T. DeKok [Fri, 27 Feb 2015 16:56:47 +0000 (11:56 -0500)]
Regex may be NULL

9 years ago" does 0x0a -> \r. Everything else gets left as-is
Alan T. DeKok [Fri, 27 Feb 2015 14:43:34 +0000 (09:43 -0500)]
" does 0x0a -> \r.  Everything else gets left as-is

9 years agoHandle backslashes better. Fixes #912
Alan T. DeKok [Fri, 27 Feb 2015 14:14:01 +0000 (09:14 -0500)]
Handle backslashes better.  Fixes #912

9 years agoIn radsniff be smarter about which interfaces we try and use when we try and capture...
Arran Cudbard-Bell [Fri, 27 Feb 2015 05:56:06 +0000 (00:56 -0500)]
In radsniff be smarter about which interfaces we try and use when we try and capture on all interfaces

No point in opening interfaces if we don't support the link layer type

9 years agoinitialise dval
Arran Cudbard-Bell [Thu, 26 Feb 2015 23:37:21 +0000 (18:37 -0500)]
initialise dval

9 years agoTypo. Fixes CID 1271634
Arran Cudbard-Bell [Thu, 26 Feb 2015 23:26:12 +0000 (18:26 -0500)]
Typo. Fixes CID 1271634

9 years agoOnly Access-Reject(Reject), COA-NAK, Disconnect-NAK should be treated specially in...
Arran Cudbard-Bell [Thu, 26 Feb 2015 22:25:07 +0000 (17:25 -0500)]
Only Access-Reject(Reject), COA-NAK, Disconnect-NAK should be treated specially in Post-Proxy

9 years agoOnly create Post-Proxy-Attribute if we find a valid value
Arran Cudbard-Bell [Thu, 26 Feb 2015 21:35:15 +0000 (16:35 -0500)]
Only create Post-Proxy-Attribute if we find a valid value

9 years agoAlways register the talloc fault functions
Arran Cudbard-Bell [Thu, 26 Feb 2015 21:34:48 +0000 (16:34 -0500)]
Always register the talloc fault functions

9 years agoAdd control:Post-Proxy-Type back (for backwards compatibility)
Arran Cudbard-Bell [Thu, 26 Feb 2015 19:24:53 +0000 (14:24 -0500)]
Add control:Post-Proxy-Type back (for backwards compatibility)

9 years agoDistinguish soft fails from hard fails.
Alan T. DeKok [Thu, 26 Feb 2015 16:36:44 +0000 (11:36 -0500)]
Distinguish soft fails from hard fails.

So that syntax errors (etc.) are caught early.
Only forward references are dealt with in pass2

9 years agoMake pass2 expansion breadth-first
Alan T. DeKok [Thu, 26 Feb 2015 16:31:26 +0000 (11:31 -0500)]
Make pass2 expansion breadth-first

9 years agoDon't expand variables which are marked as being expanded in pass2
Alan T. DeKok [Thu, 26 Feb 2015 16:26:43 +0000 (11:26 -0500)]
Don't expand variables which are marked as being expanded in pass2

9 years agoNote recent changes
Alan T. DeKok [Thu, 26 Feb 2015 16:14:25 +0000 (11:14 -0500)]
Note recent changes