[PATCH] nested groups unit test
by Pavel Březina
Hi,
this is the first unit test for nested groups. It covers only the most
basic situation when we are trying to resolve one group with no members.
Even though it is only one test, the patch set is quite big. This is
because it creates the possibility to mock providers related modules.
Most of the patches are just a preparation for unit testing providers.
Patches 1-5
Moves the code around to reduce number of dependencies. (E.g. you do not
want to load fail over when you are testing nested groups.)
Patch 6
Mocks basic SDAP interface.
Patch 7
Mocks sysdb objects - currently user and rfc2307bis group. You can
decide what set of attributes the object should posses. For example,
creating a user requires only basedn and name parameter, to construct
originalDN and name attributes. The rest is provided by (attrname,
value) pairs via variadic function.
E.g.:
mock_sysdb_user(mem_ctx, basedn, name, SYSDB_UIDNUM, uid, ...)
get_attr_type() translates the sysdb attribute name to proper data type.
This should be extended as needed.
Patch 8
Adds provider tests related common object files and cflags in makefile
Patch 9
New macro sss_will_return_always(fn, value). This can be used to mock
function data in such way that any call of mock() will return the value.
It was just pushed also to cmocka upstream as will_return_always().
Patch 10-11
Unit test.
Patch 12
Removes a noisy debug message.
I would like to get this reviewed before I continue with more test
cases, so the framework is tuned enough.
Off topic:
I also created new macro called fail_msg, which will make the test fail
printing a message. I didn't use this macro in the end, but it made its
way to cmocka upstream.
9 years, 7 months
[PATCH] PROXY: Handle empty GECOS
by Jakub Hrozek
I found this bug while triaging a customer case with Chris Hudson who
ran into the same issue Simo fixed recently in the proxy provider.
9 years, 10 months
Fix proxy backend initgroups_dyn code
by Simo Sorce
Tested fix for #2051 and seem to work.
However it just occurred to me we may always want to check if pwd.pw_gid
is listed in the gids returned and add it if not ?
Simo.
--
Simo Sorce * Red Hat, Inc * New York
9 years, 10 months
[PATCHES] Fix warnings
by Lukas Slebodnik
ehlo,
I tested some patches with old distro and I spotted warnings.
-- uninitialized variable (gcc 4.4.7)
-- macro AM_PROG_AR not found in library (automake 1.11.1)
I checked them and all warnings should be harmless, but anyway we don't like
warnings.
Two patches are attached.
LS
10 years
[PATCHES] Enable printf format string checking
by Lukas Slebodnik
ehlo,
It would be great to have enabled printf format string checking in RHEL7.
Therefore I decided to send pateches for ticket
https://fedorahosted.org/sssd/ticket/1945
Patch 0001 -- Even if this patch is first, it should be applied in upstream as
last.
Patch 0002 - 0006 -- trivial
Patch 0007 -- ssize_t is not defined in ANSI c99, IIRC it is defined in posix
as a signed type, therefore format should be used "zd"
Patch 0008 -- size_t is defined in ANSI c99 as unzigned type -> "zu"
Patch 0009 -- wrapper for inttypes.h and for future format macros.
Patch 0012 -- formating types defined in stdint.h uint_32_t ...
-- there are used macros defined in inttypes.h
Patches 0010 - 0015 fix formating for special variables (key_serial_t, rlim_t...)
and for some types I created macros in sss_format.h
Patch 0010 -- key_serial_t is typedef of int32_t, but it could be defined
differently in another (platforms/ implemantations of kerberos)
Patch 0011 -- it seems that rlim_t us the same as uint64_t, but it was defined
using conditional build an not a typedef of std types.
Patch 0013 -- time_t is defined as "long int" sizeof_i386(time_t) != sizeof_x86_64(time_t)
Patch 0014 -- ber_int and ber_tag are typedef for int and unsigned long
Patch 0015 -- gid_t and uid_t are typedef as unsigned
(I checked linux 32 bit, linu 64_bit and freebsd 64 bit)
Patch 0016 -- trivial
LS
10 years
[PATCH] DB: Add user/group lookup by SID
by Ondrej Kos
Hi,
Attached patch adds sysdb routine to search users/groups by their SID,
which will be needed for ticket 1568.
I'm sending it now, because one of the patches I have in this working
branch (store group SID) was already written and posted on the list by
Sumit, so not to waste time again :)
--
Ondrej Kos
Associate Software Engineer
Identity Management - SSSD
Red Hat Czech
10 years
[PATCHES] Remove requests when AD subdomain goes away
by Ondrej Kos
Hi,
Attached are three patches,
[PATCH 1/3] Make subdomain refresh period configurable
* Adds the ad_subdomain_refresh_period and ipa_subdomain_refresh_period
configuration options. This isn't needed to be pushed, but I think it
can be beneficial. Also, I needed to write this anyway to work with the
refresh.
[PATCH 2/3] DP: Store list of back-end tevent requests
* Adds every created request to list, and removes every terminated. This
is to enable iteration through active requests, to fix the issue
addressed in https://fedorahosted.org/sssd/ticket/1968
[PATCH 3/3] Clean list of domain requests
* fixes https://fedorahosted.org/sssd/ticket/1968
* Goes through the list of tevent requests introduced in previous patch
an those, which match the vanished domain are terminated.
Ondra
--
Ondrej Kos
Associate Software Engineer
Identity Management - SSSD
Red Hat Czech
10 years