]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
8 years agomove syntax argument checking to it's own function
Alan T. DeKok [Tue, 3 Jul 2018 17:32:49 +0000 (13:32 -0400)] 
move syntax argument checking to it's own function

in preparation for allowing alternation and optional arguments

8 years agomove vararg check to before check for valid name
Alan T. DeKok [Tue, 3 Jul 2018 17:28:08 +0000 (13:28 -0400)] 
move vararg check to before check for valid name

8 years agoonly allow real data types
Alan T. DeKok [Tue, 3 Jul 2018 17:15:36 +0000 (13:15 -0400)] 
only allow real data types

8 years agosupport variable arguments
Alan T. DeKok [Tue, 3 Jul 2018 17:02:22 +0000 (13:02 -0400)] 
support variable arguments

as:

command IPADDR ...

which means "many IP addresses".

The argument before the "..." MUST be a known data type.
Otherwise it doesn't make any sense

8 years agoconn may be NULL too
Arran Cudbard-Bell [Tue, 3 Jul 2018 17:52:48 +0000 (13:52 -0400)] 
conn may be NULL too

8 years agoTypo
Arran Cudbard-Bell [Tue, 3 Jul 2018 17:51:43 +0000 (13:51 -0400)] 
Typo

8 years agoDon't crash on early exit
Arran Cudbard-Bell [Tue, 3 Jul 2018 17:51:00 +0000 (13:51 -0400)] 
Don't crash on early exit

8 years agoFix abort on error
Arran Cudbard-Bell [Tue, 3 Jul 2018 17:43:36 +0000 (13:43 -0400)] 
Fix abort on error

8 years agofix up "taint" fix
Alan T. DeKok [Tue, 3 Jul 2018 15:43:40 +0000 (11:43 -0400)] 
fix up "taint" fix

8 years agodocument "perl_flags" and "-T"
Alan T. DeKok [Tue, 3 Jul 2018 15:39:20 +0000 (11:39 -0400)] 
document "perl_flags" and "-T"

8 years agotaint all variables.
Alan T. DeKok [Tue, 3 Jul 2018 14:49:31 +0000 (10:49 -0400)] 
taint all variables.

8 years agouse cmd->intermediate for checks
Alan T. DeKok [Tue, 3 Jul 2018 13:27:28 +0000 (09:27 -0400)] 
use cmd->intermediate for checks

8 years agoremove extraneous assignment
Alan T. DeKok [Tue, 3 Jul 2018 13:12:26 +0000 (09:12 -0400)] 
remove extraneous assignment

8 years agoadd fp_err to commands
Alan T. DeKok [Tue, 3 Jul 2018 11:22:32 +0000 (07:22 -0400)] 
add fp_err to commands

so that errors can go to a different path

8 years agoremove more debugging
Alan T. DeKok [Tue, 3 Jul 2018 11:16:21 +0000 (07:16 -0400)] 
remove more debugging

8 years agoquiet clang scan
Alan T. DeKok [Mon, 2 Jul 2018 23:10:11 +0000 (19:10 -0400)] 
quiet clang scan

8 years agoFix various misc warnings
Arran Cudbard-Bell [Mon, 2 Jul 2018 20:22:31 +0000 (16:22 -0400)] 
Fix various misc warnings

8 years agoDelete the correct class of events
Arran Cudbard-Bell [Mon, 2 Jul 2018 20:22:17 +0000 (16:22 -0400)] 
Delete the correct class of events

8 years agomake callbacks take fr_cmd_info_t
Alan T. DeKok [Mon, 2 Jul 2018 19:16:53 +0000 (15:16 -0400)] 
make callbacks take fr_cmd_info_t

8 years agoremove debug code
Alan T. DeKok [Mon, 2 Jul 2018 19:16:40 +0000 (15:16 -0400)] 
remove debug code

8 years agomake tab expansions work again
Alan T. DeKok [Mon, 2 Jul 2018 19:06:15 +0000 (15:06 -0400)] 
make tab expansions work again

8 years agocleanups
Alan T. DeKok [Mon, 2 Jul 2018 19:06:02 +0000 (15:06 -0400)] 
cleanups

8 years agomove argc/argv to a data structure
Alan T. DeKok [Mon, 2 Jul 2018 14:32:37 +0000 (10:32 -0400)] 
move argc/argv to a data structure

