[PATCHES] Minor cleanups
by Simo Sorce
While working on a new patchset I found bits that can be cleaned up.
These patches have been built on top of my previous big patchset but
should apply as is against current master too.
Simo.
--
Simo Sorce * Red Hat, Inc * New York
11 years, 3 months
[PATCH] Correct format security for talloc_named of auth tokens
by Stephen Gallagher
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Spotted this while doing a review. When building with
- -Wformat-security, we get a warning:
../src/util/authtok.c: In function 'sss_authtok_set_string':
../src/util/authtok.c:104:5: error: format not a string literal and no
format arguments [-Werror=format-security]
This patch corrects it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlD2pFwACgkQeiVVYja6o6ONdQCfUXVmagKVL5blE23eCI0BHM9G
XGIAoK9XwzMlaNxZYepac0XmO5SqPYil
=Uyfb
-----END PGP SIGNATURE-----
11 years, 3 months
[PATCH] LDAP: avoid complex realloc logic in save_rfc2307bis_group_memberships
by Jakub Hrozek
The function tried to be smart and realloc only when needed, but that
only lead to hard-to find bugs where the logic would not allocate the
proper space. Remove the reallocation and prefer readability over speed
in this case.
In particular, if one iteration hit the "if (num_added == 0) add=NULL"
condition but the next group being processed had no members and set
grp_count=0, then we'd use the add pointer from last iteration that was
still NULL.
11 years, 3 months
[PATCHES] Initial refactoring for #1747
by Simo Sorce
Attached find a somewhat big patchset composed of 59 patches.
These patches start to address #1747 by changing a fundamental issue in
the current code where the sysdb_ctx structure includes a reference to a
sss_domain_info one.
The issue is that we now have multiple named domain in a single sysdb
database so a univocal sysdb->domain relationship doesn't represent
reality anymore.
So far we have coped by somewhat faking up sysdb contexts for domains
but this is all backwards and makes it hard to predict if code is
behaving correctly.
Although this patchset is huge the bulk is just a series of painstaking
patches to change a ton of interfaces to take a sss_domain_info
structure in input so we can avoid ambiguity about which domain the
sysdb is asked to deal with.
As mentioned this is just an 'initial' patchset, there are still other
aspects to handle as part o #1747 but this patchset is self-contained
and big enough it would only make it harder to get in if we waited for
more changes to pile on top.
The patchset is attached in tar.gz format (sorry but unpacked is too
big, ~650K)
I will keep rebasing this[0] branch on top of master with this same
patchset, and I recommend for your sanity to pull from there rather than
try to apply 59 patches for patchfiles. The reason is that this patchset
touches a lot of code and any new commit in master is almost certainly
going to require a rebase to this patchset.
Keep in mind that the general principle in building this patchset was to
try to have the least impact on the code, not necessarily to beautify
the code I was going to touch, this in order to make it very clear what
is changed and ckeep churn to a bare minimum, so I haven't changed
things like DEBUG levels to avoid any noise and additional great pain in
the inevitable rebases that are to come.
I did test the code on my install with multiple trusts, and it seem to
be working correctly with normal and subdomain users.
Happy reviewing :)
Simo.
[0]
http://fedorapeople.org/cgit/simo/public_git/sssd.git/log/?h=sysdb_refactor
Note: The git tree has actually 63 patchse on top of master, the first 4
are pre-requisite patches I already sent to the list for review
separately.
--
Simo Sorce * Red Hat, Inc * New York
11 years, 3 months
[PATCH] USe sysdb_serch_service() in sss_cacahe
by Simo Sorce
In the patches that fix the sdap_reinit functions I introduced a new
service search helper sysdb_search_services()
Use this helper in sss_cache instead of a home grown one with poor-man
filter parser.
Simo.
--
Simo Sorce * Red Hat, Inc * New York
11 years, 3 months