Removed RESTCONF_INLINE compile option

This commit is contained in:
Olof hagsand 2025-03-16 17:22:02 +01:00
parent f17da6ff83
commit f26ea043c7
2 changed files with 0 additions and 37 deletions

View file

@ -161,26 +161,6 @@ restconf_pseudo_set_inline(clixon_handle h,
for (i=0; i<argc; i++){ for (i=0; i<argc; i++){
if (argv[i] == NULL) if (argv[i] == NULL)
break; break;
#ifdef RESTCONF_INLINE
char *str;
if (strcmp(argv[i], "-R") == 0 && argc > i+1 && argv[i+1]){
if ((cb = cbuf_new()) == NULL){
clixon_err(OE_XML, errno, "cbuf_new");
goto done;
}
if (clixon_xml2cbuf(cb, xrestconf, 0, 0, NULL, -1, 0) < 0)
goto done;
if ((str = strdup(cbuf_get(cb))) == NULL){
clixon_err(OE_XML, errno, "stdup");
goto done;
}
clixon_debug(CLIXON_DBG_BACKEND, "str:%s", str);
if (argv[i+1])
free(argv[i+1]);
argv[i+1] = str;
break;
}
#endif
} }
retval = 0; retval = 0;
done: done:
@ -267,9 +247,6 @@ restconf_pseudo_process_control(clixon_handle h)
int found = 0; int found = 0;
nr = 8; /* pgm -f <file> -D <dbg> -l <log> NULL */ nr = 8; /* pgm -f <file> -D <dbg> -l <log> NULL */
#ifdef RESTCONF_INLINE
nr += 2;
#endif
if (clicon_option_str(h, "CLICON_CONFIGDIR")) if (clicon_option_str(h, "CLICON_CONFIGDIR"))
nr += 2; nr += 2;
if ((argv = calloc(nr, sizeof(char *))) == NULL){ if ((argv = calloc(nr, sizeof(char *))) == NULL){
@ -329,10 +306,6 @@ restconf_pseudo_process_control(clixon_handle h)
argv[i++] = "0"; argv[i++] = "0";
argv[i++] = "-l"; argv[i++] = "-l";
argv[i++] = "s"; /* There is also log-destination in clixon-restconf.yang */ argv[i++] = "s"; /* There is also log-destination in clixon-restconf.yang */
#ifdef RESTCONF_INLINE
argv[i++] = "-R";
argv[i++] = ""; /* The content is set in restconf_pseudo_set_inline */
#endif
argv[i++] = NULL; argv[i++] = NULL;
assert(i==nr); assert(i==nr);
if (clixon_process_register(h, RESTCONF_PROCESS, if (clixon_process_register(h, RESTCONF_PROCESS,

View file

@ -174,16 +174,6 @@
*/ */
#define YANG_GROUPING_AUGMENT_SKIP #define YANG_GROUPING_AUGMENT_SKIP
/*! Start of restconf from backend (when CLICON_BACKEND_RESTCONF_PROCESS=true) using -R <inline>
*
* If set, send initial restconf config via -R <config> parameter at fork/exec.
* Seems to be only an optimization since the config is queried from the backend anyway
* The reason this probably should be undef:ed is that the restconf config appears in ps and other in
* cleartext
* Plan is to remove this (undef:d) in next release
*/
#undef RESTCONF_INLINE
/*! Use SHA256 (32 bytes) instead of SHA1 (20 bytes) /*! Use SHA256 (32 bytes) instead of SHA1 (20 bytes)
* *
* Digest use is not cryptographic use, so SHA1 is enough for now * Digest use is not cryptographic use, so SHA1 is enough for now