Commit graph

1794 commits

Author SHA1 Message Date
Olof hagsand
3539a80d5e restconf fcgi mem leak in indata
test pkill needs sleep before name settles
2021-06-27 16:40:27 +02:00
Olof Hagsand
df05acdc9e test arm curl different return values 2021-06-26 21:39:57 +00:00
Olof Hagsand
b46418d774 Minor test and type fixes 2021-06-26 21:27:59 +00:00
Olof Hagsand
e451b7f43e - changed debug printfs to work for i386
- restconf native centos8: fixed ssl shutdown error
- libnghttp2 older version patch
2021-06-26 08:38:23 +00:00
Olof Hagsand
b31107f646 - Restconf native: Fixed ssl/non-ssl read/write behaviour for data that is different in freebsd than in linux
- test: removed sed -i in tests since it is not portable between linux and bsd
2021-06-25 10:48:55 +00:00
Olof hagsand
940f4d4fb9 * Added ordering sanity check for YANG modules and sub-modules
* If YANG sub-statements are placed in wrong order, clixon fails on error.
2021-06-24 21:56:36 +02:00
Olof Hagsand
caf396cbda - disable util_validate
- test vagrant: add libnghttp2 dependency
2021-06-24 17:41:46 +00:00
Olof Hagsand
e3e36aba50 test restconf: restconf proto should be default https only for native, not fcgi 2021-06-24 14:31:59 +00:00
Olof Hagsand
2d7d3c9782 test restconf native: generete server cert if not exists 2021-06-24 13:01:19 +00:00
Olof hagsand
c5da97e2a4 restconf memleaks 2021-06-24 13:09:18 +02:00
Olof hagsand
d6c175e76e - Improved debugs for native restconf config reads
- Docker: restconf native added nghttp2
2021-06-23 10:53:27 +02:00
Olof hagsand
ba45d6d2a1 Fixed memory leak in new candidate_validate function
Added error returns for clixon-lib process rpc empty returns
2021-06-23 10:50:47 +02:00
Olof hagsand
cb469a2bc7 docker: nginx install changed in alpine 2021-06-20 16:06:24 +02:00
Olof hagsand
528b649012 ci: install libnghttp2 2021-06-18 22:59:04 +02:00
Olof hagsand
9edf380f6a - Link utils statically if LINKAGE=static
- Fix event exit bug (set to new counter, dont increment)
- Changed default CI to be restconf=native instead of fcgi1~
- Tests:
  - Change to same wait backend and restconf commands
  - Change default restconf protocol from http to https
2021-06-18 22:50:30 +02:00
Olof hagsand
4b83f4198c New utility: clixon_util_validate for stand-alone application that validates or commits datastores 2021-06-18 09:54:17 +02:00
Olof hagsand
dd8883420c * Made backend transaction and commit/validate API available to plugin code.
* This enables that RPOC handles can call commit and validate via lib
  * The commit/validate API is now: `candidate_validate()` and `candidate_commit()`
2021-06-17 19:20:27 +02:00
Olof hagsand
1f7fc3afcb github actions: added sleep for internal restconf 2021-06-16 16:29:03 +02:00
Olof hagsand
917015ff3c changed alpine www-data user 2021-06-16 16:17:17 +02:00
Olof hagsand
ec3c69b9cb github actions: configure preparations 2021-06-16 14:47:23 +02:00
Olof hagsand
6bac41890d github actions: try docker test 2021-06-16 14:44:42 +02:00
Olof hagsand
8bd0aa82d6 github actions: debug wait backend/restconf 2021-06-16 14:39:28 +02:00
Olof hagsand
c814b809bb github actions: test backend run 2021-06-16 14:34:52 +02:00
Olof hagsand
cdc8924238 github actions: install curl 2021-06-16 14:30:06 +02:00
Olof hagsand
4c82562d4f github actions: clixon make util and example 2021-06-16 14:25:35 +02:00
Olof hagsand
d1013d5cce github actions: split into separate runs 2021-06-16 14:21:31 +02:00
Olof hagsand
8482bbffa9 github actions: typo prepare site.sh 2021-06-16 14:19:05 +02:00
Olof hagsand
7a2cd61015 github actions: prepare test site.sh file 2021-06-16 14:16:36 +02:00
Olof hagsand
cc7fa155f4 github actions: typo run 2021-06-16 14:08:33 +02:00
Olof hagsand
b28a7aa4a6 github actions: run inline tests, not docker 2021-06-16 14:07:13 +02:00
Olof hagsand
4b2430e007 github actions: dont add www-data 2021-06-16 14:03:01 +02:00
Olof hagsand
f7162297d3 github actions: libevent and clixon users 2021-06-16 13:51:01 +02:00
Olof hagsand
fdcb7eb9ab github actions: libevhtp 2021-06-16 13:11:18 +02:00
Olof hagsand
f66916ae57 github actions: native restconf 2021-06-16 13:09:13 +02:00
Olof hagsand
113f92ab41 Move clixon CI from travis to github actions 2021-06-16 13:06:21 +02:00
Olof hagsand
b40dafb691 * Event exit API changed to a single decrementing counter where 1 means exit.
* Removed: `clicon_exit_reset()`
  * Changed: `clicon_exit_set()` --> `clixon_exit_set(int nr)`
  * Changed: `clicon_exit_get()` --> `clixon_exit_get()`
