Skip to content

Commit

Permalink
set 'verify=lib' in test dictionary for RADIUS
Browse files Browse the repository at this point in the history
and change check order for loading protocol libraries.
Try to load them, even if they're not required.  And error out
only if they fail to load AND they're required.

This change makes it a bit more forgiving.
  • Loading branch information
alandekok committed Feb 24, 2020
1 parent 8c2929e commit 81eed12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/util/dict_tokenize.c
Expand Up @@ -1331,7 +1331,7 @@ static int dict_read_process_protocol(char **argv, int argc)
* Some protocols don't need them, so it's OK if the
* validation routines don't exist.
*/
if (require_dl && (dict_dlopen(dict, argv[0]) < 0)) {
if ((dict_dlopen(dict, argv[0]) < 0) && require_dl) {
error:
talloc_free(dict);
return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/dictionary
@@ -1,4 +1,4 @@
PROTOCOL RADIUS 1
PROTOCOL RADIUS 1 verify=lib
BEGIN-PROTOCOL RADIUS

#
Expand Down

0 comments on commit 81eed12

Please sign in to comment.