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
|
|
@ -116,26 +116,19 @@ xml2txt(FILE *f,
|
|||
int children=0;
|
||||
char *term = NULL;
|
||||
int retval = -1;
|
||||
int encr=0;
|
||||
|
||||
xe = NULL; /* count children */
|
||||
while ((xe = xml_child_each(x, xe, -1)) != NULL)
|
||||
children++;
|
||||
if (!children){
|
||||
if (xml_type(x) == CX_BODY){
|
||||
/* Kludge for escaping encrypted passwords */
|
||||
if (strcmp(xml_name(xml_parent(x)), "encrypted-password")==0)
|
||||
encr++;
|
||||
term = xml_value(x);
|
||||
}
|
||||
else{
|
||||
fprintf(f, "%*s", 4*level, "");
|
||||
term = xml_name(x);
|
||||
}
|
||||
if (encr)
|
||||
fprintf(f, "\"%s\";\n", term);
|
||||
else
|
||||
fprintf(f, "%s;\n", term);
|
||||
fprintf(f, "%s;\n", term);
|
||||
retval = 0;
|
||||
goto done;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue