The attached patches implement functionality the admins have been
asking
for in the autofs responder - when the auto.master map is requested,
refresh the mountpoints.
The motivation is that it is quite common for the admin to change the
maps and just SIGHUP the automounter or run automounter -m for testing
and see the current maps.
https://fedorahosted.org/sssd/ticket/1592
I tried to split the patches into small consumable pieces. Hopefully it
will ease the review.
[PATCH 1/7] SYSDB: fix copy-n-paste error
A one-liner
[PATCH 2/7] SYSDB: Add API to invalidate all map objects
This sysdb API will be used later to invalidate the autofs maps
[PATCH 3/7] DP: invalidate all cached maps if a request for auto.master
comes in
If the Data Provider receives a request for the auto.master map, it
passes on a flag to let the actual provider let know he should
invalidate the existing maps
[PATCH 4/7] AUTOFS: allow removing entries from hash table
There is a timed desctructor in the autofs responder that, when the
entry timeout passes, removes the autofs map from the hash table while
the map is freed. This patch adds a hash delete callback so that if the
map is removed from the hash table with hash_delete, its hash table
pointer will be invalidated. Later, when the entry is being freed, the
destructor won't attempt to remove it from the hash table.
[PATCH 5/7] AUTOFS: remove all maps from hash if request for auto.master
comes in
When a request for auto.master comes in, we need to remove all the maps
from the lookup hash table. We can't simply delete the maps, because
another request might be processing them, so instead the maps are
removed from the hash table, effectively becoming orphaned. The maps
will get freed when the timed destructor is invoked.
[PATCH 6/7] RESPONDERS: Create a common file with service names and
versions
The monitor sends calls different sbus methods to different responders.
Instead of including headers of the particular responders directly in
monitor, which breaks layering a little, create a common header file
that will be included from src/responder/common/
[PATCH 7/7] AUTOFS: Clear enum cache if a request comes in from the
sss_cache
In order for sss_cache to work correctly, we must also signal the autofs
responder to invalidate the hash table requests.