NACM external file support. CLICON_NACM_FILE config option, if CLICON_NACM_MODE is external
This commit is contained in:
parent
d032dbe1cb
commit
602f5034b4
17 changed files with 867 additions and 39 deletions
|
|
@ -118,7 +118,7 @@ install: $(YANGSPECS) $(CLISPECS) $(BE_PLUGIN) $(BE2_PLUGIN) $(CLI_PLUGIN) $(NET
|
|||
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/cli
|
||||
install -m 0644 -s $(CLI_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/cli
|
||||
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/backend
|
||||
install -m 0644 -s $(BE_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/backend
|
||||
install -m 0644 -s $(BE_PLUGIN) $(BE2_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/backend
|
||||
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/netconf
|
||||
install -m 0644 -s $(NETCONF_PLUGIN) $(DESTDIR)$(clixon_LIBDIR)/netconf
|
||||
install -d -m 0755 $(DESTDIR)$(clixon_LIBDIR)/restconf
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@
|
|||
<CLICON_SOCK>/usr/local/var/example/example.sock</CLICON_SOCK>
|
||||
<CLICON_BACKEND_PIDFILE>/usr/local/var/example/example.pidfile</CLICON_BACKEND_PIDFILE>
|
||||
<CLICON_CLI_GENMODEL_COMPLETION>1</CLICON_CLI_GENMODEL_COMPLETION>
|
||||
<CLICON_CLI_GENMODEL_TYPE>VARS</CLICON_CLI_GENMODEL_TYPE>
|
||||
<CLICON_XMLDB_DIR>/usr/local/var/example</CLICON_XMLDB_DIR>
|
||||
<CLICON_XMLDB_PLUGIN>/usr/local/lib/xmldb/text.so</CLICON_XMLDB_PLUGIN>
|
||||
<CLICON_CLI_LINESCROLLING>0</CLICON_CLI_LINESCROLLING>
|
||||
<CLICON_STARTUP_MODE>init</CLICON_STARTUP_MODE>
|
||||
<CLICON_NACM_MODE>disabled</CLICON_NACM_MODE>
|
||||
</config>
|
||||
|
|
|
|||
|
|
@ -197,7 +197,6 @@ plugin_credentials(clicon_handle h,
|
|||
FCGX_Request *r = (FCGX_Request *)arg;
|
||||
cxobj *xt = NULL;
|
||||
cxobj *x;
|
||||
char *xbody;
|
||||
char *auth;
|
||||
char *user = NULL;
|
||||
char *passwd;
|
||||
|
|
@ -205,11 +204,12 @@ plugin_credentials(clicon_handle h,
|
|||
size_t authlen;
|
||||
cbuf *cb = NULL;
|
||||
int ret;
|
||||
|
||||
char *xbody;
|
||||
|
||||
clicon_debug(1, "%s", __FUNCTION__);
|
||||
/* XXX This is a kludge to reset the user not remaining from previous */
|
||||
if (clicon_username_set(h, "admin") < 0)
|
||||
goto done;
|
||||
clicon_debug(1, "%s", __FUNCTION__);
|
||||
/* Check if basic_auth set, if not return OK */
|
||||
if (clicon_rpc_get_config(h, "running", "authentication", &xt) < 0)
|
||||
goto done;
|
||||
|
|
@ -249,7 +249,6 @@ plugin_credentials(clicon_handle h,
|
|||
cprintf(cb, "authentication/auth[user=%s]", user);
|
||||
if ((x = xpath_first(xt, cbuf_get(cb))) == NULL)
|
||||
goto fail;
|
||||
|
||||
passwd2 = xml_find_body(x, "password");
|
||||
if (strcmp(passwd, passwd2))
|
||||
goto fail;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue