]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
7 years agowe don't need Post-Auth-Type any more
Alan T. DeKok [Tue, 16 Oct 2018 16:59:49 +0000 (12:59 -0400)] 
we don't need Post-Auth-Type any more

the reply code has already been set by the time we're running
this module.

7 years agosimplify the code now that the old code is gone
Alan T. DeKok [Tue, 16 Oct 2018 16:57:31 +0000 (12:57 -0400)] 
simplify the code now that the old code is gone

7 years agoremove rad_postauth
Alan T. DeKok [Tue, 16 Oct 2018 16:54:07 +0000 (12:54 -0400)] 
remove rad_postauth

7 years agoremove old rad_authenticate code
Alan T. DeKok [Tue, 16 Oct 2018 16:42:22 +0000 (12:42 -0400)] 
remove old rad_authenticate code

7 years agoremove Autz-Type and Autz-Type redo
Alan T. DeKok [Tue, 16 Oct 2018 16:25:40 +0000 (12:25 -0400)] 
remove Autz-Type and Autz-Type redo

It's no longer used

7 years agoremove Connect-Rate comparison registration
Alan T. DeKok [Tue, 16 Oct 2018 14:33:45 +0000 (10:33 -0400)] 
remove Connect-Rate comparison registration

It was wrong and unused.

7 years agoinput is request list, not the attribute we need to compare
Alan T. DeKok [Tue, 16 Oct 2018 14:32:38 +0000 (10:32 -0400)] 
input is request list, not the attribute we need to compare

7 years agoinout is request list, not one attribute
Alan T. DeKok [Tue, 16 Oct 2018 14:20:23 +0000 (10:20 -0400)] 
inout is request list, not one attribute

so if the User-Name field is not at the start of the packet,
rlm_winbind would do bad things.

7 years agoremove "compare" flag.
Alan T. DeKok [Tue, 16 Oct 2018 13:48:03 +0000 (09:48 -0400)] 
remove "compare" flag.

It was only used in a few places, and in the server.  So the flag
shouldn't be universal across all dictionary attributes.

if the admin defines a comparison for a pre-existing attribute,
well, that's something we can catch via other methods

7 years agotests for struct within tlv within struct
Alan T. DeKok [Mon, 15 Oct 2018 17:59:06 +0000 (13:59 -0400)] 
tests for struct within tlv within struct

we can't do structs within structs right now.. that's also dumb,
as the fields could just be flattened

7 years agocanonicalize dictionaries using new format
Alan T. DeKok [Mon, 15 Oct 2018 15:10:00 +0000 (11:10 -0400)] 
canonicalize dictionaries using new format

to allow ".1" which means "child of previous attribute"

7 years agoadd encode / decode tests for structs
Alan T. DeKok [Mon, 15 Oct 2018 15:00:59 +0000 (11:00 -0400)] 
add encode / decode tests for structs

7 years agoallow partial OIDs in ATTRIBUTE definitions
Alan T. DeKok [Mon, 15 Oct 2018 14:56:31 +0000 (10:56 -0400)] 
allow partial OIDs in ATTRIBUTE definitions

in which case the previous attribute is used as the parent.
This makes the dictionaries MUCH simpler.  e.g.

ATTRIBUTE Unit-Struct1 241.247 struct
ATTRIBUTE Unit-Struct1-Int1 .1 integer
ATTRIBUTE Unit-Struct1-Int2 .2 integer
ATTRIBUTE Unit-Struct1-Short .3 uint16
ATTRIBUTE Unit-Struct1-String .4 string

7 years agoadded dictionary
Alan T. DeKok [Mon, 15 Oct 2018 13:15:49 +0000 (09:15 -0400)] 
added dictionary

7 years agoreturn rcode <sigh>
Alan T. DeKok [Sun, 14 Oct 2018 13:22:57 +0000 (09:22 -0400)] 
return rcode <sigh>

WiMAX has "continued" attributes, which means that the decoder
needs to decode *more* data than exists in the current attribute

