1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3:winbind: Move function to flush cache to winbindd-lib subsystem

The source3/winbindd/winbindd.c file does not belong to 'winbindd-lib'
subsystem. Funtions called from winbindd-lib must be part of it.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Samuel Cabrero 2022-03-02 18:13:15 +01:00 committed by Jeremy Allison
parent 334a4aa125
commit d41698169d
2 changed files with 14 additions and 14 deletions

View File

@ -120,20 +120,6 @@ static void winbindd_status(void)
/* Flush client cache */
void winbindd_flush_caches(void)
{
/* We need to invalidate cached user list entries on a SIGHUP
otherwise cached access denied errors due to restrict anonymous
hang around until the sequence number changes. */
if (!wcache_invalidate_cache()) {
DEBUG(0, ("invalidating the cache failed; revalidate the cache\n"));
if (!winbindd_cache_validate_and_initialize()) {
exit(1);
}
}
}
static void flush_caches_noinit(void)
{
/*

View File

@ -89,6 +89,20 @@ void winbindd_set_use_cache(bool use_cache)
opt_nocache = !use_cache;
}
void winbindd_flush_caches(void)
{
/* We need to invalidate cached user list entries on a SIGHUP
otherwise cached access denied errors due to restrict anonymous
hang around until the sequence number changes. */
if (!wcache_invalidate_cache()) {
DEBUG(0, ("invalidating the cache failed; revalidate the cache\n"));
if (!winbindd_cache_validate_and_initialize()) {
exit(1);
}
}
}
/************************************************************************
Is this key a non-centry type ?
************************************************************************/