]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agowe cannot use "break" alone inside of a policy
Alan T. DeKok [Thu, 5 Sep 2019 14:02:34 +0000 (10:02 -0400)] 
we cannot use "break" alone inside of a policy

if a policy is largely like a function, then we cannot put a
"foreach" outside of the policy, and then inside of the policy
use "break" to get out of the "foreach" loop

6 years agonote new behavior of "return"
Alan T. DeKok [Thu, 5 Sep 2019 13:55:41 +0000 (09:55 -0400)] 
note new behavior of "return"

6 years agoset and use return point for policies.
Alan T. DeKok [Thu, 5 Sep 2019 13:47:26 +0000 (09:47 -0400)] 
set and use return point for policies.

Pushing a policy onto the stack sets the return_point.

When popping the stack, check for break/return in the child,
and a break/return point in the parent.  If so, stop unwinding
the stack

6 years agodon't set unwind on BREAK
Alan T. DeKok [Thu, 5 Sep 2019 13:45:10 +0000 (09:45 -0400)] 
don't set unwind on BREAK

the previous break / return already set it to break / return.

6 years agocompile policies as UNLANG_TYPE_POLICY
Alan T. DeKok [Thu, 5 Sep 2019 13:44:18 +0000 (09:44 -0400)] 
compile policies as UNLANG_TYPE_POLICY

which is treated the same as GROUP for most purposes.  Except for
"return"

6 years agoprint policies as groups, because they have no g->vpt
Alan T. DeKok [Thu, 5 Sep 2019 13:43:59 +0000 (09:43 -0400)] 
print policies as groups, because they have no g->vpt

6 years agoclarify comments
Alan T. DeKok [Thu, 5 Sep 2019 13:43:35 +0000 (09:43 -0400)] 
clarify comments

6 years agodebug braces for policies.
Alan T. DeKok [Thu, 5 Sep 2019 13:43:08 +0000 (09:43 -0400)] 
debug braces for policies.

Not sure why we have "policy" as a keyword, but whatever

6 years agoadd break_point and return_point to interpreter
Alan T. DeKok [Thu, 5 Sep 2019 12:56:41 +0000 (08:56 -0400)] 
add break_point and return_point to interpreter

top frames are now both, just for sanity.

break points are "foreach" instructions.  Which SHOULD be
verified by the compiler, but it doesn't hurt to have a sanity
check.

return points are (for now) only top frames.  But marking them
up this way means that we may be able to have return points which
are in policies

6 years agoremove debug message
Alan T. DeKok [Thu, 5 Sep 2019 12:35:58 +0000 (08:35 -0400)] 
remove debug message

6 years agoremove debug messages
Alan T. DeKok [Wed, 4 Sep 2019 20:36:40 +0000 (16:36 -0400)] 
remove debug messages

6 years agoTables no longer null terminated
Arran Cudbard-Bell [Wed, 4 Sep 2019 19:51:46 +0000 (15:51 -0400)] 
Tables no longer null terminated

6 years agoAdd openssl-perl as a BuildRequires in the Redhat spec file
Terry Burton [Wed, 4 Sep 2019 17:31:28 +0000 (18:31 +0100)] 
Add openssl-perl as a BuildRequires in the Redhat spec file

Docker crossbuilds are broken because c_rehash is missing. The Docker build
images obtain their package list from the spec file.

6 years agodynamically expand strings as necessary.
Alan T. DeKok [Wed, 4 Sep 2019 19:52:57 +0000 (15:52 -0400)] 
dynamically expand strings as necessary.

This would be a lot easier if cf_expand_variables() took a length
We can add that to the "todo" list

6 years agoif we run out of braces, anything other that ' ' or '{' is bad
Alan T. DeKok [Wed, 4 Sep 2019 19:52:38 +0000 (15:52 -0400)] 
if we run out of braces, anything other that ' ' or '{' is bad

6 years agoparse the text AFTER the input, not after the rhs string
Alan T. DeKok [Wed, 4 Sep 2019 19:52:18 +0000 (15:52 -0400)] 
parse the text AFTER the input, not after the rhs string

6 years agowipe out text as we go back up the stack
Alan T. DeKok [Wed, 4 Sep 2019 19:20:20 +0000 (15:20 -0400)] 
wipe out text as we go back up the stack