7 years agoadd PROJECT_NAME to includedir path. Fixes #2331
Alan T. DeKok [Sun, 14 Oct 2018 12:56:34 +0000 (08:56 -0400)] 
add PROJECT_NAME to includedir path.  Fixes #2331

7 years agodecode fields from struct
Alan T. DeKok [Fri, 12 Oct 2018 19:53:20 +0000 (15:53 -0400)] 
decode fields from struct

7 years agoMerge pull request #2330 from z-eos/master
Arran Cudbard-Bell [Fri, 12 Oct 2018 21:31:10 +0000 (17:31 -0400)] 
Merge pull request #2330 from z-eos/master

[proposal] to add LDAP freeradius-radaact.schema

7 years agoAdd files via upload 2330/head
Zeus Panchenko [Fri, 12 Oct 2018 21:27:30 +0000 (00:27 +0300)] 
Add files via upload

7 years agoit's ssize_t
Alan T. DeKok [Fri, 12 Oct 2018 19:28:13 +0000 (15:28 -0400)] 
it's ssize_t

7 years agodecode TLVs after fixed-length structs, too
Alan T. DeKok [Fri, 12 Oct 2018 18:16:17 +0000 (14:16 -0400)] 
decode TLVs after fixed-length structs, too

7 years agoreturn attr_len, not rcode
Alan T. DeKok [Fri, 12 Oct 2018 18:02:53 +0000 (14:02 -0400)] 
return attr_len, not rcode

i.e. even if the called function decodes *less* than the attribute,
we tell the caller that it decoded *all* of the attribute.

This change ensures that if a function partially decodes an attribute,
that the caller will skip *all* of the attribute.  And not start
decoding the next attribute in the middle of the partially decoded
one.

7 years agoencode TLVs as the last field of a struct in RADIUS
Alan T. DeKok [Fri, 12 Oct 2018 14:45:59 +0000 (10:45 -0400)] 
encode TLVs as the last field of a struct in RADIUS

7 years agoclean up the code a bit
Alan T. DeKok [Fri, 12 Oct 2018 14:21:04 +0000 (10:21 -0400)] 
clean up the code a bit

7 years agoclean up the code a bit
Alan T. DeKok [Fri, 12 Oct 2018 13:58:36 +0000 (09:58 -0400)] 
clean up the code a bit

7 years agocreate and export "unknown from network" function
Alan T. DeKok [Fri, 12 Oct 2018 13:51:08 +0000 (09:51 -0400)] 
create and export "unknown from network" function

7 years agouse the correct context for moving output pairs. Fixes #2328
Alan T. DeKok [Thu, 11 Oct 2018 12:31:51 +0000 (08:31 -0400)] 
use the correct context for moving output pairs.  Fixes #2328

7 years agomove encoe struct to common function
Alan T. DeKok [Thu, 11 Oct 2018 19:57:57 +0000 (15:57 -0400)] 
move encoe struct to common function

7 years agoremove tlv_stack from encode_struct
Alan T. DeKok [Thu, 11 Oct 2018 19:53:39 +0000 (15:53 -0400)] 
remove tlv_stack from encode_struct

in preparation for making it a generic function.
After it's a generic function, we can re-add protocol-specific
encoding, with sub-TLVs

7 years agomove struct.[ch] to src/lib/util
Alan T. DeKok [Thu, 11 Oct 2018 19:32:52 +0000 (15:32 -0400)] 
move struct.[ch] to src/lib/util

which is where most things need it to be

7 years agoclean it up to do less work
Alan T. DeKok [Thu, 11 Oct 2018 18:38:21 +0000 (14:38 -0400)] 
clean it up to do less work

7 years agogot to the next VP (but not too far) when encoding structs
Alan T. DeKok [Thu, 11 Oct 2018 18:21:56 +0000 (14:21 -0400)] 
got to the next VP (but not too far) when encoding structs