because we have to pass argc, max_argc, argv, and value_box_argv
to a number of functions.  So we might as well use a struct
instead of passing many arguments to a function

8 years agoWe actually call bootstrap, not instantiate
Arran Cudbard-Bell [Mon, 2 Jul 2018 14:28:15 +0000 (10:28 -0400)] 
We actually call bootstrap, not instantiate

8 years agoExplain DL priorities
Arran Cudbard-Bell [Mon, 2 Jul 2018 14:26:31 +0000 (10:26 -0400)] 
Explain DL priorities

8 years agoEnsure proto_* modules loaded by listeners are freed correctly
Arran Cudbard-Bell [Mon, 2 Jul 2018 14:11:01 +0000 (10:11 -0400)] 
Ensure proto_* modules loaded by listeners are freed correctly

8 years agoFix benign memory leak of devices list in radsniff
Arran Cudbard-Bell [Sun, 1 Jul 2018 17:35:24 +0000 (13:35 -0400)] 
Fix benign memory leak of devices list in radsniff

8 years agoautofree is freed atexit anyway, conf should be freed first to ensure orderly exit
Arran Cudbard-Bell [Sun, 1 Jul 2018 17:31:22 +0000 (13:31 -0400)] 
autofree is freed atexit anyway, conf should be freed first to ensure orderly exit

8 years agoLooks like radiusd now needs to be linked against readline
Arran Cudbard-Bell [Sun, 1 Jul 2018 17:30:40 +0000 (13:30 -0400)] 
Looks like radiusd now needs to be linked against readline

8 years agoQuiet compiler warnings
Arran Cudbard-Bell [Sun, 1 Jul 2018 17:30:09 +0000 (13:30 -0400)] 
Quiet compiler warnings

8 years agoDo lsan/valgrind checks once on init
Arran Cudbard-Bell [Sun, 1 Jul 2018 17:26:49 +0000 (13:26 -0400)] 
Do lsan/valgrind checks once on init

8 years agoUpdate LICENSE
Arran Cudbard-Bell [Sun, 1 Jul 2018 13:30:58 +0000 (09:30 -0400)] 
Update LICENSE

So that GitHub picks the license up correctly *sigh*

8 years agoremove unused variable
Alan T. DeKok [Sun, 1 Jul 2018 13:03:41 +0000 (09:03 -0400)] 
remove unused variable

8 years agodon't re-verify the parameters
Alan T. DeKok [Sun, 1 Jul 2018 12:24:47 +0000 (08:24 -0400)] 
don't re-verify the parameters

8 years agouse CMD_MAX_ARGV for commonality
Alan T. DeKok [Sun, 1 Jul 2018 12:23:16 +0000 (08:23 -0400)] 
use CMD_MAX_ARGV for commonality

8 years agominor cleanups
Alan T. DeKok [Sun, 1 Jul 2018 12:23:07 +0000 (08:23 -0400)] 
minor cleanups

8 years agofree the autofree context
Alan T. DeKok [Sun, 1 Jul 2018 12:22:32 +0000 (08:22 -0400)] 
free the autofree context

8 years agoTemporary fix for access after free in dl loader
Arran Cudbard-Bell [Sun, 1 Jul 2018 12:19:08 +0000 (08:19 -0400)] 
Temporary fix for access after free in dl loader

8 years agoParent the main config for radsniff from the autofree context
Arran Cudbard-Bell [Sat, 30 Jun 2018 14:31:36 +0000 (10:31 -0400)] 
Parent the main config for radsniff from the autofree context

8 years agoUse uint8_t in case we ever do more complex return codes in future and need to deal...
Arran Cudbard-Bell [Sat, 30 Jun 2018 14:30:34 +0000 (10:30 -0400)] 
Use uint8_t in case we ever do more complex return codes in future and need to deal with endianess issues

8 years agowe don't need an intermediate variable
Alan T. DeKok [Sat, 30 Jun 2018 13:31:26 +0000 (09:31 -0400)] 
we don't need an intermediate variable

8 years agoremove debugging text
Alan T. DeKok [Sat, 30 Jun 2018 13:07:21 +0000 (09:07 -0400)] 
remove debugging text

8 years agoremove fr_command_runnable()
Alan T. DeKok [Sat, 30 Jun 2018 12:56:49 +0000 (08:56 -0400)] 
remove fr_command_runnable()