6 years agoallow ${...} variable definitions in tmpl_preparse()
Alan T. DeKok [Wed, 4 Sep 2019 19:15:40 +0000 (15:15 -0400)] 
allow ${...} variable definitions in tmpl_preparse()

which is the simplest way of dealing with this issue.

6 years agoadd parameters in preparation for local variable expansion
Alan T. DeKok [Wed, 4 Sep 2019 19:01:36 +0000 (15:01 -0400)] 
add parameters in preparation for local variable expansion

6 years agodon't do two parsing of conditions
Alan T. DeKok [Wed, 4 Sep 2019 18:46:35 +0000 (14:46 -0400)] 
don't do two parsing of conditions

and remove call to cf_expand_variables() from cf_file.c

That expansion should be called from the conditional parser,
which actually understands what it's doing, and when things are done.

6 years agoremove unused flags parameter
Alan T. DeKok [Wed, 4 Sep 2019 18:30:26 +0000 (14:30 -0400)] 
remove unused flags parameter

6 years agoFix request logging
Arran Cudbard-Bell [Wed, 4 Sep 2019 18:21:47 +0000 (14:21 -0400)] 
Fix request logging

6 years agoDon't have radclient.1 anymore
Arran Cudbard-Bell [Wed, 4 Sep 2019 17:38:58 +0000 (13:38 -0400)] 
Don't have radclient.1 anymore

6 years agoREADME.md no longer exists...
Arran Cudbard-Bell [Wed, 4 Sep 2019 17:32:29 +0000 (13:32 -0400)] 
README.md no longer exists...

6 years agoOne log level global to rule them all...
Arran Cudbard-Bell [Wed, 4 Sep 2019 17:06:41 +0000 (13:06 -0400)] 
One log level global to rule them all...

6 years agoradmin: Fix 'debug level'
Jorge Pereira [Wed, 4 Sep 2019 01:16:59 +0000 (22:16 -0300)] 
radmin: Fix 'debug level'

Missing '\n' output format.

6 years agocheck len, and remove help message. Fixes #2952
Alan T. DeKok [Wed, 4 Sep 2019 02:08:02 +0000 (22:08 -0400)] 
check len, and remove help message.  Fixes #2952

6 years agoradmin: The cmd_copy() returns sszie_t
Jorge Pereira [Tue, 3 Sep 2019 22:10:47 +0000 (19:10 -0300)] 
radmin: The cmd_copy() returns sszie_t

6 years agoallow trailing space for tab completion
Alan T. DeKok [Tue, 3 Sep 2019 21:57:52 +0000 (17:57 -0400)] 
allow trailing space for tab completion

6 years agomash trailing spaces
Alan T. DeKok [Tue, 3 Sep 2019 21:49:18 +0000 (17:49 -0400)] 
mash trailing spaces

6 years agoPut back the subrequest code that allows subrequests to be created programatically
Arran Cudbard-Bell [Tue, 3 Sep 2019 21:16:28 +0000 (17:16 -0400)] 
Put back the subrequest code that allows subrequests to be created programatically

This reverts commit 357946056cd772591084fa1d0e1927abae12918f.

6 years agoremove "WITH_PROXY" in EAP code
Arran Cudbard-Bell [Tue, 3 Sep 2019 20:26:56 +0000 (16:26 -0400)] 
remove "WITH_PROXY" in EAP code

6 years agoRemove reference to request->username
Arran Cudbard-Bell [Tue, 3 Sep 2019 20:31:01 +0000 (16:31 -0400)] 
Remove reference to request->username

6 years agoThis debug info will be printed elsewhere...
Arran Cudbard-Bell [Tue, 3 Sep 2019 20:24:55 +0000 (16:24 -0400)] 
This debug info will be printed elsewhere...

6 years agoDon't return NULL from radmin_help
Arran Cudbard-Bell [Tue, 3 Sep 2019 20:05:55 +0000 (16:05 -0400)] 
Don't return NULL from radmin_help

rl_bind_key says any non-zero return value indicates error

6 years agoFix redundant declarations
Arran Cudbard-Bell [Tue, 3 Sep 2019 20:03:22 +0000 (16:03 -0400)] 
Fix redundant declarations