7 years agomove struct decoding into it's own function
Alan T. DeKok [Thu, 11 Oct 2018 17:58:09 +0000 (13:58 -0400)] 
move struct decoding into it's own function

7 years agowe don't need decoder_ctx for struct
Alan T. DeKok [Thu, 11 Oct 2018 17:46:05 +0000 (13:46 -0400)] 
we don't need decoder_ctx for struct

7 years agoremove RADIUS knowledge from encode_struct
Alan T. DeKok [Thu, 11 Oct 2018 17:44:24 +0000 (13:44 -0400)] 
remove RADIUS knowledge from encode_struct

7 years agostructs which are variable length have "flags.length == 0"
Alan T. DeKok [Thu, 11 Oct 2018 17:22:20 +0000 (13:22 -0400)] 
structs which are variable length have "flags.length == 0"

7 years agomore sanity checking for flags of struct && their entries
Alan T. DeKok [Thu, 11 Oct 2018 17:15:49 +0000 (13:15 -0400)] 
more sanity checking for flags of struct && their entries

7 years agomake decode_struct use standard functions
Alan T. DeKok [Thu, 11 Oct 2018 17:08:26 +0000 (13:08 -0400)] 
make decode_struct use standard functions

and not RADIUS ones.  Struct entries aren't encrypted, they
shouldn't really use RADIUS-specific data types, etc.

7 years agoSilence signed/unsigned warning
Arran Cudbard-Bell [Thu, 11 Oct 2018 16:38:38 +0000 (12:38 -0400)] 
Silence signed/unsigned warning

7 years agoInclude the exec header file
Arran Cudbard-Bell [Thu, 11 Oct 2018 14:26:20 +0000 (10:26 -0400)] 
Include the exec header file

7 years agoRedundant declaration
Arran Cudbard-Bell [Thu, 11 Oct 2018 14:07:36 +0000 (10:07 -0400)] 
Redundant declaration

7 years agos/load/onload due to conflicts with stdatomic.h *sigh*
Arran Cudbard-Bell [Thu, 11 Oct 2018 13:52:35 +0000 (09:52 -0400)] 
s/load/onload due to conflicts with stdatomic.h *sigh*

More header splitting

7 years agonow that we can decode these structs, create them as structs
Alan T. DeKok [Wed, 10 Oct 2018 19:46:44 +0000 (15:46 -0400)] 
now that we can decode these structs, create them as structs

7 years agoallow variable-length fields as the last one in a struct
Alan T. DeKok [Wed, 10 Oct 2018 19:36:07 +0000 (15:36 -0400)] 
allow variable-length fields as the last one in a struct

7 years agoencode structs, too
Alan T. DeKok [Wed, 10 Oct 2018 19:32:43 +0000 (15:32 -0400)] 
encode structs, too

Instead of disallowing structural types and allowing everything
else (i.e. non-value types), we only allow value types, and
disallow everything else

7 years agodecode structs where the last entry is variable length
Alan T. DeKok [Wed, 10 Oct 2018 18:42:23 +0000 (14:42 -0400)] 
decode structs where the last entry is variable length

7 years agostruct children must be numbered consecutively.
Alan T. DeKok [Wed, 10 Oct 2018 17:43:49 +0000 (13:43 -0400)] 
struct children must be numbered consecutively.

We would prefer to not list numbers, but that's life

7 years agofix ethernet to integer conversion
Alan T. DeKok [Wed, 10 Oct 2018 14:23:21 +0000 (10:23 -0400)] 
fix ethernet to integer conversion

we can't really memcpy() an ethernet address to an integer64
attribute, because the address may be in the high bits of the
integer, or in the lowe bits, depending on endian-ness of the
host CPU.

Instead, we manually copy the bytes over, so that we're sure they
end up where we want.  Note that this is the same process used
by fr_value_box_cast_to_ethernet(). i.e. copy to the *low* bytes,
and not to the *high* bytes.