we now rely on fr_command_str_to_argv() to do string splitting,
argv updating, syntax checking, and returning whether or not
the command is runnable

8 years agofix fr_command_str_to_argv()
Alan T. DeKok [Sat, 30 Jun 2018 12:55:58 +0000 (08:55 -0400)] 
fix fr_command_str_to_argv()

by splitting the work into separate stages

8 years agovalue box functions may mangle types
Alan T. DeKok [Sat, 30 Jun 2018 12:54:20 +0000 (08:54 -0400)] 
value box functions may mangle types

so use temporary variable

8 years agoget next buffer offset from last argument, not from first argument
Alan T. DeKok [Fri, 29 Jun 2018 02:41:04 +0000 (22:41 -0400)] 
get next buffer offset from last argument, not from first argument

8 years agoaccount for "name", which uses one argc
Alan T. DeKok [Thu, 28 Jun 2018 21:32:14 +0000 (17:32 -0400)] 
account for "name", which uses one argc

8 years agomoving forward... many cleanups
Alan T. DeKok [Thu, 28 Jun 2018 21:14:41 +0000 (17:14 -0400)] 
moving forward... many cleanups

* entering "foo bar baz" as a partial command now lets you do
  "exit" once to get back to the main prompt.  i.e. you DON'T
  have to type "exit" 3 times.

* somewhat working fr_command_str_to_argv() function
  which now replaces fr_command_runnable().

As the str_to_argv() function should also be aware of data types
for command syntax (e.g. FR_TYPE_STRING), and parse those correctly.
i.e. with strings that contain spaces.

Sadly, it doesn't seem to quite work yet...

8 years agoremove OSF stuff.
Alan T. DeKok [Thu, 28 Jun 2018 21:01:32 +0000 (17:01 -0400)] 
remove OSF stuff.

This should likely be removed from everything...

8 years agotables must define a callback function
Alan T. DeKok [Thu, 28 Jun 2018 20:17:38 +0000 (16:17 -0400)] 
tables must define a callback function

8 years agocheck for too many parameters
Alan T. DeKok [Thu, 28 Jun 2018 16:34:49 +0000 (12:34 -0400)] 
check for too many parameters

8 years agoCleanup memory better on exit
Arran Cudbard-Bell [Sat, 30 Jun 2018 01:49:23 +0000 (21:49 -0400)] 
Cleanup memory better on exit

8 years agoPush dlopen access errors into the error stack
Arran Cudbard-Bell [Fri, 29 Jun 2018 21:05:50 +0000 (17:05 -0400)] 
Push dlopen access errors into the error stack

8 years agoconst issues
Alan T. DeKok [Thu, 28 Jun 2018 14:10:31 +0000 (10:10 -0400)] 
const issues

8 years agoadd fr_command_str_to_argv() function
Alan T. DeKok [Thu, 28 Jun 2018 14:08:41 +0000 (10:08 -0400)] 
add fr_command_str_to_argv() function

which can the use it's brains to allow quoted strings
when the input syntax has FR_TYPE_STRING.  And disallow quoted
strings elsewhere.

8 years agoskip blank lines on input
Alan T. DeKok [Thu, 28 Jun 2018 13:46:21 +0000 (09:46 -0400)] 
skip blank lines on input

8 years agobreak out earlier in readline
Alan T. DeKok [Thu, 28 Jun 2018 13:43:33 +0000 (09:43 -0400)] 
break out earlier in readline

8 years agoclose stdin on the theory that it will make readine() fail
Alan T. DeKok [Thu, 28 Jun 2018 13:15:15 +0000 (09:15 -0400)] 
close stdin on the theory that it will make readine() fail

8 years agomore functionality
Alan T. DeKok [Thu, 28 Jun 2018 12:50:38 +0000 (08:50 -0400)] 
more functionality

* make everything talloc'd from a local ctx
* add contexts, so you can do "radmin> foo" and get a "... foo> " prompt
* parse "exit" when context>0, in order to exit from a context
* parse "help" when context>0, in order to give context-specific help
* add "test" command for testing.

8 years agoinsert into the correct location
Alan T. DeKok [Thu, 28 Jun 2018 12:47:00 +0000 (08:47 -0400)] 
insert into the correct location

