freeradius.git
8 years agoZero terminate at current position, not at start of buffer
Alan T. DeKok [Fri, 26 Jun 2015 02:08:49 +0000 (22:08 -0400)]
Zero terminate at current position, not at start of buffer

8 years agoRevert "Unecessary fileno(), just do as cf_file_input()"
Alan T. DeKok [Thu, 25 Jun 2015 15:28:37 +0000 (11:28 -0400)]
Revert "Unecessary fileno(), just do as cf_file_input()"

This reverts commit 44fc841929934a55f690422ee1d25c3190c5c900.

stat() is not the same as fstat().  The first one checks a
file which has the same name as the one we opened.  The second
checks the file which we just opened.

The cf_file_input() checks just check if the filename for
security (globally writeable, etc.).  cf_file_open() will
open the file and read it's contents

8 years agonote "break"
Alan T. DeKok [Fri, 26 Jun 2015 01:32:42 +0000 (21:32 -0400)]
note "break"

8 years agoFix CID #1308371
Alan T. DeKok [Fri, 26 Jun 2015 01:32:12 +0000 (21:32 -0400)]
Fix CID #1308371

8 years agoMerge pull request #1070 from jpereira/bug/leak1
Arran Cudbard-Bell [Thu, 25 Jun 2015 20:56:18 +0000 (16:56 -0400)]
Merge pull request #1070 from jpereira/bug/leak1

Was leaking when don't have write permission

8 years agoWas leaking on cf_file_open() when don't have write permission
Jorge Pereira [Thu, 25 Jun 2015 20:52:29 +0000 (17:52 -0300)]
Was leaking on cf_file_open() when don't have write permission

8 years agoWas leaking on cf_file_input() when don't have write permission
Jorge Pereira [Thu, 25 Jun 2015 20:49:31 +0000 (17:49 -0300)]
Was leaking on cf_file_input() when don't have write permission

8 years agoMerge pull request #1044 from geaaru/rlm_sqlippool_mandatory_params
Arran Cudbard-Bell [Thu, 25 Jun 2015 20:05:34 +0000 (16:05 -0400)]
Merge pull request #1044 from geaaru/rlm_sqlippool_mandatory_params

Remove PW_TYPE_REQUIRED flag from some rlm_sqlippool parameters

8 years agoMerge pull request #1069 from jpereira/develop/cereja1
Arran Cudbard-Bell [Thu, 25 Jun 2015 18:21:12 +0000 (14:21 -0400)]
Merge pull request #1069 from jpereira/develop/cereja1

some adjustments for a better error messages.

8 years agoThe fr_strerror() is useless when called by non-library context. better call fr_syser...
Jorge Pereira [Thu, 25 Jun 2015 17:55:23 +0000 (14:55 -0300)]
The fr_strerror() is useless when called by non-library context. better call fr_syserror() when in POSIX contexts, eg: stat()

8 years agoCloses #1068
Arran Cudbard-Bell [Thu, 25 Jun 2015 17:45:39 +0000 (13:45 -0400)]
Closes #1068

8 years agoNo need to print "OK" if we didn't do anything
Alan T. DeKok [Thu, 25 Jun 2015 15:28:55 +0000 (11:28 -0400)]
No need to print "OK" if we didn't do anything

8 years agoActually implement "break".
Alan T. DeKok [Thu, 25 Jun 2015 15:28:37 +0000 (11:28 -0400)]
Actually implement "break".

And add unit tests

8 years agoavoid strings replication
Jorge Pereira [Wed, 24 Jun 2015 19:57:55 +0000 (16:57 -0300)]
avoid strings replication

8 years agoUnecessary fileno(), just do as cf_file_input()
Jorge Pereira [Wed, 24 Jun 2015 18:55:10 +0000 (15:55 -0300)]
Unecessary fileno(), just do as cf_file_input()

8 years agoList one column per line in queries.conf files
Arran Cudbard-Bell [Wed, 24 Jun 2015 15:52:53 +0000 (11:52 -0400)]
List one column per line in queries.conf files

It makes it easier to match columns to values, and means the whitespace remove code functions correctly, and the queries no longer look like something's been taking big bites out of them.

8 years agoDon't need this.
Alan T. DeKok [Wed, 24 Jun 2015 15:51:42 +0000 (11:51 -0400)]
Don't need this.

8 years agoPrint out which type of password we're using
Alan T. DeKok [Wed, 24 Jun 2015 15:18:22 +0000 (11:18 -0400)]
Print out which type of password we're using

8 years agoFix capitalisation
Arran Cudbard-Bell [Wed, 24 Jun 2015 14:39:04 +0000 (10:39 -0400)]
Fix capitalisation

8 years agoUpdate ChangeLog
Arran Cudbard-Bell [Tue, 23 Jun 2015 18:58:42 +0000 (14:58 -0400)]
Update ChangeLog

8 years agoAnother incorrect check for tmpl_from_attr_substr
Arran Cudbard-Bell [Tue, 23 Jun 2015 18:41:25 +0000 (14:41 -0400)]
Another incorrect check for tmpl_from_attr_substr

8 years agoRemove unused assignment
Alan T. DeKok [Tue, 23 Jun 2015 18:15:58 +0000 (14:15 -0400)]
Remove unused assignment

8 years agoRemove unused assignment
Alan T. DeKok [Tue, 23 Jun 2015 18:15:47 +0000 (14:15 -0400)]
Remove unused assignment

8 years agotmpl_from_attr_substr ret = 0 also indicates an error
Arran Cudbard-Bell [Wed, 17 Jun 2015 17:27:29 +0000 (13:27 -0400)]
tmpl_from_attr_substr ret = 0 also indicates an error

8 years agonote recent changes
Alan T. DeKok [Tue, 23 Jun 2015 12:30:09 +0000 (08:30 -0400)]
note recent changes

8 years agoWhoops
Alan T. DeKok [Tue, 23 Jun 2015 12:29:56 +0000 (08:29 -0400)]
Whoops

8 years agoMinor formatting fixes
Arran Cudbard-Bell [Tue, 23 Jun 2015 02:38:59 +0000 (22:38 -0400)]
Minor formatting fixes

8 years agoSlightly more efficient
Arran Cudbard-Bell [Mon, 22 Jun 2015 21:16:21 +0000 (17:16 -0400)]
Slightly more efficient

8 years agoSet X509_V_FLAG_CRL_CHECK_ALL
Alan T. DeKok [Mon, 22 Jun 2015 19:27:10 +0000 (15:27 -0400)]
Set X509_V_FLAG_CRL_CHECK_ALL

8 years agoUse the snake oil CA
Alan T. DeKok [Mon, 22 Jun 2015 01:54:58 +0000 (21:54 -0400)]
Use the snake oil CA

8 years agoChange snake oil certs to example.org, instead of example.com
Alan T. DeKok [Sun, 21 Jun 2015 13:38:58 +0000 (09:38 -0400)]
Change snake oil certs to example.org, instead of example.com

8 years agoSet result to NULL after freeing so we don't get double free
Arran Cudbard-Bell [Mon, 22 Jun 2015 02:28:20 +0000 (22:28 -0400)]
Set result to NULL after freeing so we don't get double free

8 years ago...and tmp_msg needs to be set to NULL too
Arran Cudbard-Bell [Mon, 22 Jun 2015 01:15:05 +0000 (21:15 -0400)]
...and tmp_msg needs to be set to NULL too

8 years agoresult may now be NULL
Arran Cudbard-Bell [Mon, 22 Jun 2015 01:04:47 +0000 (21:04 -0400)]
result may now be NULL

8 years agoMake sure we don't call ldap_result if msgid < 0
Arran Cudbard-Bell [Mon, 22 Jun 2015 00:50:40 +0000 (20:50 -0400)]
Make sure we don't call ldap_result if msgid < 0

8 years agoOnly retrieve result if msgid >= 0
Arran Cudbard-Bell [Sun, 21 Jun 2015 23:38:49 +0000 (19:38 -0400)]
Only retrieve result if msgid >= 0

8 years agoDon't call ldap_result after ldap_sasl_interactive_bind indicates not to continue...
Arran Cudbard-Bell [Sun, 21 Jun 2015 21:25:19 +0000 (17:25 -0400)]
Don't call ldap_result after ldap_sasl_interactive_bind indicates not to continue. There's likely no more data to retrieve, and it causes a timeout error.

8 years agoNow handled by the build system...
Arran Cudbard-Bell [Sun, 21 Jun 2015 19:56:08 +0000 (15:56 -0400)]
Now handled by the build system...

8 years agoMake the SASL code slightly clearer
Arran Cudbard-Bell [Sun, 21 Jun 2015 19:26:39 +0000 (15:26 -0400)]
Make the SASL code slightly clearer

8 years agoPad error codes correctly
Arran Cudbard-Bell [Fri, 19 Jun 2015 21:55:49 +0000 (17:55 -0400)]
Pad error codes correctly

8 years agonote recent changes
Alan T. DeKok [Fri, 19 Jun 2015 21:12:37 +0000 (17:12 -0400)]
note recent changes

8 years agoPut the DB into the sql_sqlite subdirectory
Alan T. DeKok [Fri, 19 Jun 2015 20:41:57 +0000 (16:41 -0400)]
Put the DB into the sql_sqlite subdirectory

8 years agoUse user1, not user2
Alan T. DeKok [Fri, 19 Jun 2015 20:41:40 +0000 (16:41 -0400)]
Use user1, not user2

8 years agoRemove extra field
Alan T. DeKok [Fri, 19 Jun 2015 20:40:25 +0000 (16:40 -0400)]
Remove extra field

8 years agoMake SQL test User-Names unique
Alan T. DeKok [Fri, 19 Jun 2015 20:12:01 +0000 (16:12 -0400)]
Make SQL test User-Names unique

so that we can do "make -j 4" without the tests stomping
on each other

8 years agoThe default printing for attributes is double quotes.
Alan T. DeKok [Fri, 19 Jun 2015 16:15:21 +0000 (12:15 -0400)]
The default printing for attributes is double quotes.

Because now that strings are binary safe, we CANNOT print
attribute contents as single quoted strings.  The single
quoted strings will escape \ and ', and NOTHING else.

When strings contain non-printable data, the only safe
thing is to print them as double quoted strings.

perl -p -i -e "s/ = '([^']+?)'/ = \"\$1\"/g" file...

8 years agoMove virtual re-write to pass2 callback
Alan T. DeKok [Fri, 19 Jun 2015 16:01:49 +0000 (12:01 -0400)]
Move virtual re-write to pass2 callback

So that the main parser has the correct data

8 years agoConvert &Packet-Type to "%{Packet-Type}"
Alan T. DeKok [Fri, 19 Jun 2015 02:43:39 +0000 (22:43 -0400)]
Convert &Packet-Type to "%{Packet-Type}"

Because the xlat will notice that it's a virtual attribute,
and call the expand function.  But the "find attribute in list"
code won't find the virtual attribute.

8 years agoSet node->type
Alan T. DeKok [Fri, 19 Jun 2015 02:40:31 +0000 (22:40 -0400)]
Set node->type

8 years agoMerge pull request #1064 from jpereira/develop_rlm_sql1
Arran Cudbard-Bell [Fri, 19 Jun 2015 02:12:08 +0000 (22:12 -0400)]
Merge pull request #1064 from jpereira/develop_rlm_sql1

Fixing the compilation caused by commit 093a4ac

8 years agoFixing the compilation caused by commit 093a4ac
Jorge Pereira [Fri, 19 Jun 2015 01:56:39 +0000 (22:56 -0300)]
Fixing the compilation caused by commit 093a4ac

8 years agooutput reference name (not the entire line)
Arran Cudbard-Bell [Fri, 19 Jun 2015 00:26:34 +0000 (20:26 -0400)]
output reference name (not the entire line)

8 years agoUse correct type for sql_port
Arran Cudbard-Bell [Fri, 19 Jun 2015 00:25:43 +0000 (20:25 -0400)]
Use correct type for sql_port

8 years agoRestore cached VPs prior to EAP-TLS inner-tunnel method
Alan T. DeKok [Thu, 18 Jun 2015 15:53:34 +0000 (11:53 -0400)]
Restore cached VPs prior to EAP-TLS inner-tunnel method

8 years agoSet persist callbacks only if persist_dir is configured
Alan T. DeKok [Thu, 18 Jun 2015 14:05:40 +0000 (10:05 -0400)]
Set persist callbacks only if persist_dir is configured

8 years agoMake messages clearer
Alan T. DeKok [Thu, 18 Jun 2015 12:03:34 +0000 (08:03 -0400)]
Make messages clearer

8 years agoreturn int
Alan T. DeKok [Thu, 18 Jun 2015 11:43:01 +0000 (07:43 -0400)]
return int

8 years agoMore messages as per last commit
Alan T. DeKok [Thu, 18 Jun 2015 11:19:07 +0000 (07:19 -0400)]
More messages as per last commit

8 years agoMake it clear when we can't cache TLS sessions
Alan T. DeKok [Thu, 18 Jun 2015 11:08:11 +0000 (07:08 -0400)]
Make it clear when we can't cache TLS sessions

