]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agorlm_python: Load the libpython using correct extension (#2977)
Jorge Pereira [Thu, 12 Sep 2019 18:03:44 +0000 (15:03 -0300)] 
rlm_python: Load the libpython using correct extension (#2977)

6 years agodon't "goto exit" where exit is "return NULL"
Alan T. DeKok [Thu, 12 Sep 2019 17:21:20 +0000 (13:21 -0400)] 
don't "goto exit" where exit is "return NULL"

6 years agoactually add CC_HINT(nonnull)
Alan T. DeKok [Thu, 12 Sep 2019 17:20:55 +0000 (13:20 -0400)] 
actually add CC_HINT(nonnull)

6 years agoadd CC_HINT(nonnull) to shut up static analyzer
Alan T. DeKok [Thu, 12 Sep 2019 16:58:35 +0000 (12:58 -0400)] 
add CC_HINT(nonnull) to shut up static analyzer

6 years agoallow '@', too
Alan T. DeKok [Thu, 12 Sep 2019 16:07:28 +0000 (12:07 -0400)] 
allow '@', too

6 years agofix canonicalize error function
Alan T. DeKok [Thu, 12 Sep 2019 15:12:43 +0000 (11:12 -0400)] 
fix canonicalize error function

so that it prints the correct thing

6 years agoremove extraneous comments
Alan T. DeKok [Thu, 12 Sep 2019 14:32:04 +0000 (10:32 -0400)] 
remove extraneous comments

6 years agomore fixes for parser
Alan T. DeKok [Thu, 12 Sep 2019 14:23:17 +0000 (10:23 -0400)] 
more fixes for parser

allow more characters
if we don't use regex, treat '/' as a normal string

6 years agoremove unused variable
Alan T. DeKok [Thu, 12 Sep 2019 13:21:44 +0000 (09:21 -0400)] 
remove unused variable

6 years agonope, don't un-escape things ever
Alan T. DeKok [Wed, 11 Sep 2019 23:20:48 +0000 (19:20 -0400)] 
nope, don't un-escape things ever

6 years agoremove last vestige of getstring() etc.
Alan T. DeKok [Wed, 11 Sep 2019 23:15:23 +0000 (19:15 -0400)] 
remove last vestige of getstring() etc.

6 years agoallow cf_get_token() to do escaping or not
Alan T. DeKok [Wed, 11 Sep 2019 19:17:35 +0000 (15:17 -0400)] 
allow cf_get_token() to do escaping or not

it generally escapes names, etc.  But not values

6 years agobetter checks for BARE_WORD strings
Alan T. DeKok [Wed, 11 Sep 2019 20:41:54 +0000 (16:41 -0400)] 
better checks for BARE_WORD strings

which may have ${..} in the middle of them.  The old parser
would just accept anything that wasn't whitespace.  Which would
cause other side-effects.

The updated parser only allows a limited set of characters.  Which
works for all test cases, but which might disallow some corner
cases not tested for.

6 years agoFix calling doc test target in travis.yml
Arran Cudbard-Bell [Wed, 11 Sep 2019 21:30:15 +0000 (16:30 -0500)] 
Fix calling doc test target in travis.yml

6 years agoAways Py_DecRef(inst->module)
Arran Cudbard-Bell [Wed, 11 Sep 2019 20:53:49 +0000 (15:53 -0500)] 
Aways Py_DecRef(inst->module)

6 years agoFix stupid timestamp issue
Arran Cudbard-Bell [Wed, 11 Sep 2019 20:53:34 +0000 (15:53 -0500)] 
Fix stupid timestamp issue

6 years agorlm_python: Fix marked unused complains (#2976)
Jorge Pereira [Wed, 11 Sep 2019 20:34:21 +0000 (17:34 -0300)] 
rlm_python: Fix marked unused complains (#2976)

6 years agocrossbuild: sh needs container up
Matthew Newton [Wed, 11 Sep 2019 20:16:51 +0000 (21:16 +0100)] 
crossbuild: sh needs container up

6 years agoNot this one...
Arran Cudbard-Bell [Wed, 11 Sep 2019 20:07:07 +0000 (15:07 -0500)] 
Not this one...

6 years agoFix tests target names to be les lisfy
Arran Cudbard-Bell [Wed, 11 Sep 2019 20:01:30 +0000 (15:01 -0500)] 
Fix tests target names to be les lisfy

6 years agoMinor fix
Arran Cudbard-Bell [Wed, 11 Sep 2019 19:44:18 +0000 (14:44 -0500)] 
Minor fix

6 years agorlm_python: Add hack to bypass bug with 'pythoh2.7-config' in the OSX (#2975)
Jorge Pereira [Wed, 11 Sep 2019 19:43:08 +0000 (16:43 -0300)] 
rlm_python: Add hack to bypass bug with 'pythoh2.7-config' in the OSX (#2975)

As discussed with Arran. the 'python2.7-config' has a weird bug on the
OSX that if you have CFLAGS="..." declared with whatever content you get
the below behavior.

$ python2.7-config --cflags | grep -o "\-arch [^ ]*"
$ CFLAGS='whatever' python2.7-config --cflags | grep -o "\-arch [^ ]*"
-arch x86_64
-arch i386
$

It results to break the build.

6 years agoCatch more g and w flags
Arran Cudbard-Bell [Wed, 11 Sep 2019 19:35:28 +0000 (14:35 -0500)] 
Catch more g and w flags

6 years agobe more forgiving about break and return
Alan T. DeKok [Wed, 11 Sep 2019 19:05:45 +0000 (15:05 -0400)] 
be more forgiving about break and return

when there are things after them

6 years agomake conditional parser check for regexes, too
Alan T. DeKok [Wed, 11 Sep 2019 16:54:22 +0000 (12:54 -0400)] 
make conditional parser check for regexes, too

if tmpl_preparse() is told to not require a regex, then it should
treat '/' as any other character

6 years agomore separation of logic between CONF_SECTION and CONF_PAIR
Alan T. DeKok [Wed, 11 Sep 2019 02:40:44 +0000 (22:40 -0400)] 
more separation of logic between CONF_SECTION and CONF_PAIR

the rearrangement isn't done yet, but the resulting code is
starting to be more understandable.  Once we separate the
functionality we can start re-doing the parser

6 years agoadded documentation for buildClosures function (#2974)
Matt Rose [Wed, 11 Sep 2019 18:32:11 +0000 (14:32 -0400)] 
added documentation for buildClosures function (#2974)

6 years agoMake rlm_python mostly functional with Python 3
Arran Cudbard-Bell [Wed, 11 Sep 2019 16:00:41 +0000 (11:00 -0500)] 
Make rlm_python mostly functional with Python 3

Only pending issue is the config not being imported correctly into the python environment

6 years agoFix help text
Arran Cudbard-Bell [Wed, 11 Sep 2019 15:54:34 +0000 (10:54 -0500)] 
Fix help text

6 years agoassign to '=' on error
Alan T. DeKok [Wed, 11 Sep 2019 02:38:41 +0000 (22:38 -0400)] 
assign to '=' on error

6 years agoOf course, errors are errors.
Jorge Pereira [Tue, 10 Sep 2019 21:11:08 +0000 (18:11 -0300)] 
Of course, errors are errors.

6 years agoRevert "dict can be NULL. Others can't. Fixes #2971"
Alan T. DeKok [Wed, 11 Sep 2019 01:50:54 +0000 (21:50 -0400)] 
Revert "dict can be NULL.  Others can't.  Fixes #2971"

This reverts commit d4a76e2bcd93b8a155efb834d994925fdb6cb5e6.

6 years agodict can be NULL. Others can't. Fixes #2971
Alan T. DeKok [Wed, 11 Sep 2019 01:47:31 +0000 (21:47 -0400)] 
dict can be NULL.  Others can't.  Fixes #2971

6 years agoFix operator assignment
Arran Cudbard-Bell [Wed, 11 Sep 2019 01:30:19 +0000 (20:30 -0500)] 
Fix operator assignment

6 years agoDefault to internal dictionary if we can't find one in a parent
Arran Cudbard-Bell [Wed, 11 Sep 2019 01:04:21 +0000 (20:04 -0500)] 
Default to internal dictionary if we can't find one in a parent

6 years agos/this/parent/ in cf_file.c because 'this' is a reserved name in lldb
Arran Cudbard-Bell [Wed, 11 Sep 2019 00:55:27 +0000 (19:55 -0500)] 
s/this/parent/ in cf_file.c because 'this' is a reserved name in lldb

6 years agoStart moving things to using the correct logging macro
Arran Cudbard-Bell [Tue, 10 Sep 2019 23:44:28 +0000 (18:44 -0500)] 
Start moving things to using the correct logging macro

This is probably going to be a mostly manual process :(

6 years agoHmm?
Arran Cudbard-Bell [Tue, 10 Sep 2019 23:43:46 +0000 (18:43 -0500)] 
Hmm?

6 years agoQuiet clang scan
Arran Cudbard-Bell [Tue, 10 Sep 2019 23:43:34 +0000 (18:43 -0500)] 
Quiet clang scan

6 years agoStrip -Wall when returned from python-config
Arran Cudbard-Bell [Tue, 10 Sep 2019 23:26:18 +0000 (18:26 -0500)] 
Strip -Wall when returned from python-config

Fix integer widths in rlm_python.c

6 years agoHelps to regenerate the configure script
Arran Cudbard-Bell [Tue, 10 Sep 2019 22:30:35 +0000 (17:30 -0500)] 
Helps to regenerate the configure script

6 years agolineno isn't a pointer...
Arran Cudbard-Bell [Tue, 10 Sep 2019 22:22:31 +0000 (17:22 -0500)] 
lineno isn't a pointer...

6 years agoYet more flag stripping *sigh*
Arran Cudbard-Bell [Tue, 10 Sep 2019 22:07:08 +0000 (17:07 -0500)] 
Yet more flag stripping *sigh*

6 years agomake cf_expand_variables() take lineno instead of *lineno
Alan T. DeKok [Tue, 10 Sep 2019 20:29:54 +0000 (16:29 -0400)] 
make cf_expand_variables() take lineno instead of *lineno

which was done for who knows what historical reasons

6 years agomake fr_cond_tokenize() take CONF_SECTION we're parsing
Alan T. DeKok [Tue, 10 Sep 2019 20:13:50 +0000 (16:13 -0400)] 
make fr_cond_tokenize() take CONF_SECTION we're parsing

which ends up being easier than the alternative.  That way
instead of passing a bunch of things around, we can just pass
a CONF_SECTION

6 years agoensure that we always pass a CONF_SECTION
Alan T. DeKok [Tue, 10 Sep 2019 19:55:17 +0000 (15:55 -0400)] 
ensure that we always pass a CONF_SECTION

6 years agoMore filtering of ldflags
Arran Cudbard-Bell [Tue, 10 Sep 2019 20:09:35 +0000 (15:09 -0500)] 
More filtering of ldflags

6 years agoMore python-config stupidity
Arran Cudbard-Bell [Tue, 10 Sep 2019 19:58:45 +0000 (14:58 -0500)] 
More python-config stupidity

6 years ago-Werror args probably don't contain spaces, but they do contain hyphens
Arran Cudbard-Bell [Tue, 10 Sep 2019 19:46:13 +0000 (14:46 -0500)] 
-Werror args probably don't contain spaces, but they do contain hyphens

6 years agoDeal with -Werror where it has args
Arran Cudbard-Bell [Tue, 10 Sep 2019 19:35:07 +0000 (14:35 -0500)] 
Deal with -Werror where it has args

6 years agomake process_map() call cf_get_token()
Alan T. DeKok [Tue, 10 Sep 2019 19:19:34 +0000 (15:19 -0400)] 
make process_map() call cf_get_token()

which regularizes the parsing of the various things

6 years agowe only need 4 buffers
Alan T. DeKok [Tue, 10 Sep 2019 18:44:06 +0000 (14:44 -0400)] 
we only need 4 buffers

rearrange the user of the buffers, and document what they're for.

6 years agosimplify process_include()
Alan T. DeKok [Tue, 10 Sep 2019 18:40:14 +0000 (14:40 -0400)] 
simplify process_include()

so that it no longer uses the old APIs

6 years agoallow unlang expansions in name1 for conf section/pairs
Alan T. DeKok [Tue, 10 Sep 2019 18:28:24 +0000 (14:28 -0400)] 
allow unlang expansions in name1 for conf section/pairs

which can occasionally be useful.  And, is preparation for
removing the rest of the use of gettoken()

6 years agouse 'this' section, not the top-level one
Alan T. DeKok [Tue, 10 Sep 2019 18:27:21 +0000 (14:27 -0400)] 
use 'this' section, not the top-level one

6 years agoexpand variables in cf_get_token
Alan T. DeKok [Tue, 10 Sep 2019 18:10:54 +0000 (14:10 -0400)] 
expand variables in cf_get_token

6 years agoerrors are errors
Alan T. DeKok [Tue, 10 Sep 2019 18:10:28 +0000 (14:10 -0400)] 
errors are errors

6 years agos/Ssize_t/Size_t/ in rlm_python
Arran Cudbard-Bell [Tue, 10 Sep 2019 19:18:25 +0000 (14:18 -0500)] 
s/Ssize_t/Size_t/ in rlm_python

6 years agoUse PyLong_FromSsize_t where appropriate
Arran Cudbard-Bell [Tue, 10 Sep 2019 19:12:50 +0000 (14:12 -0500)] 
Use PyLong_FromSsize_t where appropriate

6 years agoSwitch numeric interchange to PyLong, but use PyNumber to check for compatibility...
Arran Cudbard-Bell [Tue, 10 Sep 2019 19:06:19 +0000 (14:06 -0500)] 
Switch numeric interchange to PyLong, but use PyNumber to check for compatibility with Python v2 and v3

6 years agoJust use python-config to configure the python module
Arran Cudbard-Bell [Tue, 10 Sep 2019 19:04:41 +0000 (14:04 -0500)] 
Just use python-config to configure the python module

6 years agoPython 3 compatibility fixes
Arran Cudbard-Bell [Tue, 10 Sep 2019 19:04:20 +0000 (14:04 -0500)] 
Python 3 compatibility fixes

6 years agoRevert "We don't need to clear repeatable anymore it's done by frame_cleanup"
Arran Cudbard-Bell [Tue, 10 Sep 2019 15:06:27 +0000 (10:06 -0500)] 
Revert "We don't need to clear repeatable anymore it's done by frame_cleanup"

This reverts commit bbc8a8bfe272095cc186d1313b98438d19c65d7b.

6 years agofix nested %{...}
Alan T. DeKok [Tue, 10 Sep 2019 14:45:54 +0000 (10:45 -0400)] 
fix nested %{...}

6 years agoallow bare %{...} in conditions
Alan T. DeKok [Tue, 10 Sep 2019 14:33:56 +0000 (10:33 -0400)] 
allow bare %{...} in conditions

which for now are parsed and printed as double-quoted strings.

But it makes some things much easier

6 years agodecrement before checks
Alan T. DeKok [Tue, 10 Sep 2019 14:33:43 +0000 (10:33 -0400)] 
decrement before checks

6 years agodo less memcpy
Alan T. DeKok [Tue, 10 Sep 2019 14:19:06 +0000 (10:19 -0400)] 
do less memcpy

6 years agomake cf_expand_variables() take a length of input
Alan T. DeKok [Tue, 10 Sep 2019 14:09:54 +0000 (10:09 -0400)] 
make cf_expand_variables() take a length of input

which makies other things simpler, such as the conditional
tokenizer

6 years agocleanups and create cf_get_token()
Alan T. DeKok [Tue, 10 Sep 2019 13:54:58 +0000 (09:54 -0400)] 
cleanups and create cf_get_token()

which wraps tmpl_preparse(), and eventually cf_expand_variables()
so that the config file parser *doesn't* use gettoken().

Instead, it should use the new APIs which provide for better
error reporting and more functionality

6 years agoAdd test for return after policy
Arran Cudbard-Bell [Tue, 10 Sep 2019 14:29:17 +0000 (09:29 -0500)] 
Add test for return after policy

Policy sets return_point on that stack frame, so we need to make sure it's cleared when the next instruction is executed

6 years agoWe don't need to clear repeatable anymore it's done by frame_cleanup
Arran Cudbard-Bell [Tue, 10 Sep 2019 14:28:29 +0000 (09:28 -0500)] 
We don't need to clear repeatable anymore it's done by frame_cleanup

6 years agoClear break_point and return_point when moving to the next instruction or popping...
Arran Cudbard-Bell [Tue, 10 Sep 2019 14:27:54 +0000 (09:27 -0500)] 
Clear break_point and return_point when moving to the next instruction or popping things

6 years agoWe really do only need to set top_frame when pushing new things onto the stack
Arran Cudbard-Bell [Tue, 10 Sep 2019 14:27:31 +0000 (09:27 -0500)] 
We really do only need to set top_frame when pushing new things onto the stack

6 years agoPrint unwind at the stack level
Arran Cudbard-Bell [Tue, 10 Sep 2019 14:27:09 +0000 (09:27 -0500)] 
Print unwind at the stack level

6 years agoSet dependencies correctly for return keyword tests
Arran Cudbard-Bell [Tue, 10 Sep 2019 14:26:47 +0000 (09:26 -0500)] 
Set dependencies correctly for return keyword tests

6 years agoless code == better code
Alan T. DeKok [Tue, 10 Sep 2019 13:29:07 +0000 (09:29 -0400)] 
less code == better code

6 years agotypo
Alan T. DeKok [Tue, 10 Sep 2019 13:29:02 +0000 (09:29 -0400)] 
typo

6 years agoFix missing free() in $INCLUDE
Jorge Pereira [Mon, 9 Sep 2019 23:17:53 +0000 (20:17 -0300)] 
Fix missing free() in $INCLUDE

6 years agofix list for proper nesting
Alan T. DeKok [Tue, 10 Sep 2019 13:01:58 +0000 (09:01 -0400)] 
fix list for proper nesting

6 years agotext was already in the partial include file
Alan T. DeKok [Tue, 10 Sep 2019 12:58:55 +0000 (08:58 -0400)] 
text was already in the partial include file

6 years agotypo
Alan T. DeKok [Tue, 10 Sep 2019 12:58:12 +0000 (08:58 -0400)] 
typo

6 years agouse ":" instead of "::" everywhere
Alan T. DeKok [Tue, 10 Sep 2019 12:57:03 +0000 (08:57 -0400)] 
use ":" instead of "::" everywhere

6 years agoshould be fixed-width
Alan T. DeKok [Tue, 10 Sep 2019 12:56:47 +0000 (08:56 -0400)] 
should be fixed-width

6 years agothis file was moved
Alan T. DeKok [Tue, 10 Sep 2019 12:55:17 +0000 (08:55 -0400)] 
this file was moved

6 years agodocument changed behavior
Alan T. DeKok [Tue, 10 Sep 2019 12:55:07 +0000 (08:55 -0400)] 
document changed behavior

6 years agouse standard macro
Alan T. DeKok [Mon, 9 Sep 2019 19:16:37 +0000 (15:16 -0400)] 
use standard macro

6 years agounescape bare %{...} too
Alan T. DeKok [Mon, 9 Sep 2019 19:14:17 +0000 (15:14 -0400)] 
unescape bare %{...} too

6 years agodoesn't seem to make any difference, even though it is sometimes set
Matthew Newton [Tue, 10 Sep 2019 09:18:37 +0000 (10:18 +0100)] 
doesn't seem to make any difference, even though it is sometimes set

6 years agomake some functions static
Alan T. DeKok [Mon, 9 Sep 2019 19:04:11 +0000 (15:04 -0400)] 
make some functions static

they are old, and now only used in one place

6 years agouse tmpl_preparse(), which now does most necessary things
Alan T. DeKok [Mon, 9 Sep 2019 18:58:17 +0000 (14:58 -0400)] 
use tmpl_preparse(), which now does most necessary things

6 years agotmpl_preparse() is now capable of parsing %{...}
Alan T. DeKok [Mon, 9 Sep 2019 16:50:46 +0000 (12:50 -0400)] 
tmpl_preparse() is now capable of parsing %{...}

6 years agoCreate an initial, empty CRL in DER encoding #2964
Jorge Pereira [Mon, 9 Sep 2019 17:20:17 +0000 (14:20 -0300)] 
Create an initial, empty CRL in DER encoding #2964

6 years agobe a bit more flexible about 'map'
Alan T. DeKok [Mon, 9 Sep 2019 15:59:23 +0000 (11:59 -0400)] 
be a bit more flexible about 'map'

map { ...} is OK in sigtran as a config section

6 years agoallow , and ; after words
Alan T. DeKok [Mon, 9 Sep 2019 15:57:34 +0000 (11:57 -0400)] 
allow , and ; after words

6 years agoless code is better code
Alan T. DeKok [Mon, 9 Sep 2019 15:46:11 +0000 (11:46 -0400)] 
less code is better code

6 years agosimplify the parser.
Alan T. DeKok [Mon, 9 Sep 2019 13:50:56 +0000 (09:50 -0400)] 
simplify the parser.

it's clearer to just check for characters directly, instead of
calling functions and then checking for token values

6 years agomove "expand variables" into add_pair() function
Alan T. DeKok [Mon, 9 Sep 2019 13:41:20 +0000 (09:41 -0400)] 
move "expand variables" into add_pair() function

6 years agomove add_pair() to separate function
Alan T. DeKok [Mon, 9 Sep 2019 13:19:36 +0000 (09:19 -0400)] 
move add_pair() to separate function

and start cleaning up the parser to be simpler and more understandable

6 years agoremove WITH_CONF_WRITE
Alan T. DeKok [Mon, 9 Sep 2019 12:51:36 +0000 (08:51 -0400)] 
remove WITH_CONF_WRITE

unused, untested, likely not to work.  If we re-do the parser,
we can make this functionality part of the requirements.

Until then, this code is making refactoring mode difficult

6 years agoue correct CA password when not the default "whatever"
Stefan Winter [Sun, 8 Sep 2019 06:35:54 +0000 (08:35 +0200)] 
ue correct CA password when not the default "whatever"

without passin and passout, the CA passphrase is taken from ca.cnf where it is "whatever". In passwords.mk it is also "whatever" so that is usually okay.
However when changing the password in passwords.mk, the CA is still generated with "whatever" but subsequent cert generation commands use the custom password -> failure.