6 years agoToo soon...
Arran Cudbard-Bell [Tue, 3 Sep 2019 19:50:47 +0000 (15:50 -0400)] 
Too soon...

6 years agoadd partial commands to radmin
Alan T. DeKok [Tue, 3 Sep 2019 19:42:44 +0000 (15:42 -0400)] 
add partial commands to radmin

with tab completion and help

6 years agodon't save exit / quit / secret / etc. in history file
Alan T. DeKok [Tue, 3 Sep 2019 17:57:16 +0000 (13:57 -0400)] 
don't save exit / quit / secret / etc. in history file

6 years agoFix assert in dlist.h
Arran Cudbard-Bell [Tue, 3 Sep 2019 18:53:25 +0000 (14:53 -0400)] 
Fix assert in dlist.h

6 years agoAllow namespaces to be registered for virtual servers
Arran Cudbard-Bell [Tue, 3 Sep 2019 18:25:42 +0000 (14:25 -0400)] 
Allow namespaces to be registered for virtual servers

6 years agos/TLS-Session-Data/Session-Data/ s/TLS-Session-ID/Session-ID/
Arran Cudbard-Bell [Tue, 3 Sep 2019 18:24:09 +0000 (14:24 -0400)] 
s/TLS-Session-Data/Session-Data/ s/TLS-Session-ID/Session-ID/

6 years agoNewlineify module build list
Arran Cudbard-Bell [Tue, 3 Sep 2019 18:01:32 +0000 (14:01 -0400)] 
Newlineify module build list

6 years agoSplit request_data functions out and teach them about parent/child relationships
Arran Cudbard-Bell [Tue, 3 Sep 2019 17:55:28 +0000 (13:55 -0400)] 
Split request_data functions out and teach them about parent/child relationships

6 years agoMore TLS handshake information
Arran Cudbard-Bell [Tue, 3 Sep 2019 18:02:14 +0000 (14:02 -0400)] 
More TLS handshake information

6 years agoUse full paths for headers. This fixes some issues with stale symlinks in package...
Arran Cudbard-Bell [Tue, 3 Sep 2019 17:52:40 +0000 (13:52 -0400)] 
Use full paths for headers.  This fixes some issues with stale symlinks in package build directories, and generally makes things more robust.

6 years agoAdd implementation of memrchr
Arran Cudbard-Bell [Tue, 3 Sep 2019 17:43:50 +0000 (13:43 -0400)] 
Add implementation of memrchr

6 years agoReduce truncation trigger length when printing config files
Arran Cudbard-Bell [Tue, 3 Sep 2019 18:01:51 +0000 (14:01 -0400)] 
Reduce truncation trigger length when printing config files

6 years agoDon't prefix attributes with '&'. Tends to lead to '&&'
Arran Cudbard-Bell [Tue, 3 Sep 2019 18:03:54 +0000 (14:03 -0400)] 
Don't prefix attributes with '&'.  Tends to lead to '&&'

6 years agoradsqlrelay: Remove references to rlm_sql_log
Jorge Pereira [Tue, 3 Sep 2019 11:26:20 +0000 (07:26 -0400)] 
radsqlrelay: Remove references to rlm_sql_log

6 years agoradmin: Add support to keep the history in ~/.radmin_history
Jorge Pereira [Fri, 30 Aug 2019 21:14:41 +0000 (18:14 -0300)] 
radmin: Add support to keep the history in ~/.radmin_history

6 years agoradmin: Fix missing \n
Jorge Pereira [Mon, 2 Sep 2019 17:21:12 +0000 (14:21 -0300)] 
radmin: Fix missing \n

6 years agoRevert "...and some more"
Arran Cudbard-Bell [Mon, 2 Sep 2019 16:07:15 +0000 (12:07 -0400)] 
Revert "...and some more"

This reverts commit 087cb06426b2b5a6e696d80f6cd5f3713b5aa375.

6 years agoREADME: fix link to Network RADIUS
Koichiro IWAO [Mon, 2 Sep 2019 10:24:05 +0000 (19:24 +0900)] 
README: fix link to Network RADIUS

SSL certificate is not issued to www.networkradius.com but
networkradius.org. Link to www.networkradius.com will cause SSL
certificate verification failure.