8 years agoConsistency with radclient
Alan T. DeKok [Wed, 17 Jun 2015 20:17:56 +0000 (16:17 -0400)]
Consistency with radclient

8 years agoRevert "Consistency"
Alan T. DeKok [Wed, 17 Jun 2015 20:17:08 +0000 (16:17 -0400)]
Revert "Consistency"

This reverts commit 874e7f08c295ccba1ff7d60dcfb0c61376d829ef.

8 years agoRemove old note
Alan T. DeKok [Wed, 17 Jun 2015 19:50:15 +0000 (15:50 -0400)]
Remove old note

8 years agoExpose fr_cursor_init with the correct parameters.
Alan T. DeKok [Wed, 17 Jun 2015 19:48:02 +0000 (15:48 -0400)]
Expose fr_cursor_init with the correct parameters.

And some const-correctness fixes.  This means we have compile-time
errors instead of run-time errors, at the cost of some minor
memcpys, which the compiler should optimize out

8 years agoVALUE_PAIR** not VALUE_PAIR*
Alan T. DeKok [Wed, 17 Jun 2015 19:46:05 +0000 (15:46 -0400)]
VALUE_PAIR** not VALUE_PAIR*

8 years agoFix for v3
Alan T. DeKok [Wed, 17 Jun 2015 19:38:04 +0000 (15:38 -0400)]
Fix for v3

8 years agoVALUE_PAIR**, not VALUE_PAIR *
Alan T. DeKok [Wed, 17 Jun 2015 19:36:35 +0000 (15:36 -0400)]
VALUE_PAIR**, not VALUE_PAIR *

8 years agoInitialize the dictionaries via the same method as radclient
Alan T. DeKok [Wed, 17 Jun 2015 19:29:12 +0000 (15:29 -0400)]
Initialize the dictionaries via the same method as radclient

8 years agoConsistency
Alan T. DeKok [Wed, 17 Jun 2015 19:25:01 +0000 (15:25 -0400)]
Consistency

8 years agoUse correct field for accessing date
Arran Cudbard-Bell [Wed, 17 Jun 2015 17:22:32 +0000 (13:22 -0400)]
Use correct field for accessing date

8 years agoAllow casting from date to 64bit integer
Arran Cudbard-Bell [Wed, 17 Jun 2015 17:18:41 +0000 (13:18 -0400)]
Allow casting from date to 64bit integer

8 years agoSet request->timestamp and request->packet->timestamp to a real value (now) in unittest
Arran Cudbard-Bell [Wed, 17 Jun 2015 17:18:28 +0000 (13:18 -0400)]
Set request->timestamp and request->packet->timestamp to a real value (now) in unittest

