freeradius.git
9 years agoUse memmove instead of memcpy. Fixes coverity complaint.
Alan T. DeKok [Mon, 1 Sep 2014 14:37:03 +0000 (10:37 -0400)]
Use memmove instead of memcpy.  Fixes coverity complaint.

But doesn't change anything, because "hdr_len" is always a small
value.  It's just not checked as such, so coverity doesn't pick up
on it

9 years agoRemove old portability cruft
Alan T. DeKok [Sun, 31 Aug 2014 14:30:27 +0000 (10:30 -0400)]
Remove old portability cruft

9 years agoDon't confuse the scanner
Alan T. DeKok [Sun, 31 Aug 2014 14:12:24 +0000 (10:12 -0400)]
Don't confuse the scanner

9 years agovpt may be NULL
Alan T. DeKok [Sun, 31 Aug 2014 14:09:53 +0000 (10:09 -0400)]
vpt may be NULL

9 years agoUse correct name for struct entries
Alan T. DeKok [Sun, 31 Aug 2014 14:05:07 +0000 (10:05 -0400)]
Use correct name for struct entries

9 years agoReturn correct code for error
Alan T. DeKok [Sun, 31 Aug 2014 14:02:09 +0000 (10:02 -0400)]
Return correct code for error

9 years agoFormatting helps
Alan T. DeKok [Sun, 31 Aug 2014 13:54:22 +0000 (09:54 -0400)]
Formatting helps

9 years agoAdded dictionary for RFC 7268
Alan T. DeKok [Sun, 31 Aug 2014 13:50:05 +0000 (09:50 -0400)]
Added dictionary for RFC 7268

9 years agorun ./format.pl
Alan T. DeKok [Sun, 31 Aug 2014 12:50:15 +0000 (08:50 -0400)]
run ./format.pl

9 years agoEnable new dictionaries and fix minor issues
Alan T. DeKok [Sun, 31 Aug 2014 12:49:27 +0000 (08:49 -0400)]
Enable new dictionaries and fix minor issues

9 years agodictionary.trapeze: Add attribute
Mathieu Simon [Sun, 31 Aug 2014 08:36:06 +0000 (10:36 +0200)]
dictionary.trapeze: Add attribute

- Trapeze-Audit seems to be a accounting-only value that
  contains logging data for audit as the attribute says.
- Since MSS software still seems to be developed by Juniper
  add a Juniper reference and remove the mail address as the
  domain redirects to Juniper.com these days.

9 years agoAdd 3 attributes to the Bay dict. (Nortel/Avaya)
Mathieu Simon [Sun, 31 Aug 2014 09:28:27 +0000 (11:28 +0200)]
Add 3 attributes to the Bay dict. (Nortel/Avaya)

Found in the Avaya AAA for ERS and ES Technical Configuration
Guide from 2010 as publicly available at Avaya.

Some attributes have been changed by Avaya but left unchanged here
to not break existing installations.

9 years agodictionary.altiga: Fix small typo & space-to-tab
Mathieu Simon [Sun, 11 May 2014 20:46:38 +0000 (22:46 +0200)]
dictionary.altiga: Fix small typo & space-to-tab

Try unifying mixed usage of spaces and tabs (later seems more common)
then pass with the formatter.

9 years agoAdd newly found attribute to dictionary.telebit
Mathieu Simon [Sun, 9 Feb 2014 09:55:56 +0000 (10:55 +0100)]
Add newly found attribute to dictionary.telebit

Found in: Cisco Prime Access Registrar 6.0.1 Users Guide
Chapter: RADIUS Attributes.

Telebit has been bought quite some time ago, that's why
the references come from Cisco.

9 years agoAdd Ruckus dictionary
Mathieu Simon [Sun, 31 Aug 2014 09:07:46 +0000 (11:07 +0200)]
Add Ruckus dictionary

Compiled out of a Ruckus user guides and tech notes
publicly available on the Ruckus website.