6 years ago...and some more
Arran Cudbard-Bell [Mon, 2 Sep 2019 04:35:59 +0000 (00:35 -0400)] 
...and some more

6 years agoStart removing stupid inst->name boilerplate from all the modules
Arran Cudbard-Bell [Mon, 2 Sep 2019 03:59:55 +0000 (23:59 -0400)] 
Start removing stupid inst->name boilerplate from all the modules

6 years agoPrint what password we're going to be using and what type of password it is
Arran Cudbard-Bell [Mon, 2 Sep 2019 02:57:32 +0000 (22:57 -0400)] 
Print what password we're going to be using and what type of password it is

6 years agoBuild utility code for eap_pwd.c
Arran Cudbard-Bell [Sat, 31 Aug 2019 02:35:47 +0000 (22:35 -0400)] 
Build utility code for eap_pwd.c

6 years agoCall password_find function in rlm_eap_md5 and rlm_eap_pwd
Arran Cudbard-Bell [Fri, 30 Aug 2019 21:28:33 +0000 (17:28 -0400)] 
Call password_find function in rlm_eap_md5 and rlm_eap_pwd

6 years agoChap doesn't need normalise, as we don't try to normalise cleartext passwords
Arran Cudbard-Bell [Fri, 30 Aug 2019 21:27:59 +0000 (17:27 -0400)] 
Chap doesn't need normalise, as we don't try to normalise cleartext passwords

6 years agoAdd all.mk for EAP-PWD
Arran Cudbard-Bell [Fri, 30 Aug 2019 21:26:39 +0000 (17:26 -0400)] 
Add all.mk for EAP-PWD

6 years agoradmin: The 'stats memory <option>' needs the server started with '-M'
Jorge Pereira [Fri, 30 Aug 2019 20:15:28 +0000 (17:15 -0300)] 
radmin: The 'stats memory <option>' needs the server started with '-M'

therefore, let the use aware of it instead of see '0' values.

6 years agos/fr_skip_spaces/fr_skip_whitespace/
Arran Cudbard-Bell [Fri, 30 Aug 2019 20:07:52 +0000 (16:07 -0400)] 
s/fr_skip_spaces/fr_skip_whitespace/

6 years agoMore whitespace macros
Arran Cudbard-Bell [Fri, 30 Aug 2019 20:06:20 +0000 (16:06 -0400)] 
More whitespace macros

6 years agoFix fr_fprintf() to use the file stream instead of fd
Jorge Pereira [Fri, 30 Aug 2019 18:41:29 +0000 (15:41 -0300)] 
Fix fr_fprintf() to use the file stream instead of fd

Just use the fputs() instead of get the fileno()/write()

6 years agoClean up
Jorge Pereira [Fri, 30 Aug 2019 18:28:34 +0000 (15:28 -0300)] 
Clean up

6 years agouse get_inst() function, which does the right thing
Alan T. DeKok [Fri, 30 Aug 2019 17:45:34 +0000 (13:45 -0400)] 
use get_inst() function, which does the right thing

6 years agoSQLite: Don't require a lease to have expired if we reallocate it to the previous...
Terry Burton [Fri, 30 Aug 2019 14:59:16 +0000 (15:59 +0100)] 
SQLite: Don't require a lease to have expired if we reallocate it to the previous client

The current default allocate_find query causes per-client IP allocation
instability that starts when allocate_clear rate limiting comes into
effect.

With initial pool conditions the default alloc_find query selects from
the pool of all *expired* leases. It selects the least recently used IP
address (i.e. the one with the oldest expiry_time) unless a matching
username and/or callingstationid exists in the table in which case these
are prioritised in order to issue the client with their previous lease.
Normally picking the least recently used address helps to avoid issuing
the address to a different client, maximising the chance of stickiness,
which is desirable.

However, if a user makes successive authentication attempts whilst
allocate_clear rate limiting is active they are always allocated a
different IP address because their existing address is unavailable (has
not yet expired and has not been explicitly expired by allocate_clear),
with the effect that there are now multiple rows in the table containing
the same pool_key, username and callingstationid.

The normal ordering then has the undesirable effect of ensuring that
successive future IP address selections for the client will flip-flop
between addresses because username + callingstationid are first
prioritied then the *oldest expiry_time* is chosen (rather than the most
recent expiry relating to the most recent lease). This behaviour
persists once allocate_clear rate limiting is no longer in effect.

