s3:winbind: Move function to flush cache to winbindd-lib subsystem
authorSamuel Cabrero <scabrero@samba.org>
Wed, 2 Mar 2022 17:13:15 +0000 (18:13 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 8 Apr 2022 20:13:37 +0000 (20:13 +0000)
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>
source3/winbindd/winbindd.c
source3/winbindd/winbindd_cache.c

index c5a05273d34d3f2ea9e2d93de73de95a09a48d40..e93e7114d93ea8e18ce0ac31fdf08010bfd048ff 100644 (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)
 {
        /*
index c8f15aec5aaa53c068e30874c5aba01b18b76f78..1835d0b9d63e99973ee19034ccd4e530fb37d072 100644 (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 ?
 ************************************************************************/