9 years agoAdd Compatible Systems dictionary
Mathieu Simon [Sun, 11 May 2014 20:44:26 +0000 (22:44 +0200)]
Add Compatible Systems dictionary

Add Compatible Systems Corp. dictionary as found in the
Cisco Prime Access Registrar 6.1 User Guide.

Includes historical note about Compatible Systems's acquisition
in case someone is (still) looking for documentation.

9 years agoClarify behavior of inner-tunnel replies
Alan T. DeKok [Sat, 30 Aug 2014 14:34:43 +0000 (10:34 -0400)]
Clarify behavior of inner-tunnel replies

9 years agoMove suppression of debugging messages to a better place. Closes #772
Alan T. DeKok [Sat, 30 Aug 2014 14:08:53 +0000 (10:08 -0400)]
Move suppression of debugging messages to a better place.  Closes #772

vradlog() should always log.  It's static to log.c, so the *callers*
should take care to avoid calling vradlog().

The checks for debugging messages are pushed to radlog(), which
is the external API.

Added a static radlog_always(), which always calls vradlog().
It's just a wrapper to deal with the varargs stuff.

The vradlog_request() function now calls radlog_always(), as
vradlog_request() takes care of checking if debugging is enabled.

9 years agoRemove unnecessary debug message
Alan T. DeKok [Sat, 30 Aug 2014 13:42:09 +0000 (09:42 -0400)]
Remove unnecessary debug message

9 years agoUse memcp for string comparisons to be \0 safe
Arran Cudbard-Bell [Fri, 29 Aug 2014 19:38:08 +0000 (21:38 +0200)]
Use memcp for string comparisons to be \0 safe

9 years agoFew more...
Arran Cudbard-Bell [Fri, 29 Aug 2014 19:34:23 +0000 (21:34 +0200)]
Few more...

9 years agoFixup default virtual servers and policies to use &references
Arran Cudbard-Bell [Fri, 29 Aug 2014 19:26:50 +0000 (21:26 +0200)]
Fixup default virtual servers and policies to use &references

9 years agoEnsure that dictionary.dhcp is loaded
Alan T. DeKok [Fri, 29 Aug 2014 16:30:58 +0000 (12:30 -0400)]
Ensure that dictionary.dhcp is loaded

9 years agoClearer docs for use_tunneled_reply
Alan T. DeKok [Fri, 29 Aug 2014 16:25:56 +0000 (12:25 -0400)]
Clearer docs for use_tunneled_reply

9 years agoDoxygen
Arran Cudbard-Bell [Fri, 29 Aug 2014 16:30:21 +0000 (18:30 +0200)]
Doxygen

9 years agoAs posted to the list
Alan T. DeKok [Fri, 29 Aug 2014 16:15:31 +0000 (12:15 -0400)]
As posted to the list

Conflicts:
share/dictionary.bluecoat