We can avoid getting having multiple rows with the same client details
by amending the allocate_find query to include an existing row matching
nasipaddress and pool_key in the available set of IP addreses regardless
of whether the lease has expired or not (i.e. re-allocation of a current
lease to the same client).

6 years agoOracle: Don't require a lease to have expired if we reallocate it to the previous...
Terry Burton [Fri, 30 Aug 2019 14:58:48 +0000 (15:58 +0100)] 
Oracle: Don't require a lease to have expired if we reallocate it to the previous client

The current default allocate_find query causes per-client IP allocation
instability that starts when allocate_clear rate limiting comes into
effect.

With initial pool conditions the default alloc_find query selects from
the pool of all *expired* leases. It selects the least recently used IP
address (i.e. the one with the oldest expiry_time) unless a matching
username and/or callingstationid exists in the table in which case these
are prioritised in order to issue the client with their previous lease.
Normally picking the least recently used address helps to avoid issuing
the address to a different client, maximising the chance of stickiness,
which is desirable.

However, if a user makes successive authentication attempts whilst
allocate_clear rate limiting is active they are always allocated a
different IP address because their existing address is unavailable (has
not yet expired and has not been explicitly expired by allocate_clear),
with the effect that there are now multiple rows in the table containing
the same pool_key, username and callingstationid.

The normal ordering then has the undesirable effect of ensuring that
successive future IP address selections for the client will flip-flop
between addresses because username + callingstationid are first
prioritied then the *oldest expiry_time* is chosen (rather than the most
recent expiry relating to the most recent lease). This behaviour
persists once allocate_clear rate limiting is no longer in effect.

We can avoid getting having multiple rows with the same client details
by amending the allocate_find query to include an existing row matching
nasipaddress and pool_key in the available set of IP addreses regardless
of whether the lease has expired or not (i.e. re-allocation of a current
lease to the same client).

6 years agoMySQL: Don't require a lease to have expired if we reallocate it to the previous...
Terry Burton [Fri, 30 Aug 2019 14:58:12 +0000 (15:58 +0100)] 
MySQL: Don't require a lease to have expired if we reallocate it to the previous client

The current default allocate_find query causes per-client IP allocation
instability that starts when allocate_clear rate limiting comes into
effect.

With initial pool conditions the default alloc_find query selects from
the pool of all *expired* leases. It selects the least recently used IP
address (i.e. the one with the oldest expiry_time) unless a matching
username and/or callingstationid exists in the table in which case these
are prioritised in order to issue the client with their previous lease.
Normally picking the least recently used address helps to avoid issuing
the address to a different client, maximising the chance of stickiness,
which is desirable.

However, if a user makes successive authentication attempts whilst
allocate_clear rate limiting is active they are always allocated a
different IP address because their existing address is unavailable (has
not yet expired and has not been explicitly expired by allocate_clear),
with the effect that there are now multiple rows in the table containing
the same pool_key, username and callingstationid.

The normal ordering then has the undesirable effect of ensuring that
successive future IP address selections for the client will flip-flop
between addresses because username + callingstationid are first
prioritied then the *oldest expiry_time* is chosen (rather than the most
recent expiry relating to the most recent lease). This behaviour
persists once allocate_clear rate limiting is no longer in effect.

We can avoid getting having multiple rows with the same client details
by amending the allocate_find query to include an existing row matching
nasipaddress and pool_key in the available set of IP addreses regardless
of whether the lease has expired or not (i.e. re-allocation of a current
lease to the same client).

6 years agochild is NULL for master IO handler
Alan T. DeKok [Fri, 30 Aug 2019 15:32:38 +0000 (11:32 -0400)] 
child is NULL for master IO handler

6 years agorename for consistency
Alan T. DeKok [Fri, 30 Aug 2019 15:13:16 +0000 (11:13 -0400)] 
rename for consistency

6 years agoskip NON-SPACE, not skip spaces.
Alan T. DeKok [Fri, 30 Aug 2019 14:59:00 +0000 (10:59 -0400)] 
skip NON-SPACE, not skip spaces.