8 years agoadd "runnable" to see if a command is runnable.
Alan T. DeKok [Thu, 28 Jun 2018 12:29:37 +0000 (08:29 -0400)] 
add "runnable" to see if a command is runnable.

So we can allow the admin to enter partial commands, and
have them be part of a context

8 years agoSet default RADDBDIR and DICTDIR
Arran Cudbard-Bell [Thu, 28 Jun 2018 12:18:00 +0000 (08:18 -0400)] 
Set default RADDBDIR and DICTDIR

8 years agoDoxygen
Arran Cudbard-Bell [Thu, 28 Jun 2018 03:27:18 +0000 (23:27 -0400)] 
Doxygen

8 years agoBetter errors
Arran Cudbard-Bell [Thu, 28 Jun 2018 03:21:00 +0000 (23:21 -0400)] 
Better errors

8 years agoFix for ${name} reference expansion
Arran Cudbard-Bell [Thu, 28 Jun 2018 00:47:20 +0000 (20:47 -0400)] 
Fix for ${name} reference expansion

8 years agoAdd "parent" or "base" pointer to custom parsing functions
Arran Cudbard-Bell [Wed, 27 Jun 2018 00:54:22 +0000 (20:54 -0400)] 
Add "parent" or "base" pointer to custom parsing functions

This allows parsing functions to access fields in the structure for previously parsed values... and potentially adds ordering issues, so don't reorder the CONF_PARSER entries that have functions!

8 years agodo help on remaining arguments
Alan T. DeKok [Thu, 28 Jun 2018 00:42:00 +0000 (20:42 -0400)] 
do help on remaining arguments

8 years agoskip the argument we just used
Alan T. DeKok [Thu, 28 Jun 2018 00:41:01 +0000 (20:41 -0400)] 
skip the argument we just used

8 years agoset "parents" properly
Alan T. DeKok [Thu, 28 Jun 2018 00:35:49 +0000 (20:35 -0400)] 
set "parents" properly

8 years agomove "help" to function call
Alan T. DeKok [Wed, 27 Jun 2018 22:29:48 +0000 (18:29 -0400)] 
move "help" to function call

8 years agosyntax OR callback
Alan T. DeKok [Wed, 27 Jun 2018 22:29:22 +0000 (18:29 -0400)] 
syntax OR callback

8 years agouse pointer for types
Alan T. DeKok [Wed, 27 Jun 2018 22:21:30 +0000 (18:21 -0400)] 
use pointer for types

so that we can parse combo-ip to ipv4 or ipv6

8 years agomove assertion
Alan T. DeKok [Wed, 27 Jun 2018 22:19:39 +0000 (18:19 -0400)] 
move assertion

8 years agomove radmin stuff into radmin.c
Alan T. DeKok [Wed, 27 Jun 2018 22:18:06 +0000 (18:18 -0400)] 
move radmin stuff into radmin.c

8 years agoif nothing at the head, insertion point is the head
Alan T. DeKok [Wed, 27 Jun 2018 22:16:47 +0000 (18:16 -0400)] 
if nothing at the head, insertion point is the head

8 years agoquiet compiler
Alan T. DeKok [Wed, 27 Jun 2018 21:43:28 +0000 (17:43 -0400)] 
quiet compiler

8 years agodoxygen qualify name
Alan T. DeKok [Wed, 27 Jun 2018 21:41:53 +0000 (17:41 -0400)] 
doxygen qualify name

8 years agoradmin commands have a FILE*fp for output
Alan T. DeKok [Wed, 27 Jun 2018 20:48:20 +0000 (16:48 -0400)] 
radmin commands have a FILE*fp for output

8 years agostart of new command API.
Alan T. DeKok [Wed, 27 Jun 2018 17:48:15 +0000 (13:48 -0400)] 
start of new command API.

and `radiusd -r` now starts a radmin interface in the terminal.

Not much works, but it's a start.

8 years agofixes and notes for the future
Alan T. DeKok [Wed, 27 Jun 2018 17:40:15 +0000 (13:40 -0400)] 
fixes and notes for the future

8 years agohandle graceful exit of the server
Alan T. DeKok [Wed, 27 Jun 2018 17:38:25 +0000 (13:38 -0400)] 
handle graceful exit of the server

8 years agoremove old function prototypes
Alan T. DeKok [Wed, 27 Jun 2018 15:25:01 +0000 (11:25 -0400)] 
remove old function prototypes

8 years agodocument manual module ordering
Alan T. DeKok [Fri, 22 Jun 2018 15:56:10 +0000 (11:56 -0400)] 
document manual module ordering

8 years agoMerge pull request #2255 from nmadhok/master
Arran Cudbard-Bell [Tue, 26 Jun 2018 22:02:14 +0000 (18:02 -0400)] 
Merge pull request #2255 from nmadhok/master

Adding dictionary for Big Switch Networks

8 years agoAdding dictionary for Big Switch Networks 2255/head
Nitin Madhok [Tue, 26 Jun 2018 21:55:57 +0000 (17:55 -0400)] 
Adding dictionary for Big Switch Networks

8 years agoMove mainconfig validation logic into parse functions
Arran Cudbard-Bell [Sat, 23 Jun 2018 16:20:50 +0000 (12:20 -0400)] 
Move mainconfig validation logic into parse functions

8 years agoTypo
Arran Cudbard-Bell [Sat, 23 Jun 2018 01:33:58 +0000 (21:33 -0400)] 
Typo

8 years agoDeglobalify main_config
Arran Cudbard-Bell [Sat, 23 Jun 2018 00:24:46 +0000 (20:24 -0400)] 
Deglobalify main_config

- Talloc global config so we can do cleanup of buffers more easily
- Move things that were globals outside of the main config into the main config.
- Build mainconfig.c and client.c as part of the server library.  client.c should go away or be moved into proto_radius eventually.

8 years agoIgnore more system leaks
Arran Cudbard-Bell [Sat, 23 Jun 2018 00:22:24 +0000 (20:22 -0400)] 
Ignore more system leaks

8 years agoRename some boxing/unboxing macros
Arran Cudbard-Bell [Fri, 22 Jun 2018 00:28:04 +0000 (20:28 -0400)] 
Rename some boxing/unboxing macros

8 years agofix typo
Alan T. DeKok [Fri, 22 Jun 2018 15:48:34 +0000 (11:48 -0400)] 
fix typo

8 years agostupid compiler
Alan T. DeKok [Fri, 22 Jun 2018 14:18:35 +0000 (10:18 -0400)] 
stupid compiler

8 years agoclarify changes
Alan T. DeKok [Fri, 22 Jun 2018 14:13:04 +0000 (10:13 -0400)] 
clarify changes

we should really have nothing here, but instead have a web page
listing all of this

8 years agofix wildcard includes
Alan T. DeKok [Fri, 22 Jun 2018 13:40:45 +0000 (09:40 -0400)] 
fix wildcard includes

so that you can now do:

    $INCLUDE mods-enabled/sql
    $INCLUDE mods-enabled/

This will cause the "sql" module to be read first.  Then, when the
directory is read, the "sql" module will be ignored.

This solves ordering issues where "sqlippool" needs "sql", but
"sqlippool" is listed in the *directory* on disk after "sql".

Manual port of commit bb842ece0102

8 years agomove handling of EWOUILDBLOCK to conduit code
Alan T. DeKok [Thu, 21 Jun 2018 19:24:48 +0000 (15:24 -0400)] 
move handling of EWOUILDBLOCK to conduit code

8 years agohandle commands
Alan T. DeKok [Thu, 21 Jun 2018 19:20:54 +0000 (15:20 -0400)] 
handle commands

through the simple expedient of echoing back a blank line...

8 years agoreset leftover once we've read a full packet
Alan T. DeKok [Thu, 21 Jun 2018 19:20:41 +0000 (15:20 -0400)] 
reset leftover once we've read a full packet

8 years agohandle EWOULDBLOCK
Alan T. DeKok [Thu, 21 Jun 2018 19:20:23 +0000 (15:20 -0400)] 
handle EWOULDBLOCK

8 years agoMove server_id into proto_radius_auth
Arran Cudbard-Bell [Fri, 22 Jun 2018 00:13:43 +0000 (20:13 -0400)] 
Move server_id into proto_radius_auth

This is a super secret config option that is pretty RADIUS specific

8 years agomove to v4 configuration
Alan T. DeKok [Thu, 21 Jun 2018 16:12:31 +0000 (12:12 -0400)] 
move to v4 configuration