[PATCH] RFC: Support both cmocka 1.0 and pre-1.0 API at the same time
by Jakub Hrozek
Hi,
the attached two patches add a way to detect pre-1.0 cmocka and adds
compatible definitions in the first patch and uses them to convert a
single unit test.
I found the approach ugly myself, so much that I'm considering converting
all cmocka-based tests to cmocka-1.0 and don't compile the cmocka tests at
all unless 1.0 or later is present on the system. It's not functionality
after all, "just" tests and for CI we could add cmocka-1.0 to the CI
system ourselves..
Opinions?
9 years, 1 month
[PATCHES] ldap: refactor - reuse sss_utc_to_time_t()
by Pavel Reichl
Hello,
I recently introduced new utility function sss_utc_to_time_t(). This patches should refactor some existing code to reuse it.
1st patch - add unit tests for fuctions to be amended.
2nd patch - amends check_pwexpire_kerberos() and modifies test - to clearly show how has behavior changed.
3rd patch - amends nds_check_expired() - no test changes required
ci of this version of patches has passed.
http://sssd-ci.duckdns.org/logs/job/10/95/summary.html
Thanks!
9 years, 1 month
[PATCH] memberof: Do not create request with 0 attribute values
by Lukas Slebodnik
ehlo,
at first I thought it is related to ticket "#2576"
but after simplification of reproducer I found out it just looks
bad in log file.
ldb failed to add attribute with 0 values to ldb entry, but it would not have
any effect.
BTW The best would be to immediately skip request. I'm not sure how to do it
with plain ldb.
How to reproduce?
* import attached ldif
* getent group "Escalation"
* sss_cache -E
* getent group "Escalation"
BTW you can see more warnings if nested hierarchy is deeper and each
group directly contains the same user.
LS
9 years, 1 month
[PATCH] LDAP: remove unused code
by Pavel Reichl
> On Thu, Mar 19, 2015 at 03:18:11PM +0100, Pavel Reichl wrote:
>> On 03/10/2015 03:43 PM, Sumit Bose wrote:
>>> @@ -1982,6 +1986,36 @@ static void sdap_get_groups_process(struct tevent_req *subreq)
>>> return;
>>> }
>>> + if (state->no_members) {
>>> + ret = sysdb_attrs_primary_name_list(state->sysdb, state,
>>> + state->groups, state->count,
>>> + state->opts->group_map[SDAP_AT_GROUP_NAME].name,
>>> + &groupnamelist);
>>> + if (ret != EOK) {
>>> + DEBUG(SSSDBG_OP_FAILURE,
>>> + "sysdb_attrs_primary_name_list failed.\n");
>>> + tevent_req_error(req, ret);
>>> + return;
>>> + }
>>> +
>>> + ret = sdap_add_incomplete_groups(state->sysdb, state->dom, state->opts,
>>> + groupnamelist, state->groups,
>>> + state->count);
>>> + if (ret == EOK) {
>>> + DEBUG(SSSDBG_TRACE_LIBS,
>>> + "Reading only group data without members successful.\n");
>>> + tevent_req_done(req);
>>> + } else {
>>> + DEBUG(SSSDBG_OP_FAILURE, "sdap_add_incomplete_groups failed.\n");
>>> + tevent_req_error(req, ret);
>>> + }
>>> + return;
>> unused code starts here
>>> +
>>> + ret = sdap_save_groups(state, state->sysdb, state->dom, state->opts,
>>> + state->groups, state->count, false,
>>> + NULL, true, NULL);
>>> + }
>>> +
>> Hello,
>>
>> coverity found this unused code - is it OK to just remove sdap_save_groups()
> yes, please remove it. While you are at it I wonder if you can fix the
> debug message (s/Reading/Writing/) above as well?
>
> bye,
> Sumit
>
Please see this trivial patch.
Thanks!
9 years, 1 month
[PATCH] KRB5: add debug hint
by Pavel Reichl
While testing some patches I could not authenticate as IPA user, problem
was that there was time skew about 30 minutes between IPA server and IPA
client. Attached patch should provide clear hint about this possibility.
Thanks.
9 years, 1 month