In addition, fix the unit tests to match.  Casting a string type
to ethernet isn't the right thing to do.  With the previous code,
the string type contained an ASCII representation of the ethernet
copied to the high bytes of integer64 and then printed... which
isn't at all anything useful.

The new test case prints ethernet to integer64 type, and then
casts that to ethernet.

If we want to cast from ethernet to string and back, we MUST
just copy the bytes raw / as-is, and *not* convert them to integer

7 years agofix to be pedantically correct
Alan T. DeKok [Wed, 10 Oct 2018 14:17:17 +0000 (10:17 -0400)] 
fix to be pedantically correct

the value in vp_ipaddr is in network order, not host order.
While htonl() and ntohl() are similar, using the right names
is better

7 years agoiuse the correct line number for error messages
Alan T. DeKok [Wed, 10 Oct 2018 14:13:36 +0000 (10:13 -0400)] 
iuse the correct line number for error messages

unlike v3, v4 interpreter line numbers are for the original policy,
not where they are used

7 years agouse consistent names
Alan T. DeKok [Wed, 10 Oct 2018 13:03:43 +0000 (09:03 -0400)] 
use consistent names

7 years agoMore header splitting
Arran Cudbard-Bell [Wed, 10 Oct 2018 07:07:00 +0000 (03:07 -0400)] 
More header splitting

7 years agoMore header splitting
Arran Cudbard-Bell [Tue, 9 Oct 2018 22:15:21 +0000 (15:15 -0700)] 
More header splitting

7 years agoSplit paircmp header out
Arran Cudbard-Bell [Tue, 9 Oct 2018 21:57:48 +0000 (14:57 -0700)] 
Split paircmp header out

7 years agoCherry-pick RHEL sysconfdir fixes from v3.0.x branch
Arran Cudbard-Bell [Tue, 9 Oct 2018 21:07:50 +0000 (14:07 -0700)] 
Cherry-pick RHEL sysconfdir fixes from v3.0.x branch

7 years agoCorrect goto label
Arran Cudbard-Bell [Tue, 9 Oct 2018 19:45:19 +0000 (12:45 -0700)] 
Correct goto label

7 years agoMinor formatting tweaks
Arran Cudbard-Bell [Tue, 9 Oct 2018 19:39:06 +0000 (12:39 -0700)] 
Minor formatting tweaks

7 years agoDecode M3UA_MGMT_ERROR codes, and trigger reset on M3UA_ERR_CODE_REFUSED_MANAGEMENT_B...
Arran Cudbard-Bell [Tue, 9 Oct 2018 19:38:40 +0000 (12:38 -0700)] 
Decode M3UA_MGMT_ERROR codes, and trigger reset on M3UA_ERR_CODE_REFUSED_MANAGEMENT_BLOCKING

7 years agogenerate better error messages
Alan T. DeKok [Sun, 7 Oct 2018 13:41:36 +0000 (09:41 -0400)] 
generate better error messages

7 years agoScript to upload log files to AWS S3 bucket
Arran Cudbard-Bell [Fri, 5 Oct 2018 14:29:50 +0000 (21:29 +0700)] 
Script to upload log files to AWS S3 bucket

7 years agoNeeded here too
Arran Cudbard-Bell [Fri, 5 Oct 2018 10:31:41 +0000 (17:31 +0700)] 
Needed here too

7 years agoSplit regex functions into a separate header
Arran Cudbard-Bell [Fri, 5 Oct 2018 06:47:42 +0000 (13:47 +0700)] 
Split regex functions into a separate header

7 years agoRemove redundant declaration
Arran Cudbard-Bell [Fri, 5 Oct 2018 06:24:03 +0000 (13:24 +0700)] 
Remove redundant declaration

7 years agoMore header fixes for the server library
Arran Cudbard-Bell [Fri, 5 Oct 2018 05:49:45 +0000 (12:49 +0700)] 
More header fixes for the server library

