passdb/secrets: add secrets_db_ctx() to get the db_context
authorStefan Metzmacher <metze@samba.org>
Tue, 1 Apr 2008 09:00:59 +0000 (11:00 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 1 Apr 2008 12:04:20 +0000 (14:04 +0200)
metze
(This used to be commit 986bc7e8b260265da019b67ec751509eb589d24b)

source3/passdb/secrets.c

index 06bbd96353cf2d4012df92cbed4292e83f407516..8d08d90dcf78b2adfda5b4f8b049e1e637724bd0 100644 (file)
@@ -89,6 +89,15 @@ bool secrets_init(void)
        return True;
 }
 
+struct db_context *secrets_db_ctx(void)
+{
+       if (!secrets_init()) {
+               return NULL;
+       }
+
+       return db_ctx;
+}
+
 /*
  * close secrets.tdb
  */