uwrap: First do garbage collection before exporting ids
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 19 Jul 2017 14:27:05 +0000 (16:27 +0200)
committerAndreas Schneider <asn@samba.org>
Fri, 21 Jul 2017 15:19:45 +0000 (17:19 +0200)
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
src/uid_wrapper.c

index bf3b3336a7fb006a70488fe51f763429820734ed..a48cc3bda275597cec8126c14446ef5e747e0f0d 100644 (file)
@@ -945,8 +945,6 @@ static void uwrap_thread_child(void)
                return;
        }
 
-       uwrap_export_ids(id);
-
        /*
         * "Garbage collector" - Inspired by DESTRUCTOR.
         * All threads (except one which called fork()) are dead now.. Dave
@@ -967,6 +965,8 @@ static void uwrap_thread_child(void)
                u = uwrap.ids;
        }
 
+       uwrap_export_ids(id);
+
        id->enabled = true;
 
        UWRAP_UNLOCK_ALL;