7 years agothis attribute is text, not binary. Fixes #2322
Alan T. DeKok [Thu, 4 Oct 2018 20:00:20 +0000 (16:00 -0400)] 
this attribute is text, not binary.  Fixes #2322

7 years agosimplify code
Alan T. DeKok [Thu, 4 Oct 2018 14:36:26 +0000 (10:36 -0400)] 
simplify code

the buffer almost always shrinks, so just call the function

7 years agoshrink the message, and fix compile warning
Alan T. DeKok [Thu, 4 Oct 2018 14:00:40 +0000 (10:00 -0400)] 
shrink the message, and fix compile warning

7 years agoMinor fixes
Arran Cudbard-Bell [Thu, 4 Oct 2018 13:30:06 +0000 (20:30 +0700)] 
Minor fixes

7 years agoIt's ok for the ctx to be NULL
Arran Cudbard-Bell [Thu, 4 Oct 2018 12:53:06 +0000 (19:53 +0700)] 
It's ok for the ctx to be NULL

7 years agoNo longer used
Arran Cudbard-Bell [Thu, 4 Oct 2018 12:09:36 +0000 (19:09 +0700)] 
No longer used

7 years agoFix PCRE2 version output
Arran Cudbard-Bell [Thu, 4 Oct 2018 10:33:19 +0000 (17:33 +0700)] 
Fix PCRE2 version output

7 years agoDon't leak HMAC_CTXs
Arran Cudbard-Bell [Thu, 4 Oct 2018 02:44:21 +0000 (09:44 +0700)] 
Don't leak HMAC_CTXs

7 years agoRedundant declaration
Arran Cudbard-Bell [Thu, 4 Oct 2018 02:44:03 +0000 (09:44 +0700)] 
Redundant declaration

7 years agoDeclare some structures before includes
Arran Cudbard-Bell [Thu, 4 Oct 2018 02:37:05 +0000 (09:37 +0700)] 
Declare some structures before includes

7 years agoReplace remaining references to mainconfig with main_config
Arran Cudbard-Bell [Wed, 3 Oct 2018 19:39:10 +0000 (02:39 +0700)] 
Replace remaining references to mainconfig with main_config

7 years agoFix redundant declarations
Arran Cudbard-Bell [Wed, 3 Oct 2018 19:37:10 +0000 (02:37 +0700)] 
Fix redundant declarations

7 years agoInclude map.h in LDAP library
Arran Cudbard-Bell [Wed, 3 Oct 2018 19:26:36 +0000 (02:26 +0700)] 
Include map.h in LDAP library

7 years agofinally make thread_instance data for the master IO handler
Alan T. DeKok [Wed, 3 Oct 2018 18:41:10 +0000 (14:41 -0400)] 
finally make thread_instance data for the master IO handler

next step: do it for the rest of the IO modules

7 years agoadded "terminate" command
Alan T. DeKok [Wed, 3 Oct 2018 18:40:47 +0000 (14:40 -0400)] 
added "terminate" command

which stops the server from running

7 years agofix error message
Alan T. DeKok [Wed, 3 Oct 2018 18:37:45 +0000 (14:37 -0400)] 
fix error message

7 years agoadd fr_listen_t -> connected
Alan T. DeKok [Wed, 3 Oct 2018 18:16:49 +0000 (14:16 -0400)] 
add fr_listen_t -> connected

so that the code becomes simpler.

7 years agofix indentation
Alan T. DeKok [Wed, 3 Oct 2018 15:47:47 +0000 (11:47 -0400)] 
fix indentation

which seems to have been largely random

7 years agoadd fr_network_pre_event()
Alan T. DeKok [Wed, 3 Oct 2018 13:14:09 +0000 (09:14 -0400)] 
add fr_network_pre_event()

in order to get the event loop to run through it's work again.
so that the network side can say "hey, there's work to do!"
and then go do it.

7 years agobypass the channels if it's the same thread
Alan T. DeKok [Tue, 2 Oct 2018 17:24:50 +0000 (13:24 -0400)] 
bypass the channels if it's the same thread

