[PATCH 0/1] Simplify writing update functions
by Simo Sorce
While approaching the problem of updating the DB after a patch I am working
on I noticed that we do have a lot of biolerplate code in there that could
very simply be tucked into 2 helper functions, simplifying writing upgrade
functions and making it less likely a typo or copy&paste error will create
issues with version numbers.
I love the 425 deletions :-)
I tried to have a light hand in changing existing code to avoid introducing
bugs but I have added an example skeleton so that future upgrade functions
can stop using a tmp_ctx memory context and just use the new upgrade_ctx as
their local memory context.
Simo Sorce (1):
Simplify writing db update functions
src/db/sysdb_upgrade.c | 621 +++++++++++++++---------------------------------
1 files changed, 196 insertions(+), 425 deletions(-)
11 years, 5 months
[PATCH] Fix saving empty LDAP groups
by Jakub Hrozek
We broke saving nested LDAP groups with no members in 1.9 during the
conversion to ghost users. The attached patches fix that.
The first three patches would be nice to get into 1.9, the last patch is
OK in master only. I just found the code hard to read sometimes so I
split it into a separate functions and used more descriptive variable
names. I also think that the branch that the branch that re-read
SDAP_AT_GROUP_MEMBER after reading SYSDB_GHOST is not needed.
11 years, 5 months
fix -O3 variable may be uninitialized warnings
by Pavel Březina
I think all of these are false positives so I just initialized the
variables to silent the compiler.
echo $CFLAGS
-m64 -mtune=generic -O3 -fstack-protector-all -Wall -Wextra
-Wno-sign-compare -Wno-unused-parameter
src/providers/ldap/sdap_async_groups.c: In function
'sdap_nested_group_process_ldap_user':
src/providers/ldap/sdap_async_groups.c:3408:8: warning: 'count' may be
used uninitialized in this function [-Wmaybe-uninitialized]
src/providers/ldap/sdap_async_groups.c:3432:5: warning: 'replies' may be
used uninitialized in this function [-Wmaybe-uninitialized]
src/providers/ldap/sdap_async_groups.c: In function
'sdap_nested_group_process_user':
src/providers/ldap/sdap_async_groups.c:3195:8: warning: 'count' may be
used uninitialized in this function [-Wmaybe-uninitialized]
src/providers/ldap/sdap_async_groups.c:3220:5: warning: 'replies' may be
used uninitialized in this function [-Wmaybe-uninitialized]
src/providers/ldap/sdap_sudo.c: In function
'sdap_sudo_periodical_full_refresh_done':
src/providers/ldap/sdap_sudo.c:1024:9: warning: 'dp_error' may be used
uninitialized in this function [-Wmaybe-uninitialized]
src/providers/ldap/sdap_sudo.c:1024:9: warning: 'error' may be used
uninitialized in this function [-Wmaybe-uninitialized]
11 years, 5 months