Add 'default-ac-domains' package dependency in spec file

This dependency is needed for using System domain for cynara service.

Change-Id: Ib0c21e3375309f25c893289fd1271b84798fdb85
Fix parameter checking when setting bucket-pointing policy

Field result_extra in cynara_admin_policy structure should contain
another bucket's name in case of insertion or update of a policy
pointing to another bucket.

There was no check for that. In case a nullptr was passed, it was
converted to an empty string "".

Now cynara_admin_set_policies
returns CYNARA_ADMIN_API_INVALID_PARAM when
result is set to CYNARA_ADMIN_BUCKET and
result_extra is nullptr.

Change-Id: I24ff5ab662e88b7bc538368385e13d78f48f9e9a
Correct exception catching

Exception should be caught by reference.

Change-Id: I19e906aa892956b783f174f6d40c63b4320cda93
Fix implementation of what() method in Exception class

Change-Id: Ib0259dbd85bc5526b474396ac82b819f0b03b54d
Remove unneeded return statement

Change-Id: Ib500dd5249cbe37adbab441bb6700fb8554e3c18
Correct snprintf format string in Backtrace::buildBacktrace() method

Additionally use static_cast and reduce scope of local variable.

Change-Id: Idbaf8f6622ae8bf4e2610e378c6a001ea3a0acbf
Reduce scope of variables

Change-Id: Ib18cde12f9508cb17469bcef0bb38a6665d6297d
Fix dumping PolicyKey in StorageSerializer

StorageSerializer no longer uses PolicyKey::toString(),
which was meant only for logging purposes.

Change-Id: I14214319ce7d2c3a7c79b60a44bb56ae79c2dad4
Make (de)serializer classes more generic and easier testable

StorageSerializer and StorageDeserializer now accept std::ostream
and std::istream respectively, to enable unit testing.
Storage::insertPolicies() body has been slightly rearranged
to be more readable.

Change-Id: I54296a679a5d1b736ae4f3829f718b6bf8aea66e
Adjust tests for new storage and serialization API

Tests need to be adjusted because of changes in
Storage::insertPolicies() and Storage::deletePolicies().
They also make use of pointers on I/O streams instead of references
(in serializers and deserializers).

Change-Id: Ief7e256f0848097caa66365ffd063289c50ec26c
Fix Cynara::PolicyBucket tests

Wildcards test has been inverted -- now wildcard policies are stored
in buckets and checks are made only against concrete keys.

Change-Id: I8b1a02a6648961403829564bf81d57dd42e1036d
Enable logs in admin library

Change-Id: Ib54497540ce9bb61e98e9cb50317bc71ccbb8ffa
Add SIGPIPE ignoring in client and admin libraries

Change-Id: I485dee789cc3916256affea310b7bd288200eec6
Remove unused bucket visitor mechanism from BinaryQueue class

Change-Id: I0601ad50a6bb3ab9e1eba6323ba74faa1f07f51f
Make few methods static in Cynara and SocketManager classes

This change is due to cppcheck report.

Change-Id: Ib163bc4294d4afdf3742564a7fd0d4bf7a81304f
Make protocol() method const in Descriptor class

Change-Id: Ic4d14c09af552c9a675f1f2f7fe6c696277b7010
Add Cynara::PolicyKeyHelpers

PolicyKeyHelpers is an utility class holding
helper functions to manage policy keys.

Change-Id: I2f9195d62fc22809989890b0914f385b1c05d0b6
Implement a better data structure to store policies

A new map-based structure was used to store policies
in Cynara::PolicyBucket. This allows policy checks
to be much faster.

PolicyBucket interface was changed, so the operation
required a lot of refactorings across many storage classes.
Most of functions are now simpler, clearer and decoupled
from each other. Tests has been adjusted. No public API changes
were required.

Change-Id: Ida9dc8eb31120b27cf9547e56840dd27390de247
Fix build break on DEBUG dbuild type

Build was breaking during compilation with DEBUG option.
snprintf was dropped and ostringstream is now used.
Thanks to that we do no need to cast unw_word_t to void* during printing.

To verify this check build with '--define "build_type DEBUG"' flag
without and with this commit.

Change-Id: I92f7b85873df2ea25c050f5b4949a6c6562535f7
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
Remove dependency to security-server

Dependencies are relict of first cynara version that used
security-server for checking privileges in libprivilege-control
database.

Change-Id: Iaa61370e048a824e4a5b09975f2349f0f915c847