When making global changes, using "perl -p -i -e s/find/replace/g"
is MUCH safer and MUCH better than using random other tools.

6 years agoset server namespace
Alan T. DeKok [Fri, 30 Aug 2019 14:45:08 +0000 (10:45 -0400)] 
set server namespace

6 years agotypo
Alan T. DeKok [Fri, 30 Aug 2019 12:58:42 +0000 (08:58 -0400)] 
typo

6 years agomove concepts to the concepts directory
Alan T. DeKok [Fri, 30 Aug 2019 12:57:53 +0000 (08:57 -0400)] 
move concepts to the concepts directory

6 years agomove concepts page to concepts directory
Alan T. DeKok [Fri, 30 Aug 2019 12:36:49 +0000 (08:36 -0400)] 
move concepts page to concepts directory

6 years agosmb_ctrl can be NULL
Arran Cudbard-Bell [Fri, 30 Aug 2019 04:54:54 +0000 (00:54 -0400)] 
smb_ctrl can be NULL

6 years agoSplit up mschap challenge processing
Arran Cudbard-Bell [Fri, 30 Aug 2019 01:01:44 +0000 (21:01 -0400)] 
Split up mschap challenge processing

Call central password find function

6 years agoFix crash on failure
Arran Cudbard-Bell [Fri, 30 Aug 2019 00:55:13 +0000 (20:55 -0400)] 
Fix crash on failure

