Add secrets_shutdown().
authorGünther Deschner <gd@samba.org>
Mon, 7 Jan 2008 11:42:16 +0000 (12:42 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 7 Jan 2008 11:48:21 +0000 (12:48 +0100)
Guenther
(This used to be commit dd3fbd93b6e5fe8b5e3a3727a64a38d5ae46fcbf)

source3/passdb/secrets.c

index 8e0afe7c32c9696ad847e014b69d4b42f885a80a..330ffbc853261c65d7dcce411d1d42d45ec9fa1d 100644 (file)
@@ -94,6 +94,19 @@ bool secrets_init(void)
        return True;
 }
 
+/*
+ * close secrets.tdb
+ */
+void secrets_shutdown(void)
+{
+       if (!tdb) {
+               return;
+       }
+
+       tdb_close(tdb);
+       tdb = NULL;
+}
+
 /* read a entry from the secrets database - the caller must free the result
    if size is non-null then the size of the entry is put in there
  */