Krzysztof Malysa [Thu, 19 Dec 2024 16:21:30 +0000 (17:21 +0100)]
Release 0.19.7
* Fix deadlock in synchronous client
Change-Id: Ib1b5f08b9108d84ebd399e4b1ba13c4027c41f4e
Krzysztof Malysa [Thu, 19 Dec 2024 16:08:53 +0000 (17:08 +0100)]
Fix deadlock in synchronous client
When cynara client sends request it has to send it fully before awating
the response. This commit fixes the opportunistic singleshot send call.
Change-Id: I0c64a196fb1183c765c9741b2896c1ffa07ed1a2
Tomasz Swierczek [Wed, 18 Dec 2024 10:36:21 +0000 (11:36 +0100)]
Release 0.19.6
* Register as CPU inheritance destination in a separate thread
* Add startup logs in release build
Change-Id: I1dae89e5ea9a78b7b7ce73d9fcd14074e81f08aa
Krzysztof Malysa [Wed, 18 Dec 2024 10:12:39 +0000 (11:12 +0100)]
Register as CPU inheritance destination in a separate thread
This should prevent cynara from delaying its start due to the
registering delay that happens on VD systems.
Change-Id: I085f17b795de99a5addf2d7f72e337a8cba20329
Krzysztof Malysa [Mon, 16 Dec 2024 12:47:33 +0000 (13:47 +0100)]
Add startup logs in release build
Change-Id: I79c1aa0a537343f95f24666c330d79602f7d6fac
Tomasz Swierczek [Thu, 12 Dec 2024 10:13:55 +0000 (11:13 +0100)]
Release 0.19.5
* Make the PID-based credential helper for client work with dev_wos
* Add credential helpers for PID
* Add cynara permissive mode build option - dev_wos
Change-Id: Idf13d46db24dfbe59cfb01c2c4c22e4bd73d3c95
Tomasz Swierczek [Thu, 12 Dec 2024 10:09:04 +0000 (11:09 +0100)]
Make the PID-based credential helper for client work with dev_wos
Change-Id: I427ac43aa5a4653454558fd39b088f1bfa401364
Zofia Abramowska [Fri, 6 Dec 2024 12:30:44 +0000 (13:30 +0100)]
Add credential helpers for PID
Change-Id: Ib2f522df40c04eb1e72a528b4a568b931f12f7cb
Tomasz Swierczek [Wed, 10 Apr 2024 07:21:09 +0000 (09:21 +0200)]
Add cynara permissive mode build option - dev_wos
Usage: gbs <your favourite flags> --define "dev_wos 1".
If not explicitly specified, the option is disabled (switched to 0).
This option is indended for development purposes only,
not for release builds.
With this option, Cynara enters "permissive mode" and can work
without Smack module enabled in Linux kernel.
In Tizen, Smack labels are used as process (application) identifiers,
and without them, there's no way to distinguish between processes,
making policy checking not easily possible.
With this option, all credentials helper functions that would
normally return client ID (= Smack label), return
same string: User::Pkg::default_app_no_Smack_mode
This mode is intended to be for bring-up development
of Tizen working in container.
This change tries its best to provide daemon still working
for policy management modules to set application policy with admin API,
however, client functionality is changed to always return with
"ALLOW" answer, without contacting the daemon, as no app
identification is possible (yet) without Smack.
Change-Id: I0e9387b1be1cf34b1fdd6c50c75bb4bf000a7d1d
Krzysztof Malysa [Tue, 10 Dec 2024 11:36:30 +0000 (12:36 +0100)]
Release 0.19.4
* Inherit async client CPU priority on connecting/sending requests
* Inherit admin client CPU priority on cynara_admin_{batch,}_check()
* Inherit client CPU priority on cynara_check()
Change-Id: Ie03775352b204ca936b7941f5a4816f58836c822
Krzysztof Malysa [Wed, 20 Nov 2024 13:04:58 +0000 (14:04 +0100)]
Inherit async client CPU priority on connecting/sending requests
Change-Id: I83587c92d544668d05f12c39c08a5e118416d0c5
Krzysztof Malysa [Tue, 10 Dec 2024 11:35:01 +0000 (12:35 +0100)]
Inherit admin client CPU priority on cynara_admin_{batch,}_check()
Change-Id: Ide2e5c6562701a291fab39638a13834892d6f8f7
Krzysztof Malysa [Wed, 30 Oct 2024 14:19:38 +0000 (15:19 +0100)]
Inherit client CPU priority on cynara_check()
Change-Id: Ia67d9b1239f7878e89c1e32c2282f9dbfe7249a8
Krzysztof Malysa [Thu, 5 Dec 2024 16:58:21 +0000 (17:58 +0100)]
Release 0.19.3
* Fix race condition that allows writing response too early
* Fix use after free
Change-Id: I90dab22dbdc29cc09ca0aefd13bd17c4c0062bbd
Krzysztof Malysa [Fri, 6 Dec 2024 12:16:28 +0000 (13:16 +0100)]
Fix race condition that allows disconnecting all clients too early
Change-Id: Id0cfd9596c20f4fb09f64172fcc4b92aacdf4e6c
Krzysztof Malysa [Thu, 5 Dec 2024 16:14:30 +0000 (17:14 +0100)]
Fix race condition that allows writing response too early
Change-Id: I5050178f813da5a257b8d84f2109645cba359977
Krzysztof Malysa [Wed, 4 Dec 2024 16:50:29 +0000 (17:50 +0100)]
Fix use after free
Change-Id: Id42e7514a0d29b91df25b28964481b4e66ad95cf
Krzysztof Malysa [Fri, 29 Nov 2024 17:45:55 +0000 (18:45 +0100)]
Release 0.19.2
* Fix cynara client sometimes getting CYNARA_API_SERVICE_NOT_AVAILABLE
* Switch from select() to epoll
* Initialize ForStats
* Remove unused function
Change-Id: I36f69b6b42ee14c3a0c2043feb0dba7a0faf319d
Krzysztof Malysa [Thu, 28 Nov 2024 08:07:47 +0000 (09:07 +0100)]
Fix cynara client sometimes getting CYNARA_API_SERVICE_NOT_AVAILABLE
Due to disconnecting all clients procedure upon database update, the
just connected client could have been disconnected resulting in
CYNARA_API_SERVICE_NOT_AVAILABLE error despite cynara service being up
and running.
Now this is avoided by not checking on the client side if connection is
up just after connecting.
Change-Id: If698c5b7c76e1670edbf08882e1ed813ca38e197
Krzysztof Malysa [Wed, 30 Oct 2024 19:10:28 +0000 (20:10 +0100)]
Switch from select() to epoll
This removes the limit of max 1024 listening fds.
And fixes some bogous state transitions in SocketManager that could
result in using closed file descriptors, reusing wrong file descriptors
and daemon crash.
Change-Id: I68d7a62b0a2f7114e0a0a9b3108df10291352a77
Krzysztof Jackiewicz [Fri, 25 Oct 2024 09:34:43 +0000 (11:34 +0200)]
Initialize ForStats
Change-Id: I70e75f5a8293637e14890d1fd26af743b1d57e0d
Krzysztof Malysa [Wed, 30 Oct 2024 18:21:17 +0000 (19:21 +0100)]
Remove unused function
Change-Id: Ibbfdc9fb27bfb98ca00ee33c127102555601b7a9
Krzysztof Malysa [Thu, 24 Oct 2024 12:48:01 +0000 (14:48 +0200)]
Release 0.19.1
* Don't accept new connections when their number is > 800
* Add logging some statistics about current connections
* Increase limit of open file descriptors to match the hard limit
* Write all responses before reading requests
Change-Id: I17b3e780e833bcdfe9dbbc61c6aed0299c93ef07
Krzysztof Malysa [Thu, 24 Oct 2024 12:43:06 +0000 (14:43 +0200)]
Don't accept new connections when their number is > 800
Change-Id: I2c83edd5216f43b3bb924193b55dd7cb4fe2092a
Krzysztof Malysa [Tue, 22 Oct 2024 15:32:59 +0000 (17:32 +0200)]
Add logging some statistics about current connections
Change-Id: I92ebd3c1338fa9d25e8dafcb271608fe83c666a9
Krzysztof Malysa [Mon, 21 Oct 2024 17:19:47 +0000 (19:19 +0200)]
Increase limit of open file descriptors to match the hard limit
Change-Id: Ia72903b06b1636cad9c27faed1fb9e0dc5e7cb8f
Krzysztof Malysa [Thu, 24 Oct 2024 10:31:11 +0000 (12:31 +0200)]
Write all responses before reading requests
Change-Id: Ibf7d8e9b11c1a02c0dbf9c2ef95a1c6be9be5a5e
Krzysztof Jackiewicz [Wed, 2 Oct 2024 13:23:54 +0000 (15:23 +0200)]
Release 0.19.0
* Add cynara_admin_check_batch() to API
Change-Id: If45836f887f63dc5d24e016341f6e5662bc10887
Krzysztof Malysa [Wed, 11 Sep 2024 16:48:46 +0000 (18:48 +0200)]
Add cynara_admin_check_batch() to API
Change-Id: I02b8aace1d195175799b10c83c1f74cf90039998
Krzysztof Malysa [Tue, 20 Aug 2024 09:05:19 +0000 (11:05 +0200)]
Release 0.18.4
* Fix release.sh
* Handle read-only requests concurrently if possible
* Cleanup the code
* Adjust coverage script after lcov upgrade
Change-Id: Ifc3dca0fe1bd662c8a3af0f09dfafb7d3c871650
Krzysztof Malysa [Tue, 20 Aug 2024 09:04:10 +0000 (11:04 +0200)]
Fix release.sh
Change-Id: I3b199c9d345147635be4001ee01c0a92848bd2fb
Krzysztof Malysa [Tue, 25 Jun 2024 11:58:45 +0000 (13:58 +0200)]
Handle read-only requests concurrently if possible
AdminCheck, List and sometimes Check and SimpleCheck as "read-only"
requests can be handled with the old policy while other requests install
a new policy.
This commit implements this logic, by creating a thread for handling
non-read-only requests and handling read-only requests in the current
thread.
This optimization makes cynara favour the read-only operations, reducing
request latency during writes to the database. In the below benchmark we can
see that although the median time did rise up due to overhead, the average time
to complete the response is 10 times lower and the max time is also reasonable.
The benchmark runs N threads that execute checks concurrently and one thread
that executes modifications to the cynara database. If either all modifications
are done or all threads are done executing checks, the benchmark ends. Number
of completed checks and modifications is shown below as well.
cynara-test tc02_concurrent_checks_and_modifications_online:
- before:
- T1 concurrent checks = 41 and T1 modifications = 60:
min 135.888us max 355409.247us avg 72164.196us median 51363.480us stddev 54810.217us
- T2 concurrent checks = 4 and T1 modifications = 60:
min 89501.124us max
2780571.441us avg
1434964.172us median
2756211.420us stddev
1321470.468us
- T4 concurrent checks = 88 and T1 modifications = 60:
min 172.504us max 507472.011us avg 127967.290us median 94624.078us stddev 90096.334us
- T8 concurrent checks = 115 and T1 modifications = 60:
min 182.550us max 643392.305us avg 201632.817us median 152837.071us stddev 114870.449us
- T16 concurrent checks = 117 and T1 modifications = 60:
min 251.474us max
1442323.541us avg 408241.545us median 278515.998us stddev 298364.669us
- after:
- T1 concurrent checks = 4036 and T1 modifications = 41:
min 27.113us max 40540.287us avg 469.489us median 122.090us stddev 3404.852us
- T2 concurrent checks = 8072 and T1 modifications = 41:
min 35.319us max 38290.327us avg 472.353us median 133.938us stddev 3082.039us
- T4 concurrent checks = 16144 and T1 modifications = 42:
min 32.213us max 36620.530us avg 467.503us median 122.385us stddev 2843.337us
- T8 concurrent checks = 32288 and T1 modifications = 42:
min 30.648us max 32727.901us avg 386.306us median 166.153us stddev 1972.602us
- T16 concurrent checks = 64576 and T1 modifications = 55:
min 34.016us max 38859.047us avg 456.097us median 315.623us stddev 1541.104us
With this change:
- Cynara does not choke when writes are happening.
- The variance of the measurements improves greatly.
- The max time the request takes is always low.
Change-Id: Ic5e8824a84ac08128a035f1e27e3013d96d12b71
Krzysztof Malysa [Fri, 19 Jul 2024 16:01:26 +0000 (18:01 +0200)]
Cleanup the code
Change-Id: I7ef926f261f1362aa87551b993f0df83cc2f6715
Dariusz Michaluk [Fri, 5 Apr 2024 10:36:34 +0000 (12:36 +0200)]
Adjust coverage script after lcov upgrade
Change-Id: I7b19431a6c445a83ed2caa10f11e2ac013ffa404
Zofia Abramowska [Fri, 1 Sep 2023 13:33:51 +0000 (15:33 +0200)]
Release 0.18.3
* Block SIG_PIPE on service send() operation
* Silence SVACE defect in tests
Change-Id: I086a4552930b093f39752de38d611083500fa31c
Zofia Abramowska [Fri, 1 Sep 2023 08:04:40 +0000 (10:04 +0200)]
Block SIG_PIPE on service send() operation
Change-Id: I49c3a8a4a52e8b35b5588377476551a79adc5c16
Krzysztof Jackiewicz [Fri, 21 Jul 2023 12:37:28 +0000 (14:37 +0200)]
Silence SVACE defect in tests
WGID 500405 | ProtocolSerialization.cpp:49PROC_USE.VULNERABLE
Use of vulnerable function 'strcpy' at ProtocolSerialization.cpp:49.
This function is unsafe, use strncpy instead.
Change-Id: I6f9aa86f14fbba072adf44dc49fcc8d4be086952
Tomasz Swierczek [Tue, 20 Jun 2023 07:55:42 +0000 (09:55 +0200)]
Release 0.18.2
* Fix new toolchain build errors
Change-Id: I20cb14d4d058ac5779e89657f31b84f76f00aee9
Tomasz Swierczek [Tue, 20 Jun 2023 04:41:19 +0000 (06:41 +0200)]
Fix new toolchain build errors
Change-Id: Id6c6852c41808d6d7cf447261fc1a88b01c06d44
Tomasz Swierczek [Fri, 27 Jan 2023 10:21:44 +0000 (11:21 +0100)]
Release 0.18.1
* Change release mode log level to warning
Change-Id: I3fd4087d40cf0ecdf14005fda7cf61c0975367fd
Tomasz Swierczek [Fri, 27 Jan 2023 09:55:09 +0000 (10:55 +0100)]
Change release mode log level to warning
Debug logs are clearly only for debug mode, but warnings
can be helpful in release mode (VD request).
Change-Id: I86b390fe2838aec3b793ca4bf9b274554a8e6d78
Dariusz Michaluk [Fri, 23 Dec 2022 07:34:46 +0000 (08:34 +0100)]
Release 0.18.0
* [helpers] Fix linking with creds-commons
* Add dbus helper API to fetch all credentials in one call
* Add gdbus helper API to fetch all credentials in one call
* Change some logs into warnings
Change-Id: Ic5f161e7410e8f93b607d7bb758d17ba322f5a4b
Zofia Abramowska [Thu, 15 Dec 2022 21:06:09 +0000 (22:06 +0100)]
[helpers] Fix linking with creds-commons
As TARGET_LIB_CREDS_COMMONS wasn't defined on level visible
for credential helpers build, credential libraries were not
properly linked.
Change-Id: I340cb0a312a3f98e9bf11957423a57fc40a35b65
Zofia Abramowska [Thu, 15 Dec 2022 22:39:53 +0000 (23:39 +0100)]
Add dbus helper API to fetch all credentials in one call
Change-Id: I17653b94fe79065354bdb82c52c378d9126dab15
Zofia Abramowska [Thu, 15 Dec 2022 22:39:19 +0000 (23:39 +0100)]
Add gdbus helper API to fetch all credentials in one call
Change-Id: Ie3a0446b60f837bdec42c80323fa6809c7cdddc9
Tomasz Swierczek [Thu, 15 Dec 2022 11:46:15 +0000 (12:46 +0100)]
Change some logs into warnings
As requested explicitly by Visual Display Division.
Change-Id: I54d18b426d0fc1f65d92352036e660ed6310736d
Tomasz Swierczek [Mon, 28 Nov 2022 11:31:12 +0000 (12:31 +0100)]
Release 0.17.2
* Add additional logs
* Implement better tryCatch
* Put some .cpp-local entities in anon ns
* Remove unused sec_build_binary_debug_enable build macro
Change-Id: I40820f05f1ddbe5a9a7455c2796e5dbd64b56b35
Tomasz Swierczek [Mon, 28 Nov 2022 11:28:58 +0000 (12:28 +0100)]
Add additional logs
All done for explicit request of Visual Display division.
Change-Id: I7b4f6a487d1dddf5288c3ab5758249bd3e3c6b5e
Tomasz Swierczek [Mon, 16 May 2022 12:31:44 +0000 (14:31 +0200)]
Implement better tryCatch
"Gotta catch them all!"
- from Pokémon
Recently it was reported that there's an issue if not-handled
std::bad_alloc in Cynara. After getting more information
(incl. decompiled version of the module), it was found that
when compiled using gcc, implementation of std::function made on-the fly
as argument to tryCatch() is being allocated BEFORE passing it to
the tryCatch() function.
When compiled using clang9, there is no new() in that place.
This patch changes tryCatch() to a template with function being
an R-value reference with std::forward, solving the issue.
Decompiled version with additional new
(thanks to Konstiantyn Melnik, k.melnik@samsung.com):
int __cdecl cynara_check(void *cynara_struct, char *client, char *client_session, char *user, char *privilege)
{
int v5; // ebx
char ***lambda_func_obj; // eax
char *__loc_privilege_ptr; // [esp+1Ch] [ebp-4Ch]
char *__loc_user_str; // [esp+20h] [ebp-48h]
char *__loc_client_session_str; // [esp+24h] [ebp-44h]
char *__loc_client_str; // [esp+28h] [ebp-40h]
void *__loc_cynara_struct; // [esp+2Ch] [ebp-3Ch]
char ***lambda_func_ptr; // [esp+3Ch] [ebp-2Ch]
int (__cdecl *v14)(void **, void **, unsigned int); // [esp+44h] [ebp-24h]
int (__cdecl *func_to_run)(void *); // [esp+48h] [ebp-20h]
unsigned int guard_var; // [esp+4Ch] [ebp-1Ch]
__loc_privilege_ptr = privilege;
__loc_cynara_struct = cynara_struct;
__loc_user_str = user;
__loc_client_str = client;
__loc_client_session_str = client_session;
guard_var = __readgsdword(0x14u);
if ( cynara_struct
&& *(_DWORD *)cynara_struct // if (!p_cynara || !p_cynara->impl)
// return CYNARA_API_INVALID_PARAM;
&& client // if (!isStringValid(client) || !isStringValid(client_session))
// return CYNARA_API_INVALID_PARAM;
&& strlen(client) <= 0x1000
&& client_session
&& strlen(client_session) <= 0x1000
&& user
&& strlen(user) <= 0x1000 // if (!isStringValid(user) || !isStringValid(privilege))
// return CYNARA_API_INVALID_PARAM;
&& privilege
&& strlen(privilege) <= 0x1000 )
{
lambda_func_obj = (char ***)operator new(0x14u);
lambda_func_ptr = lambda_func_obj;
*lambda_func_obj = &__loc_client_str;
lambda_func_obj[1] = &__loc_client_session_str;
lambda_func_obj[2] = &__loc_user_str;
lambda_func_obj[3] = &__loc_privilege_ptr;
lambda_func_obj[4] = (char **)&__loc_cynara_struct;
func_to_run = (int (__cdecl *)(void *))sub_4B80;
v14 = sub_3930;
v5 = Cynara::tryCatch(&lambda_func_ptr);
if ( v14 )
v14((void **)&lambda_func_ptr, (void **)&lambda_func_ptr, 3u);
}
else
{
v5 = -4;
}
if ( __readgsdword(0x14u) != guard_var )
terminate_proc();
return v5;
}
Change-Id: I5455d03d411b03ed76a81659efb60c6474ceb99b
Konrad Lipinski [Tue, 7 Dec 2021 12:54:40 +0000 (13:54 +0100)]
Put some .cpp-local entities in anon ns
This fixes at least one ODR violtation (FakeStreamForBucketId) which was
defined twice, in test/storage/serializer/{deserialize,serializer}.cpp.
Two unit tests would fail in some environments as a result, particularly
StorageSerializerFixture.dumpBucketsPositive, due to dynamic_cast
failing within gtest (the one from serializer.cpp was being cast to the
one from deserializer.cpp).
Change-Id: Ie0dc0191b4e45d032b68b0df9bfcdf81fca8678f
Dariusz Michaluk [Thu, 25 Nov 2021 10:34:30 +0000 (11:34 +0100)]
Remove unused sec_build_binary_debug_enable build macro
Change-Id: I3d8c8e4c936449ff36b7288580d90383ce64a2fe
Konrad Lipinski [Tue, 13 Apr 2021 12:06:53 +0000 (14:06 +0200)]
Release 0.17.1
* Fix UB in predicate-driven PolicyBucket erasure
Change-Id: Iee7c125a927905e68e3477c0126b989951f5366c
Konrad Lipinski [Mon, 12 Apr 2021 14:39:25 +0000 (16:39 +0200)]
Fix UB in predicate-driven PolicyBucket erasure
Change-Id: Ic1559c79c875e503ac165c29671460ad56deaab2
Konrad Lipinski [Tue, 23 Mar 2021 11:03:56 +0000 (12:03 +0100)]
Release 0.17.0
* Automate code coverage measurement
* Add dependency warning on enabling journal logs in cynara-client
* Shrink CapacityCache keys, speed up generation
* Prevent iterator invalidation in CapacityCache
* Fix zero-initialization of class members
* Remove unused code
* Categorize existing unit tests into positive & negative cases
* Add/amend assorted unit tests to increase coverage
* Fix cyad backup command help position and message
* Redo error printing in cyad
* Remove unnecessary copies
* Force googletest to build with c++17 instead of c++11
* Move protocol serialization/deserialization to one place
* Ensure that MonitorCache capacity is of permissible size
Change-Id: I1daf23ca44ec9fb41ebb29ae1e8facd84a14ae0c
Dariusz Michaluk [Thu, 18 Mar 2021 11:56:31 +0000 (12:56 +0100)]
Fix debug source directory name in coverage script
Change-Id: I0789ea1b0676438e2f1be3c7e55a652074a69e4e
Tomasz Swierczek [Wed, 3 Mar 2021 13:59:09 +0000 (14:59 +0100)]
Fix coverage generation in rpm 4.14.1
Debug source package directories now have different names.
Change-Id: Ic84985a203189b67ce01e0db8be222756e1e2f77
Tomasz Swierczek [Thu, 18 Feb 2021 08:50:52 +0000 (09:50 +0100)]
Add dependency warning on enabling journal logs in cynara-client
libdbus-policy is going to be integrated with systemd on
kdbus-aware systems. This, combined with cynara-client
which can be configured to use journal (systemd) logs,
can lead to cyclic build dependency:
systemd -> libdbus-policy -> cynara -> systemd
This patch adds a warning comment in spec file where configuration
of the logging module is done and adds a warning displayed from
CMake during build to check the cyclic dependency.
Removal of journal logging was not performend as older cynara
releases used to take advantage of it and the implementation
may be still useful.
Change-Id: I474ae7d6f2724dbaf855adb2c49cea38168d85a3
Konrad Lipinski [Tue, 16 Feb 2021 10:51:30 +0000 (11:51 +0100)]
Move CapacityCache::keyToString() to anonymous namespace
Change-Id: I528688316856505b734109fa5fb6e263f9752def
Konrad Lipinski [Mon, 15 Feb 2021 07:05:17 +0000 (08:05 +0100)]
Shrink CapacityCache keys, speed up generation
Change-Id: Ifc8806b934e7a44a81a3e58e850755ad8baf3765
Krzysztof Jackiewicz [Fri, 12 Feb 2021 09:00:35 +0000 (10:00 +0100)]
Prevent iterator invalidation in CapacityCache
If resultIt happens to point to the element that gets evicted, it will
be invalidated. Perform lookup after possible eviction.
Change-Id: I4d536c6779494f85077a247e3356374346fa35b2
Dariusz Michaluk [Wed, 2 Sep 2020 13:56:43 +0000 (15:56 +0200)]
Automate code coverage measurement
To gather unit tests coverage report:
- use COVERAGE build_type,
- instal cynara-coverage rpm,
- run cynara-coverage.sh script.
Change-Id: I96e113e2fff06e126ea20a1a2bb06dfdd98ae0db
Mateusz Cegielka [Fri, 2 Oct 2020 13:40:40 +0000 (15:40 +0200)]
Fix zero-initialization of class members
Some class members are not zero-initialized, which can cause seemingly
innocent initializations to result in uninitialized memory, which can
cause UB. While unlikely, this shows up as a critical issue in SVACE.
I have changed the constructors so that they explicitly initialize
members in order to fix the issue.
Change-Id: I16e1f253985e1c37f3b5ee67d3d9c91696706054
Dariusz Michaluk [Wed, 2 Sep 2020 13:40:27 +0000 (15:40 +0200)]
Remove unused files
Change-Id: I7751179a91f0b468e67ff6ff621028bfdfbf5f13
Zofia Abramowska [Wed, 5 Aug 2020 16:48:27 +0000 (18:48 +0200)]
Categorize performance unit tests
Categorize into positive/negative test cases.
Change-Id: I19e49df3f26e84f368e744aae235cc3725cdeae6
Zofia Abramowska [Wed, 5 Aug 2020 16:41:30 +0000 (18:41 +0200)]
Categorize EntriesQueue unit tests
Categorize into positive/negative test cases.
Change-Id: I296ea8d0e768eb86eacdfe986ae7e9764e33deb4
Zofia Abramowska [Wed, 5 Aug 2020 16:15:46 +0000 (18:15 +0200)]
Categorize PolicKey unit tests
Categorize into positive/negative test cases.
Change-Id: Ic00e9a906c50f40eb92bfede740e73ef8daa0650
Zofia Abramowska [Wed, 5 Aug 2020 16:12:32 +0000 (18:12 +0200)]
Categorize StorageDeserializer and StorageSerializer unit tests
Categorize into positive/negative test cases.
Change-Id: I3c1c1f295993b9fa511b7401f8929df6bb93e227
Zofia Abramowska [Wed, 5 Aug 2020 16:10:04 +0000 (18:10 +0200)]
Categorize BucketDeserializer unit tests
Categorize into positive/negative test cases.
Change-Id: I6986240e763cc1ea274415b0abaaa4496be0a446
Zofia Abramowska [Wed, 5 Aug 2020 16:06:15 +0000 (18:06 +0200)]
Categorize InMemoryStorageBackend unit tests
Categorize into positive/negative test cases.
Change-Id: Ie5212cef2761849dfbee1430293b7ea2f07215b0
Zofia Abramowska [Wed, 5 Aug 2020 15:56:43 +0000 (17:56 +0200)]
Categorize Storage unit tests
Categorize into positive/negative test cases.
Change-Id: I33b618de130e7d496848f7213ac392279e0f854a
Zofia Abramowska [Wed, 5 Aug 2020 15:52:50 +0000 (17:52 +0200)]
Categorize ChecksumValidator unit tests
Categorize into positive/negative test cases.
Change-Id: I67e876a1b6205bf64e0261278732f95e9593274b
Zofia Abramowska [Wed, 5 Aug 2020 15:48:44 +0000 (17:48 +0200)]
Categorize EntriesManager unit tests
Categorize into positive/negative test cases.
Change-Id: I24f66ec022f60434399567880659b87fca53e4df
Zofia Abramowska [Wed, 5 Aug 2020 15:27:19 +0000 (17:27 +0200)]
Categorize Cynara cmdline parser unit tests
Categorize into positive/negative test cases.
Change-Id: I13a7d04717131024a151b2dd8f321800927353a7
Zofia Abramowska [Wed, 5 Aug 2020 15:21:25 +0000 (17:21 +0200)]
Categorize AdminPolicyParser unit tests
Categorize into positive/negative test cases.
Change-Id: Ia86512bfc7fa91ff1f941c93f4bb279cc5b5a637
Zofia Abramowska [Wed, 5 Aug 2020 15:19:43 +0000 (17:19 +0200)]
Categorize CynaraAdminPolicies unit tests
Categorize into positive/negative test cases.
Change-Id: Ied6728a02db0f05d741afbee24fad0d60e14d91e
Zofia Abramowska [Wed, 5 Aug 2020 14:58:40 +0000 (16:58 +0200)]
Add missing test categorization in ProtocolAdmin negative unit tests
Change-Id: I152549b18c914c5c807484caf90ee6f94b204997
Zofia Abramowska [Mon, 3 Aug 2020 10:41:33 +0000 (12:41 +0200)]
Redo cyad commands dispatcher unit tests
* Minor refactorin
* Categorize into positive/negative test cases
Change-Id: Ib449c1b76863d84cda543db752d965a1b5abbf05
Zofia Abramowska [Fri, 31 Jul 2020 16:20:01 +0000 (18:20 +0200)]
Categorize CmdlineOpts unit tests
Categorize into positive/negative test cases.
Change-Id: Ifa0d505ab9fb2e678f69ea5664f15a1922e5fd5c
Zofia Abramowska [Fri, 24 Jul 2020 17:45:28 +0000 (19:45 +0200)]
Redo Cyad commandline unit tests
* rename positive/negative test cases
* add more negative test cases
Change-Id: I204814abcb11cfa41904ed5f3fa45223421cade5
Zofia Abramowska [Fri, 24 Jul 2020 17:44:33 +0000 (19:44 +0200)]
Fix cyad backup command help position and message
Change-Id: I7c8f0de363e8d3b64922ea9d3947cbf37c04b931
Zofia Abramowska [Fri, 24 Jul 2020 17:01:00 +0000 (19:01 +0200)]
Redo error printing in cyad
* remove unused error message generators
* systematize unknown option, missing option and missing argument
errors printing for all main and sub options
Change-Id: I59368ffc0402b5f07d58616468a045c47fa3596d
Zofia Abramowska [Tue, 21 Jul 2020 16:49:17 +0000 (18:49 +0200)]
Redo Credentials Config Parser unit tests
* Categorize into positive/negative test cases
* Split mixed test cases
Change-Id: I069b535d526aad4496dc6ef2befe7c96e133b8ce
Zofia Abramowska [Tue, 21 Jul 2020 15:20:19 +0000 (17:20 +0200)]
Categorize string validation unit tests
Categorize into positive/negative test cases.
Change-Id: I4675e0a5c8d0d8f5682d3d54667a265cd6ac03f4
Zofia Abramowska [Mon, 20 Jul 2020 18:38:56 +0000 (20:38 +0200)]
Categorize PolicyBucket unit tests
Categorize into positive/negative test cases.
Change-Id: I7f289446a33303cd1e2f1845a925176b6f294aef
Zofia Abramowska [Mon, 20 Jul 2020 18:56:22 +0000 (20:56 +0200)]
Remove unnecessary copies
Change-Id: Iea05840fc9366319f17ccc98919efbbf4c350a99
Zofia Abramowska [Mon, 20 Jul 2020 17:33:09 +0000 (19:33 +0200)]
Categorize PolicyBucketFixture unit tests
Categorize into positive/negative test cases.
Change-Id: Ic78e793e3d9d1ffe8e969f1f2054af2f83dc41ac
Zofia Abramowska [Mon, 20 Jul 2020 17:21:56 +0000 (19:21 +0200)]
Redo unit tests for MonitorGetEntriesRequest in ProtocolMonitorGet
* squash positive test cases
Change-Id: Ida7226e6692548d181cff18f18633d10ce2f6f36
Zofia Abramowska [Mon, 20 Jul 2020 17:01:45 +0000 (19:01 +0200)]
Fix: Add missing using for ::testing::DoAll
Change-Id: I2f1c9b822fba93de3f513854a071b8684e563499
Zofia Abramowska [Mon, 20 Jul 2020 16:55:11 +0000 (18:55 +0200)]
Force googletest to build with c++17 instead of c++11
Newest googletest builds explicitly with c++11. This makes this
standard propagate to cynara-tests compile options and causes
a build break. This should be only a temporary fix, as cynara CMake
build files should be rewritten properly.
Change-Id: I8afa84921fb2eb2979afc6a7e7b072428bdb258f
Zofia Abramowska [Mon, 20 Jul 2020 13:45:57 +0000 (15:45 +0200)]
Redo unit tests for MonitorGetEntriesResponse in ProtocolMonitorGet
* squash positive test cases
* add invalid protocol test cases
Change-Id: I2172a1a8814a924754411704b1d166df681ba92c
Zofia Abramowska [Fri, 17 Jul 2020 16:34:10 +0000 (18:34 +0200)]
Redo unit tests for MonitorGetFlushRequest in ProtocolMonitorGet
* squash positive test cases
Change-Id: I848f90d1e9d565ee186f2728d37951144c297900
Zofia Abramowska [Fri, 17 Jul 2020 16:23:02 +0000 (18:23 +0200)]
Add negative test case to RemoveBucketRequest unit tests
Add invalid protocol test case.
Change-Id: I06ddadc7acbd57c7f2bf52746a7770f23d0ad37f
Zofia Abramowska [Fri, 17 Jul 2020 15:48:49 +0000 (17:48 +0200)]
Redo unit tests for ListResponse in ProtocolAdmin
Change-Id: Ib012cc489597013c1b1af260d1c890af17e6673e
Zofia Abramowska [Fri, 17 Jul 2020 15:25:34 +0000 (17:25 +0200)]
Redo unit tests for ListRequest in ProtocolAdmin
* squash positive test cases
* add invalid protocol test cases
Change-Id: Iff443af42933c5ca8b942844b06c259a533b7627
Zofia Abramowska [Fri, 17 Jul 2020 15:02:35 +0000 (17:02 +0200)]
Add negative test to InsertOrUpdateBucketRequest unit tests
Add invalid protocol test case.
Change-Id: I40928c4db573adaba9c5cc706033c37a7423f93d
Zofia Abramowska [Thu, 16 Jul 2020 17:06:17 +0000 (19:06 +0200)]
Redo unit tests for EraseRequest in ProtocolAdmin
* squash positive test cases
* add invalid protocol test cases
Change-Id: I4e3d65668c3bd42ce56c8b3107b631affe7afd70
Zofia Abramowska [Thu, 16 Jul 2020 16:26:40 +0000 (18:26 +0200)]
Redo unit tests for DescriptionListResponse in ProtocolAdmin
* squash positive test cases
* add invalid protocol test case
Change-Id: I798369d477bf4feefcea93e9ac54423357cf2f26
Zofia Abramowska [Thu, 16 Jul 2020 13:56:23 +0000 (15:56 +0200)]
Categorize unit tests for DescriptionListRequest in ProtocolAdmin
Categorize into positive/negative test cases.
Change-Id: I0a1c0b6b9e53ff31d3000d6994cd665df0d6905c
Zofia Abramowska [Thu, 16 Jul 2020 13:52:47 +0000 (15:52 +0200)]
Redo unit tests for AdminCheckResponse in ProtocolAdmin
* squash positive test cases
* add invalid protocol test case
Change-Id: I2a3e46e2df2942e091aa0620345c91c4e7d10bbb
Zofia Abramowska [Thu, 16 Jul 2020 13:20:14 +0000 (15:20 +0200)]
Redo unit tests for AdminCheckRequest in ProtocolAdmin
* squash positive test cases
* add invalid protocol test cases
Change-Id: Icfbceb6ba42d3ebf96855caf7a44482058fbb883