8 years agoAllow expr to work on attribute refs that may be converted into integers (like IPv4...
Arran Cudbard-Bell [Wed, 17 Jun 2015 17:01:44 +0000 (13:01 -0400)]
Allow expr to work on attribute refs that may be converted into integers (like IPv4 addresses and Date types)

8 years agoAdd pre/post proxy sections
Alan T. DeKok [Wed, 17 Jun 2015 15:21:08 +0000 (11:21 -0400)]
Add pre/post proxy sections

8 years agoBuild with sasl.c if necessary
Alan T. DeKok [Tue, 16 Jun 2015 23:50:01 +0000 (19:50 -0400)]
Build with sasl.c if necessary

8 years agoUpdate ChangeLog
Arran Cudbard-Bell [Tue, 16 Jun 2015 17:37:23 +0000 (13:37 -0400)]
Update ChangeLog

8 years agoBetter debugging messages for TLS session cache && resumption
Alan T. DeKok [Tue, 16 Jun 2015 15:33:42 +0000 (11:33 -0400)]
Better debugging messages for TLS session cache && resumption

8 years agoCorrectly format cache entries. <sigh>
Alan T. DeKok [Tue, 16 Jun 2015 15:19:13 +0000 (11:19 -0400)]
Correctly format cache entries.  <sigh>

8 years agoDon't copy the VPs when we can just move them
Alan T. DeKok [Tue, 16 Jun 2015 14:23:28 +0000 (10:23 -0400)]
Don't copy the VPs when we can just move them

8 years agoAdd WITH_ACCOUNTING to accounting code
Alan T. DeKok [Mon, 15 Jun 2015 21:07:32 +0000 (17:07 -0400)]
Add WITH_ACCOUNTING to accounting code

8 years agoMore doxygen
Arran Cudbard-Bell [Tue, 16 Jun 2015 03:31:50 +0000 (23:31 -0400)]
More doxygen

8 years agoDoxygen
Arran Cudbard-Bell [Tue, 16 Jun 2015 03:19:02 +0000 (23:19 -0400)]
Doxygen

8 years agoFix for same memory leak in cos_socket_recv
Arran Cudbard-Bell [Tue, 16 Jun 2015 03:01:59 +0000 (23:01 -0400)]
Fix for same memory leak in cos_socket_recv

8 years agoFixes to SASL interactive bind, as posted to the list by Isaac Boukris
Arran Cudbard-Bell [Tue, 16 Jun 2015 02:52:38 +0000 (22:52 -0400)]
Fixes to SASL interactive bind, as posted to the list by Isaac Boukris

8 years agoFix memory leak on malformed or duplicate accounting requests
Arran Cudbard-Bell [Tue, 16 Jun 2015 01:06:40 +0000 (21:06 -0400)]
Fix memory leak on malformed or duplicate accounting requests

8 years agoName the talloc pools
Arran Cudbard-Bell [Mon, 15 Jun 2015 22:11:46 +0000 (18:11 -0400)]
Name the talloc pools

8 years agoFormatting
Arran Cudbard-Bell [Mon, 15 Jun 2015 00:43:33 +0000 (20:43 -0400)]
Formatting

8 years agoMerge pull request #1061 from jpereira/develop-rlm_replicate2
Alan DeKok [Mon, 15 Jun 2015 21:38:58 +0000 (17:38 -0400)]
Merge pull request #1061 from jpereira/develop-rlm_replicate2

rlm_replicate: Fix a wrong pool setting when the packet is COA

8 years agorlm_replicate: Fix a wrong pool setting when the packet is COA
Jorge Pereira [Mon, 15 Jun 2015 21:28:46 +0000 (18:28 -0300)]
rlm_replicate: Fix a wrong pool setting when the packet is COA

8 years agoFree connection handle ctx on error
Arran Cudbard-Bell [Mon, 15 Jun 2015 20:50:35 +0000 (16:50 -0400)]
Free connection handle ctx on error

8 years agoNote recent changes
Alan T. DeKok [Mon, 15 Jun 2015 20:12:23 +0000 (16:12 -0400)]
Note recent changes

8 years agoTweak sqlite error messages
Arran Cudbard-Bell [Mon, 15 Jun 2015 20:09:00 +0000 (16:09 -0400)]
Tweak sqlite error messages

8 years agoPoint to more documentation
Alan T. DeKok [Mon, 15 Jun 2015 20:05:38 +0000 (16:05 -0400)]
Point to more documentation

8 years agoMerge pull request #1059 from jpereira/develop-rlm_replicate1
Arran Cudbard-Bell [Mon, 15 Jun 2015 19:27:54 +0000 (15:27 -0400)]
Merge pull request #1059 from jpereira/develop-rlm_replicate1

rlm_replicate: Added support for the list 'accounting'

8 years agoCheck return codes from functions, as well as the error code associated with a handle...
Arran Cudbard-Bell [Mon, 15 Jun 2015 18:52:56 +0000 (14:52 -0400)]
Check return codes from functions, as well as the error code associated with a handle in sqlite.

8 years agoDisallow "TLV" types to have any data
Alan T. DeKok [Mon, 15 Jun 2015 19:18:54 +0000 (15:18 -0400)]
Disallow "TLV" types to have any data

If created as hex, they either get turned into unknowns
(when they have a bad format), or they get turned into
multiple sub-attrs (when they have a good format)

8 years agotemplates should not create TLV types
Alan T. DeKok [Mon, 15 Jun 2015 19:08:36 +0000 (15:08 -0400)]
templates should not create TLV types

8 years agoPrint out the command we executed when the test failed
Alan T. DeKok [Mon, 15 Jun 2015 19:08:16 +0000 (15:08 -0400)]
Print out the command we executed when the test failed

8 years agoExpose rad_data2vp_tlvs
Alan T. DeKok [Mon, 15 Jun 2015 19:07:52 +0000 (15:07 -0400)]
Expose rad_data2vp_tlvs

8 years agorlm_replicate: Added support for the list 'accounting'
Jorge Pereira [Mon, 15 Jun 2015 18:39:28 +0000 (15:39 -0300)]
rlm_replicate: Added support for the list 'accounting'

8 years agoAlways write the header for the first attr
Alan T. DeKok [Mon, 15 Jun 2015 18:30:22 +0000 (14:30 -0400)]
Always write the header for the first attr