9 years agoUsing attribute references in conditions should allow access to the raw string (witho...
Arran Cudbard-Bell [Fri, 29 Aug 2014 15:14:33 +0000 (17:14 +0200)]
Using attribute references in conditions should allow access to the raw string (without escaping)

9 years agoThe Error-Message is an ASCII string
Alan T. DeKok [Fri, 29 Aug 2014 13:48:38 +0000 (09:48 -0400)]
The Error-Message is an ASCII string

9 years agoMake connection pool sharing messages slightly clearer
Arran Cudbard-Bell [Fri, 29 Aug 2014 13:42:08 +0000 (15:42 +0200)]
Make connection pool sharing messages slightly clearer

9 years agoDo the right chmod
Alan T. DeKok [Fri, 29 Aug 2014 13:18:16 +0000 (09:18 -0400)]
Do the right chmod

9 years agoNote recent changes
Alan T. DeKok [Thu, 28 Aug 2014 19:35:01 +0000 (15:35 -0400)]
Note recent changes

9 years agoAllow 'plain' as a valid WEB API type
Arran Cudbard-Bell [Fri, 29 Aug 2014 10:58:59 +0000 (12:58 +0200)]
Allow 'plain' as a valid WEB API type

9 years agoFix issue in configured 'forced' types
Arran Cudbard-Bell [Fri, 29 Aug 2014 10:55:12 +0000 (12:55 +0200)]
Fix issue in configured 'forced' types

9 years agoPrint out error message returned by the server
Arran Cudbard-Bell [Fri, 29 Aug 2014 10:44:24 +0000 (12:44 +0200)]
Print out error message returned by the server

9 years agoDisable cert validation when pre-establishing connections in rlm_rest
Arran Cudbard-Bell [Fri, 29 Aug 2014 09:38:36 +0000 (11:38 +0200)]
Disable cert validation when pre-establishing connections in rlm_rest

We don't have a valid TLS configuration to use.

libcurl appears to do the right thing, and validate the cert when reconfigured to for subsequent requests.

We tell libcurl to *only* establish the connection and not send any data, so there's no chance of us
leaking sensitive information.

9 years agoAllow comparisons between integers of different size
Alan T. DeKok [Thu, 28 Aug 2014 19:30:24 +0000 (15:30 -0400)]
Allow comparisons between integers of different size

9 years agoWe might have a cast, too
Alan T. DeKok [Thu, 28 Aug 2014 19:05:52 +0000 (15:05 -0400)]
We might have a cast, too

9 years agoAssume that the permissions are correct
Alan T. DeKok [Thu, 28 Aug 2014 18:58:42 +0000 (14:58 -0400)]
Assume that the permissions are correct

9 years agoDocument new rest configuration items
Arran Cudbard-Bell [Thu, 28 Aug 2014 18:51:15 +0000 (20:51 +0200)]
Document new rest configuration items

9 years agoPrint HTTP response on RDEBUG3
Arran Cudbard-Bell [Thu, 28 Aug 2014 17:00:57 +0000 (19:00 +0200)]
Print HTTP response on RDEBUG3

9 years agoDon't convert attributes of incompatible type
Alan T. DeKok [Thu, 28 Aug 2014 16:33:08 +0000 (12:33 -0400)]
Don't convert attributes of incompatible type

9 years agouse the correct struct entries for comparisons
Alan T. DeKok [Thu, 28 Aug 2014 16:11:10 +0000 (12:11 -0400)]
use the correct struct entries for comparisons

9 years agoEnsure that the error message has leading tabs, too.
Alan T. DeKok [Thu, 28 Aug 2014 14:02:46 +0000 (10:02 -0400)]
Ensure that the error message has leading tabs, too.

Just copy them over from the input.  This means that the error
message is lined up with the text we're complaining about

9 years agoJust use "int" for return codes instead of int8_t
Alan T. DeKok [Thu, 28 Aug 2014 13:37:02 +0000 (09:37 -0400)]
Just use "int" for return codes instead of int8_t

9 years agoAdd support for exposing plaintext HTTP response bodies as reply:REST-HTTP-Body
Arran Cudbard-Bell [Thu, 28 Aug 2014 16:22:29 +0000 (18:22 +0200)]
Add support for exposing plaintext HTTP response bodies as reply:REST-HTTP-Body

9 years agoDon't run panic_action if the process is being debugged
Arran Cudbard-Bell [Thu, 28 Aug 2014 15:26:31 +0000 (17:26 +0200)]
Don't run panic_action if the process is being debugged

9 years agoNeed to get the current attribute from the cursor in READ_STATE_ATTR_END state
Arran Cudbard-Bell [Thu, 28 Aug 2014 13:58:07 +0000 (15:58 +0200)]
Need to get the current attribute from the cursor in READ_STATE_ATTR_END state

9 years agoFix JSON encoding, where training '}' may not be written correctly for certain input...
Arran Cudbard-Bell [Thu, 28 Aug 2014 13:31:48 +0000 (15:31 +0200)]
Fix JSON encoding, where training '}' may not be written correctly for certain input buffer lengths

9 years agoMerge pull request #769 from zmousm/debfix/v3.0.x
Arran Cudbard-Bell [Thu, 28 Aug 2014 12:39:30 +0000 (14:39 +0200)]
Merge pull request #769 from zmousm/debfix/v3.0.x

Debian lintian fixes/overrides

9 years agoDetail file writer should always print pairs with '=' operator
Arran Cudbard-Bell [Thu, 28 Aug 2014 12:28:19 +0000 (14:28 +0200)]
Detail file writer should always print pairs with '=' operator

9 years agoDoxygen
Arran Cudbard-Bell [Thu, 28 Aug 2014 12:27:59 +0000 (14:27 +0200)]
Doxygen

9 years agoOverride lintian breaks-without-version, package-relation-with-self,
Zenon Mousmoulas [Sun, 6 Jul 2014 23:06:55 +0000 (02:06 +0300)]
Override lintian breaks-without-version, package-relation-with-self,
python-script-but-no-python-dep on freeradius-config

9 years agoOverride lintian binary-or-shlib-defines-rpath on freeradius (due to
Zenon Mousmoulas [Sun, 6 Jul 2014 23:02:35 +0000 (02:02 +0300)]
Override lintian binary-or-shlib-defines-rpath on freeradius (due to
rlm_python), freeradius-postgresql, freeradius-iodbc

9 years agoFix lintian duplicate-changelog-files
Zenon Mousmoulas [Sun, 6 Jul 2014 22:51:11 +0000 (01:51 +0300)]
Fix lintian duplicate-changelog-files

If we are doing dh_installchangelogs, it seems we need to exclude
the upstream changelog from dh_installdocs so as to not install it
twice.

9 years agoFix lintian binaries-have-file-conflict on libfreeradius-dev
Zenon Mousmoulas [Sun, 6 Jul 2014 22:42:06 +0000 (01:42 +0300)]
Fix lintian binaries-have-file-conflict on libfreeradius-dev

This is clumsy at best. It would not have been necessary if
freeradius "shared" libraries could have a SONAME, ABI etc.
according to Debian policy.

9 years agoFix lintian debhelper-but-no-misc-depends
Zenon Mousmoulas [Sun, 6 Jul 2014 22:38:47 +0000 (01:38 +0300)]
Fix lintian debhelper-but-no-misc-depends

Add ${misc:Depends} to all binary package deps (even though it's
silly for e.g. freeradius-config).

9 years agoAdd tmpl_cursor_next and tmpl_cursor_init which allow iterating over VALUE_PAIRs...
Arran Cudbard-Bell [Wed, 27 Aug 2014 09:41:59 +0000 (11:41 +0200)]
Add tmpl_cursor_next and tmpl_cursor_init which allow iterating over VALUE_PAIRs in the current request with a value_pair_tmpl_t

Rewrite tmpl_copy_vps and tmpl_find_vp to use the new cursor functions.

The iterators are significantly more useful than tmpl_copy_vps or tmpl_find_vp, but those functions
are still quite convenient.

9 years agoInclude trailing zero byte for LEAP
Alan T. DeKok [Wed, 27 Aug 2014 21:49:00 +0000 (17:49 -0400)]
Include trailing zero byte for LEAP

9 years agoWhitespace
Arran Cudbard-Bell [Tue, 26 Aug 2014 15:27:28 +0000 (17:27 +0200)]
Whitespace

9 years agoMissing semicolon
Arran Cudbard-Bell [Tue, 26 Aug 2014 15:27:21 +0000 (17:27 +0200)]
Missing semicolon

9 years agoUpdate freeradius.spec
RoJackal [Tue, 26 Aug 2014 14:44:00 +0000 (17:44 +0300)]
Update freeradius.spec

rlm_rest module needs libcurl-devel package.

9 years agoFixes for previous commit
Arran Cudbard-Bell [Tue, 26 Aug 2014 12:17:26 +0000 (14:17 +0200)]
Fixes for previous commit

9 years agoBreak out validation logic from realm_home_server_add
Arran Cudbard-Bell [Tue, 26 Aug 2014 11:43:26 +0000 (13:43 +0200)]
Break out validation logic from realm_home_server_add

9 years agoSwitch foreach to use tmpl_copy_vp
Arran Cudbard-Bell [Tue, 26 Aug 2014 09:44:15 +0000 (11:44 +0200)]
Switch foreach to use tmpl_copy_vp

We have to fudge the config parser a bit to convert &attrref -> &attrref[*] but it works, and the code is quite a bit nicer.

9 years agoCleanup tmpl function names
Arran Cudbard-Bell [Tue, 26 Aug 2014 09:05:15 +0000 (11:05 +0200)]
Cleanup tmpl function names

9 years agoMissing declaration
Arran Cudbard-Bell [Mon, 25 Aug 2014 16:15:49 +0000 (18:15 +0200)]
Missing declaration

9 years agoNo where else calls the string representation of VALUE_PAIR a pairstr
Arran Cudbard-Bell [Mon, 25 Aug 2014 15:44:15 +0000 (17:44 +0200)]
No where else calls the string representation of VALUE_PAIR a pairstr

9 years agoAdd missed & references in default policies
Arran Cudbard-Bell [Mon, 25 Aug 2014 15:20:36 +0000 (17:20 +0200)]
Add missed & references in default policies

9 years agoAdd event timestamp when preprocess is called in authorize
Arran Cudbard-Bell [Mon, 25 Aug 2014 15:17:28 +0000 (17:17 +0200)]
Add event timestamp when preprocess is called in authorize

9 years agoAdd credits for comp128 v2/v3 code
Arran Cudbard-Bell [Mon, 25 Aug 2014 08:35:04 +0000 (10:35 +0200)]
Add credits for comp128 v2/v3 code

9 years agoAdd debugging policies
Arran Cudbard-Bell [Mon, 25 Aug 2014 08:33:34 +0000 (10:33 +0200)]
Add debugging policies

9 years agoA number of fixes (mainly comments) of rlm_expr release_3_0_4_rc2
Herwin Weststrate [Thu, 14 Aug 2014 11:07:48 +0000 (13:07 +0200)]
A number of fixes (mainly comments) of rlm_expr

* Update the urlunquote example to make it copy-pastable by doubling the %. Add a comment why
* Typo fix: s/wont'/won't/
* Removed UNUSED macro for *instance in (un)escape_xlat, it is being used here
* Fix the unuescape example, the name here should be unescape, not escape
* Added a ":" after "Example" in tolower. This makes it easier to find the examples in this file, since all other examples did this.

9 years agoFixed a typo in a code comment for LM-Response
Herwin Weststrate [Tue, 22 Jul 2014 16:45:11 +0000 (18:45 +0200)]
Fixed a typo in a code comment for LM-Response

9 years agoMerge pull request #758 from spbnick/trigger_max_threads_on_limit
Alan DeKok [Fri, 22 Aug 2014 11:15:37 +0000 (07:15 -0400)]
Merge pull request #758 from spbnick/trigger_max_threads_on_limit

Trigger max_threads upon reaching the limit

9 years agoDefine sig_t for systems without it. Closes #765
Alan T. DeKok [Fri, 22 Aug 2014 10:55:12 +0000 (06:55 -0400)]
Define sig_t for systems without it.  Closes #765

9 years agonote recent changes
Alan T. DeKok [Thu, 21 Aug 2014 11:29:36 +0000 (07:29 -0400)]
note recent changes

9 years agoPassing const to non-const
Alan T. DeKok [Thu, 21 Aug 2014 11:26:33 +0000 (07:26 -0400)]
Passing const to non-const

9 years agoExpand switch arguments once, instead of for each 'case'
Alan T. DeKok [Thu, 21 Aug 2014 10:57:33 +0000 (06:57 -0400)]
Expand switch arguments once, instead of for each 'case'

9 years agoFix error in sqlite3 postauth query
Arran Cudbard-Bell [Wed, 20 Aug 2014 08:27:46 +0000 (15:27 +0700)]
Fix error in sqlite3 postauth query

9 years agoUse "virtual_server", which is correct
Alan T. DeKok [Fri, 15 Aug 2014 13:33:14 +0000 (15:33 +0200)]
Use "virtual_server", which is correct

9 years agoIgnore flags
Alan T. DeKok [Fri, 15 Aug 2014 12:04:44 +0000 (14:04 +0200)]
Ignore flags

9 years agoDocument "pool = ..."
Alan T. DeKok [Fri, 15 Aug 2014 09:19:14 +0000 (11:19 +0200)]
Document "pool = ..."

9 years agoUpdate for new pools
Alan T. DeKok [Fri, 15 Aug 2014 08:50:07 +0000 (10:50 +0200)]
Update for new pools

9 years agoFix paircopyvp, so we don't break xlat expansions
Arran Cudbard-Bell [Thu, 14 Aug 2014 22:23:16 +0000 (18:23 -0400)]
Fix paircopyvp, so we don't break xlat expansions

9 years agoFormatting
Arran Cudbard-Bell [Thu, 14 Aug 2014 22:22:59 +0000 (18:22 -0400)]
Formatting

9 years agoFound should be a bool
Arran Cudbard-Bell [Thu, 14 Aug 2014 22:22:47 +0000 (18:22 -0400)]
Found should be a bool

9 years agoFix section lookup in radwho
Arran Cudbard-Bell [Thu, 14 Aug 2014 21:52:35 +0000 (17:52 -0400)]
Fix section lookup in radwho

9 years agoFixup policies to use attribute references
Arran Cudbard-Bell [Thu, 14 Aug 2014 21:24:47 +0000 (17:24 -0400)]
Fixup policies to use attribute references

9 years agoFix parenting issue in paircmp.c
Arran Cudbard-Bell [Thu, 14 Aug 2014 20:53:12 +0000 (16:53 -0400)]
Fix parenting issue in paircmp.c

9 years agoSoft assert and exit on internal validation error
Arran Cudbard-Bell [Thu, 14 Aug 2014 20:52:34 +0000 (16:52 -0400)]
Soft assert and exit on internal validation error

9 years agoCleanup formatting in rlm_realm
Arran Cudbard-Bell [Thu, 14 Aug 2014 20:12:45 +0000 (16:12 -0400)]
Cleanup formatting in rlm_realm

9 years agoFixup weirdness in couchbase configure.ac
Arran Cudbard-Bell [Thu, 14 Aug 2014 19:02:39 +0000 (15:02 -0400)]
Fixup weirdness in couchbase configure.ac

9 years agoName for stdin should be "-" for backwards compatibility
Arran Cudbard-Bell [Thu, 14 Aug 2014 18:46:49 +0000 (14:46 -0400)]
Name for stdin should be "-" for backwards compatibility

9 years agoMinor fix
Arran Cudbard-Bell [Thu, 14 Aug 2014 02:43:41 +0000 (22:43 -0400)]
Minor fix

9 years agotimestr_match returns int, not uint32_t
Alan T. DeKok [Thu, 14 Aug 2014 15:04:51 +0000 (17:04 +0200)]
timestr_match returns int, not uint32_t

9 years agoRe-arrange code to be cleaner
Alan T. DeKok [Thu, 14 Aug 2014 14:10:08 +0000 (16:10 +0200)]
Re-arrange code to be cleaner

9 years agoNote recent changes
Alan T. DeKok [Thu, 14 Aug 2014 13:55:52 +0000 (15:55 +0200)]
Note recent changes

9 years agoBe more generous about the lack of whitespace
Alan T. DeKok [Thu, 14 Aug 2014 12:52:59 +0000 (14:52 +0200)]
Be more generous about the lack of whitespace

9 years agoSet variable to default value.
Alan T. DeKok [Thu, 14 Aug 2014 11:41:50 +0000 (13:41 +0200)]
Set variable to default value.

9 years agoBuild on FreeBSD
Alan T. DeKok [Thu, 14 Aug 2014 11:40:46 +0000 (13:40 +0200)]
Build on FreeBSD