tests: add unit test for sysdb_get_new_id
tests: unit test for sysdb_remove_attrs
TOOLS: set domain in check_group_names
TOOLS: move memcache related functions to tools_mc_utils.c

The upcoming patches will link only users of this file with client libs,
so it's better to have it separate.

There is no functional change in this patch
TOOLS: Split querying nss responder into a separate function

The tools query the responder in order to sync the memcache after
performing changes to the local database. The functions will be reused
by other tools so I split them into a separate functions.
TOOLS: Provide a convenience function to refresh a list of groups
TOOLS: Refresh memcache after changes to local users and groups
LDAP: avoid complex realloc logic in save_rfc2307bis_group_memberships

https://fedorahosted.org/sssd/ticket/1761

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.
Correct format security for talloc_named of auth tokens
autofs: Use SAFEALIGN_SET_UINT32 instead of SAFEALIGN_COPY_UINT32
sss_cache: Call DEBUG_INIT sooner

If bad parameteres were passed to sss_cache, the init
function returned without calling DEBUG_INIT macro and
unnecessary level 1 debug message was printed.

https://fedorahosted.org/sssd/ticket/1745
tools: Respect use_fully_qualified_names

Tools for LOCAL domain should require FQDN if option
'use_fuly_quallified_names = TRUE' was configured.

https://fedorahosted.org/sssd/ticket/1746
Tidy up BASE dn macros
Remove outdated code.

This code should not be necessary anymore since June 2010 with commit:
90acbcf20b5f896ca8f631923afe946c90d90de7
NSS: invalidate memcache user entry on initgr, too

https://fedorahosted.org/sssd/ticket/1757

When the user entry was missing completely after initgroups, we would
never invalidate the user entry from cache. This led to dangling cache
entried in memory cache if the user was removed from the server while
still being in memory cache.
Invalidate user entry even if there are no groups

Related to https://fedorahosted.org/sssd/ticket/1757

Previously we would optimize the mc invalidate code for cases where the
user was a member of some groups. But if the user was removed from the
server while being in memory cache, we would only invalidate the mc
record if he was a member of at least one supplementary group.
set struct bet_info->bet_type
LDAP: Compare lists of DNs when saving autofs entries

https://fedorahosted.org/sssd/ticket/1758

The autofs entries do not have the key as an unique identifier, but
rather the full (key, value) tuple as some keys have a special meaning,
such as the direct mount key (/-) and may be present in a single map
multiple times.

Comparing the full DN that contains both the key and the value will
allow for working updates if either key or value changes.
TOOLS: invalidate parent groups in memory cache, too

https://fedorahosted.org/sssd/ticket/1775

In addition to invalidating the group being added to when adding a
member group/user, we also need to invalidate all its parent groups,
otherwise this getgrnam("parent") wouldn't report the members newly
added to its child groups.
Move ldap provider access functions

It was confusing to see the ldap provider own handler mixed with the generic
ldap access code used also by the ipa and ad providers.
So move the ldap provider handler code in its own file.