6 years agotypo (#2938)
Jorge Pereira [Thu, 29 Aug 2019 22:42:23 +0000 (19:42 -0300)] 
typo (#2938)

6 years agomore typos
Alan T. DeKok [Thu, 29 Aug 2019 17:27:32 +0000 (13:27 -0400)] 
more typos

6 years agodoc: Add 'update-check.doc' target to update scripts/checks/*.txt db
Jorge Pereira [Thu, 29 Aug 2019 17:12:12 +0000 (14:12 -0300)] 
doc: Add 'update-check.doc' target to update scripts/checks/*.txt db

6 years agomore typos
Alan T. DeKok [Thu, 29 Aug 2019 17:13:03 +0000 (13:13 -0400)] 
more typos

6 years agotypo
Alan T. DeKok [Thu, 29 Aug 2019 17:12:09 +0000 (13:12 -0400)] 
typo

6 years agoremove man pages that no longer exist
Alan T. DeKok [Thu, 29 Aug 2019 17:11:22 +0000 (13:11 -0400)] 
remove man pages that no longer exist

6 years agorlm_lua: Fix 'func_instantiate' and 'func_detach'
Jorge Pereira [Tue, 27 Aug 2019 20:02:06 +0000 (17:02 -0300)] 
rlm_lua: Fix 'func_instantiate' and 'func_detach'

6 years agojust print out each thing as we see it
Alan T. DeKok [Thu, 29 Aug 2019 16:04:04 +0000 (12:04 -0400)] 
just print out each thing as we see it

which makes the output a little harder to read.  But it also
means that the output is organized alphabetically.  And therefore
doesn't change with different hashing methods of the parent shell

6 years agodoc: Add sanity checks to verify if the rlm_$name FR_CONF_ is documented
Jorge Pereira [Fri, 23 Aug 2019 17:47:30 +0000 (14:47 -0300)] 
doc: Add sanity checks to verify if the rlm_$name FR_CONF_ is documented

6 years agoDon't require a lease to have expired if we reallocate it to the previous client
Terry Burton [Wed, 28 Aug 2019 23:33:23 +0000 (00:33 +0100)] 
Don't require a lease to have expired if we reallocate it to the previous client

The current default allocate_find query causes per-client IP allocation
instability that starts when allocate_clear rate limiting comes into effect.

With initial pool conditions the default alloc_find query selects from the pool
of all *expired* leases. It selects the least recently used IP address (i.e.
the one with the oldest expiry_time) unless a matching username and/or
callingstationid exists in the table in which case these are prioritised in
order to issue the client with their previous lease. Normally picking the least
recently used address helps to avoid issuing the address to a different client,
maximising the chance of stickiness, which is desirable.

However, if a user makes successive authentication attempts whilst
allocate_clear rate limiting is active they are always allocated a different IP
address because their existing address is unavailable (has not yet expired and
has not been explicitly expired by allocate_clear), with the effect that there
are now multiple rows in the table containing the same pool_key, username and
callingstationid.

The normal ordering then has the undesirable effect of ensuring that successive
future IP address selections for the client will flip-flop between addresses
because username + callingstationid are first prioritied then the *oldest
expiry_time* is chosen (rather than the most recent expiry relating to the most
recent lease). This behaviour persists once allocate_clear rate limiting is no
longer in effect.

We can avoid getting having multiple rows with the same client details by
amending the allocate_find query to include an existing row matching
nasipaddress and pool_key in the available set of IP addreses regardless of
whether the lease has expired or not (i.e. re-allocation of a current lease to
the same client).

6 years agorlm_chap: Add documentation for 'normalise' (#2934)
Jorge Pereira [Thu, 29 Aug 2019 13:56:01 +0000 (10:56 -0300)] 
rlm_chap: Add documentation for 'normalise' (#2934)

6 years agoMinor behaviour changes in password.c
Arran Cudbard-Bell [Thu, 29 Aug 2019 13:50:27 +0000 (09:50 -0400)] 
Minor behaviour changes in password.c

- Always process Password-With-Header
- Don't require the use of a temporary ctx, and explicitly signal if attributes should be freed after use

6 years agoupdate and clarify
Alan T. DeKok [Thu, 29 Aug 2019 13:17:05 +0000 (09:17 -0400)] 
update and clarify

6 years agouse NUM_ELEMENTS() everywhere
Alan T. DeKok [Thu, 29 Aug 2019 13:02:14 +0000 (09:02 -0400)] 
use NUM_ELEMENTS() everywhere

perl -p -i -e 's,sizeof\(([^)]+)\)\s+/\s+sizeof\([^\[)]+\[0\]\),NUM_ELEMENTS($1),;s,sizeof\(([^)]+)\)\s+/\s+sizeof\(\*[^\[)]+\),NUM_ELEMENTS($1),' $(find src -name "*.c" -print)

Hmm... Perl...

6 years agoword smithing and cleanup
Alan T. DeKok [Thu, 29 Aug 2019 01:23:39 +0000 (21:23 -0400)] 
word smithing and cleanup

6 years agoStupid picky compiler
Arran Cudbard-Bell [Thu, 29 Aug 2019 02:34:57 +0000 (22:34 -0400)] 
Stupid picky compiler

6 years agoSSHA1 available without OpenSSL
Arran Cudbard-Bell [Thu, 29 Aug 2019 02:27:58 +0000 (22:27 -0400)] 
SSHA1 available without OpenSSL

6 years agoInstance is now used in rlm_chap
Arran Cudbard-Bell [Thu, 29 Aug 2019 02:00:34 +0000 (22:00 -0400)] 
Instance is now used in rlm_chap

6 years agoVarious fixes in password.c, rlm_pap and rlm_chap
Arran Cudbard-Bell [Thu, 29 Aug 2019 01:37:08 +0000 (21:37 -0400)] 
Various fixes in password.c, rlm_pap and rlm_chap

- Move password attributes under Password-Root
- Apply tighter bounds checks on hash length in password.c
- Failover between "known good" password types in password.c if one type can't be normalised or is the wrong length.
- Merge password info arrays into one table in password.c
- Provide two public functions in password.c, one provides a cannonical version of a password attribute, the other rewrites all the password attributes in the request->control list to their canonical form.
- s/(S?)SHA-Password/\1SHA1-Password/
- Support multiple levels of preprocessing callbacks
- Support restricting password types password.c can return
- Use Password-Root TLV to be more efficient about locating candidate "known good" passwords (should be MUCH faster, and no longer quadratic).
- Use proper hash length macros in the hash info table in password.c
- Split SHA2-Password and SHA3-Password values into SHA[23]-(224|256|348|512)-Password attributes automatically.
- Provide macro wrappers to allow us to easily add additional EVP based hashing mechanisms.
- Fix pap_auth_func signature so known_good is also constified.
- Prevent normalisation of Cleartext-Password, that's probably always the wrong thing to do.

6 years agoDon't print too much of the salted hash string
Arran Cudbard-Bell [Thu, 29 Aug 2019 01:35:43 +0000 (21:35 -0400)] 
Don't print too much of the salted hash string