aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-10-04Backport to cmake 3.12José Bollo2-12/+5
The command target_link_options only appear in cmake 3.13 Change-Id: Ie66464244a139531dfa8ca4f239c53f9d2f3afaa Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-10-04Add facility to compileJosé Bollo1-0/+15
Change-Id: Ib4d4a03f79056ae17ba1112657eb7fe37b194527 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-10-04Move to CYNAGORAJosé Bollo44-776/+741
Rename everything to match the new name of cynagora Change-Id: I7e529def486ca5721164b338d2c615996fbc6ca4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-10-04Isolate compatibility with old cynaraJosé Bollo29-72/+122
The compatibility items of the old cynara librarie are separated and isolated. The option WITH_CYNARA_COMPAT activates it or not. Change-Id: Iba77c97d8df31f5f515b57411487943192451ac6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-10-04Improve library split partsJosé Bollo12-49/+191
In prevision of further developments (like plugins) the server is splitted in two parts: the server program itself and the core library. The client library is also splitted in two parts: the compatibility part and the real client part. Change-Id: Iaee93298d52eb825ad9aed5d2b3e74c2975b5950 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-10-04anydb: Fix error in anydb_is_emptyJosé Bollo1-7/+17
Compute correctly if a database is empty or not. Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-10-03Improve commentsJose Bollo38-781/+2196
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-09-30Change agent interfaceJose Bollo3-92/+129
Instead of using callbacks, create the query to allow processing subqueries in response to agent queries. Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-09-27More comment for cyn.[ch]José Bollo4-36/+251
Change-Id: Ia3e6ca458f27ede690cfc6934dd9a6b320ed5d67 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-09-10Add file-prefix-map optionJosé Bollo1-0/+1
Change-Id: I275e60cad74074cada35755a464da85c3d821e92 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-09-09Fix setting of socket directoryJose Bollo2-5/+3
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-09-09Improve helpJose Bollo1-1/+1
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-09-09Fix missing new linesJose Bollo2-9/+9
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-08-16cache: fix bugJosé Bollo1-1/+1
Change-Id: Ie1d65068f962335b46bd2ca259a002eb559db83c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-08-14cynadm: Add options --cache and --echoJosé Bollo2-12/+34
The option --cache allows to set the cache size The option --echo allows to emit the evaluated commands Change-Id: If57d2a229dd263bf77a61973633d7447441277b0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-08-14tests: add stress-cache testJosé Bollo1-0/+32
Change-Id: Ieccbd068c032e141c41eb7e2c53969348a959208 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-08-14rcyn-client: fix strange typoJosé Bollo1-1/+0
Change-Id: I5eec641721ba1a8b5bd489e4438fb0f0ccad40f1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-08-14lib-compat: Improve debugabilityJosé Bollo1-4/+12
Change-Id: I2fa317b494f02c2725886a9874af340337b082cb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-08-14cache: improve cache managementJosé Bollo1-1/+3
Change-Id: I2a95154e728bf87976280b52ae0214664b107fd6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-08-14Fix tab/space issueJosé Bollo1-1/+1
Change-Id: I1ef85b90f5361af31247f0547376af0e5f08f14d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-08-10make valgrind happyJose Bollo1-0/+3
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-08-09Add and improve asynchronous clientsJosé Bollo2-53/+219
The client program cynadm gets 2 new commands: acheck and atest that are intended to use asynchronous test and check. The client programs cynadm and test-old-cynara now read as much a possible input before to process asynchronous answers. This is made to simulate congestion on asynchronous client. Change-Id: I1c9dbfe43f150725d530c155135ead8e758897e5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-08-06Improve internal type "data_key_t"José Bollo1-10/+11
Change-Id: I0d2d1566819dc595e46ab09cdab9b8c1dd5b6537 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-07-26cynadm: fix empty list bugJosé Bollo1-10/+12
Change-Id: I3f64af57796dfc6b38f4cd51ab838e820e6cbb9c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-07-26cache: Fix bug of memmoveJosé Bollo1-7/+12
Change-Id: I75b346ea71a0c3fbc1109cd0aedf9ed7c5ebbce9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-07-26cynadm: fix help for 'cache'José Bollo1-6/+0
Change-Id: I08a7a254ccef10036a4dbb1ef05d3198f5801457 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-07-26cynadm: align listing on leftJosé Bollo1-1/+1
Change-Id: I51876cc4bf85d692a8bee7cf272d5eeddff9c2a7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-07-25Avoid fortify false positiveJosé Bollo2-8/+9
Change-Id: Iceb888ed5cccc46bde9e479a2b1ae9a5a6c4ee53 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-07-23Install agent socket for systemdJosé Bollo4-0/+19
Change-Id: I838788b71908a287fe45c59ed51c20a3f8007a70 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-07-12filedb: fix a warningJosé Bollo1-0/+4
Change-Id: If2f4c07addbf7843f6c4cb2b26da1f9b902ee60f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-06-19Change test/check protocol resultJose Bollo4-105/+128
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-06-14Allow no caching at allJosé Bollo5-26/+30
Change-Id: I73f7a7cc6ab96cc7e6064e267b126b883b94bc69 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-06-13Allow admin to (un)set loggingJosé Bollo7-45/+105
Change-Id: I5479c9e35512ab77a005692903733f7d1af627a3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-06-13Fix saving the database on simple changeJosé Bollo4-3/+4
Change-Id: I393d6aa53b98aff102417c263447e2d34e80d531 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-06-13Add log option for tracking protocolJosé Bollo3-5/+52
Change-Id: Ifb780ac4133732a4218fa3018b9ecec9f3b67718 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-06-13agent-at: Improve commentsJosé Bollo2-14/+65
Change-Id: Ica1479c4ccac93ff153c0e0bf79a3eab6ae882f9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-06-07Improve formatting of 'cynara.initial'José Bollo1-7/+12
Change-Id: I3aa631e0348ab2b1a80b5976e19829ffe75fa673 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-24Rework the initial definitions for agent @Jose Bollo1-2/+8
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-24Sort output of listJose Bollo1-9/+114
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-24Add cacheidJosé Bollo11-41/+116
The idea is to allow a client to disconnect and reconnect without losing its cache. Change-Id: I017176e5eb5f553b961a32ee466d1b7a175532bb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-22Add environment var for socket namesJose Bollo5-16/+61
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-22Refactor agent mechanismJose Bollo10-98/+358
Agent are now named and called when the value returned is prefixed by name+colon. For example, the agent 'me' receives the requests 'request' and the asked key for the rule: * * * * me:request forever Add the always available AGENT-AT implementation. The AGENT-AT handles the value prefix @: to re-ask the database with a query derived from the value. Example: the rule * * 1001 * @:%c:%s:OWNER:%p forever if selected for the query key {client=C, session=S, user=1001, permission=P} will produce the evaluation of the key {client=C, session=S, user=OWNER, permission=P} The values @: are structured as 4 field separated by colons (:). The sequences %c, %s, %u, %p, %% and %: are substituted by client, session, user, permission, % and :, with values coming from the original request. Change-Id: I7043845292f13f9c269a71cfabc4715330eaff34 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-05-13Switch to filedbJose Bollo10-993/+911
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-09Add help on 'cynadm'Jose Bollo1-1/+226
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-09Replace 'always' by 'forever'Jose Bollo1-2/+2
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-09Set default socket type to unixJose Bollo1-4/+4
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-09Rework transactionJose Bollo7-47/+182
2019-05-09Introduce Any DB abstraction and memdb on its topJose Bollo11-774/+1950
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-05-09Remove session from DBJose Bollo1-33/+26
The stored sessions MUST be *. Some thing still have to be set for sessions. Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-04-29Rework of many thingsJosé Bollo32-1217/+1716
Change-Id: Iadeba6f0602f7be017244c2602fae2bbe2abf74e Signed-off-by: José Bollo <jose.bollo@iot.bzh>