this gives it about a 5-10% performance boost in single-threaded
mode.

7 years agoclean up debug3 messages
Alan T. DeKok [Tue, 2 Oct 2018 17:20:17 +0000 (13:20 -0400)] 
clean up debug3 messages

7 years agomove callbacks to "end" structures
Alan T. DeKok [Tue, 2 Oct 2018 17:03:52 +0000 (13:03 -0400)] 
move callbacks to "end" structures

7 years agomove worker side to callbacks, too
Alan T. DeKok [Tue, 2 Oct 2018 16:59:58 +0000 (12:59 -0400)] 
move worker side to callbacks, too

7 years agomove fr_channel_recv_reply() to using callbacks
Alan T. DeKok [Tue, 2 Oct 2018 14:51:54 +0000 (10:51 -0400)] 
move fr_channel_recv_reply() to using callbacks

in preparation for bypassing the atomic queues when both ends
of the channel are in the same thread

7 years agoremember if both ends are in the same thread
Alan T. DeKok [Tue, 2 Oct 2018 14:24:48 +0000 (10:24 -0400)] 
remember if both ends are in the same thread

7 years agorename _master_ to _network_
Alan T. DeKok [Tue, 2 Oct 2018 14:17:16 +0000 (10:17 -0400)] 
rename _master_ to _network_

which is more consistent

7 years agoFirst phase of restructuring server library headers
Arran Cudbard-Bell [Wed, 3 Oct 2018 14:46:47 +0000 (21:46 +0700)] 
First phase of restructuring server library headers

Everything needs to be broken out more as it was with the utility library, expect more commits in the future

7 years agoMerge pull request #2317 from cipherboy/hmac-openssl-master
Arran Cudbard-Bell [Wed, 3 Oct 2018 05:07:51 +0000 (13:07 +0800)] 
Merge pull request #2317 from cipherboy/hmac-openssl-master

HMAC -> OpenSSL against master

7 years agoReplace HMAC-SHA1 implementation with OpenSSL's 2317/head
Alexander Scheel [Fri, 28 Sep 2018 15:03:52 +0000 (11:03 -0400)] 
Replace HMAC-SHA1 implementation with OpenSSL's

If OpenSSL EVP is not found, fallback to internal implementation of
HMAC-SHA1.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
7 years agoReplace HMAC-MD5 implementation with OpenSSL's
Alexander Scheel [Fri, 28 Sep 2018 13:54:46 +0000 (09:54 -0400)] 
Replace HMAC-MD5 implementation with OpenSSL's

If OpenSSL EVP is not found, fallback to internal implementation of
HMAC-MD5.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
7 years agoAdd Moonshot-OTP-Secret attribute definition
Alejandro Perez [Tue, 2 Oct 2018 11:54:26 +0000 (13:54 +0200)] 
Add Moonshot-OTP-Secret attribute definition

7 years agomanual merge of commit b5b27fedba8f
Alan T. DeKok [Tue, 2 Oct 2018 13:48:20 +0000 (09:48 -0400)] 
manual merge of commit b5b27fedba8f

7 years ago"chunk" is unsigned
Alan T. DeKok [Mon, 1 Oct 2018 14:09:51 +0000 (10:09 -0400)] 
"chunk" is unsigned

7 years agoreset "chunk" to ensure we find the correct entry
Alan T. DeKok [Mon, 1 Oct 2018 13:17:16 +0000 (09:17 -0400)] 
reset "chunk" to ensure we find the correct entry

7 years ago"my_bool" isn't in MySQL 8.0
Alan T. DeKok [Mon, 1 Oct 2018 13:11:09 +0000 (09:11 -0400)] 
"my_bool" isn't in MySQL 8.0

but we have "bool"

7 years agoTrim whitespace
Arran Cudbard-Bell [Mon, 1 Oct 2018 05:26:16 +0000 (13:26 +0800)] 
Trim whitespace