* native restconf special case upgrade handling from http/1 -> http/2 and restconf restart: delay the restart using event exit counter
2021-06-16 11:58:13 +02:00
Olof hagsand
4f513385e9 - Restconf native http/1 to http/2 upgrade (non-tls) 2021-06-13 12:43:19 +02:00
Olof hagsand
b711faade9 grpc in shape 2021-06-11 14:42:41 +02:00
Olof hagsand
5ead099d0b * Added autotool check for getresuid (and related functions) necessary for lowering of priviliges for backend and restconf
* If getresuid is not available, CLICON_RESTCONF_PRIVILEGES must be set to 'none'
2021-06-11 14:42:41 +02:00
Olof hagsand
e24e2eb78b revert of https://github.com/clicon/clixon/pull/238 2021-06-11 14:05:19 +02:00
Olof Hagsand
92e340f462
Merge pull request #238 from mager-m/master
Fixed memory allocation for `struct dirent`
2021-06-11 11:10:34 +02:00
Olof hagsand
a122efceff * Fixed: [restconf patch method adds redundant namespaces #235](https://github.com/clicon/clixon/issues/235) 2021-06-10 13:05:03 +02:00
mager-m
af7e0458c6 Fixed memory allocation for struct dirent
While porting clixon to the RTOS Blackberry QNX there was memory corruption while reading the yang models from the disk.
Debugging led to the function `clicon_file_dirent` in `clixon_file.c` in which the `struct dirent` is copied into an array.
According to the UNIX `struct dirent` [documentation](https://man7.org/linux/man-pages/man0/dirent.h.0p.html):
>  The name of an array of char of an unspecified size should not be
>  used as an lvalue. Use of:
>
>           sizeof(d_name)
>
>  is incorrect; use:
>
>          strlen(d_name)
>
>      instead.

I adjusted the memory allocation to take the `strlen(dent->d_name)` into account.
2021-06-09 23:35:33 +02:00
Olof hagsand
7d59ec1a3a * Fixed: [JSON parsing error for a specific input. #236](https://github.com/clicon/clixon/issues/236)
* JSON empty list parse problems, eg `a:[]`
2021-06-09 11:44:28 +02:00
Olof hagsand
84f5762ab5 * Most tests work with HTTP/2 support using nghttp2
* except non-ssl http/1->/2 upgrade
* Restconf: ensure HEAD method works everywhere GET does.
2021-06-08 20:53:43 +02:00
Olof hagsand
b680e3c5ac - Restconf nghttp2 compiles 2021-06-03 22:47:54 +02:00
Olof hagsand
37da0aa45e fuzzing restconf changes, json mem error 2021-06-02 13:39:48 +02:00
Olof hagsand
0ad577fa81 - Started nghttp2 work
-  Added autoconf config options, temporary for nghttp2 development: `--disable-evhtp`and `--enable-nghttp2`.
- Added special case for api-path:s beginning with //
2021-05-31 19:11:19 +02:00
Olof hagsand
c405a08ff8 Restconf https fixes after nmap and fuzz:
- segv in PUT/POST of /
- Dont return bad request on error, just close socket
2021-05-28 16:17:52 +02:00
Olof hagsand
af88b974fd - Fuzz for restconf and cli updated 2021-05-27 20:39:49 +02:00