* Experimental NACM RFC8341 Network Configuration Access Control Model.

* CLICON_NACM_MODE config option, default is disabled.
  * Added username attribute to all rpc:s from frontend to backend
  * Added NACM backend module in example
This commit is contained in:
Olof hagsand 2018-04-19 22:44:15 +02:00
parent 04a3f4db1b
commit 7650803475
32 changed files with 908 additions and 274 deletions

View file

@ -242,13 +242,15 @@ plugin_load_one(clicon_handle h,
* @param[in] h Clicon handle
* @param[in] function Which function symbol to load and call (eg CLIXON_PLUGIN_INIT)
* @param[in] dir Directory. .so files in this dir will be loaded.
* @param[in] regexp Regexp for matching files in plugin directory. Default *.so.
* @retval 0 OK
* @retval -1 Error
*/
int
clixon_plugins_load(clicon_handle h,
char *function,
char *dir)
char *dir,
char *regexp)
{
int retval = -1;
int ndp;
@ -259,7 +261,8 @@ clixon_plugins_load(clicon_handle h,
clicon_debug(1, "%s", __FUNCTION__);
/* Get plugin objects names from plugin directory */
if((ndp = clicon_file_dirent(dir, &dp, "(.so)$", S_IFREG))<0)
if((ndp = clicon_file_dirent(dir, &dp,
regexp?regexp:"(.so)$", S_IFREG))<0)
goto done;
/* Load all plugins */
for (i = 0; i < ndp; i++) {