On 03/03/2016 02:00 PM, Petr Cech wrote:
Hi,
I found an interesting thing. I wonder if this is a bug or not. I tried
to write a test for sysdb_sudo_store() function:
# src/db/sysdb_sudo.h
errno_t
sysdb_sudo_store (struct * sss_domain_info domain,
struct sysdb_attrs ** rules,
size_t num_rules);
As far as I see first parameter (struct *sss_domain_info domain) like
input I don't understand why talloc_report() shows different sizes of
`domain` before and after call of sysdb_sudo_store().
I went deeper and I found that the struct ldb_context is changing during
processing of call.
before call:
struct ldb_context contains 2597 bytes in 80 blocks (ref 0) 0x13681d0
after call:
struct ldb_context contains 2558 bytes in 79 blocks (ref 0) 0x13681d0
(Attached patch prints talloc_report() for domain structure.)
With this in mind I can try rewrite the test for sysdb_sudo_store().
Regards
Try if patch 0007-mock-domain-reset-ldb-errors.patch from cache_req
improvements thread solves the issue for you.