From ccfd929d964ae111cfac33acaf6c3bcc039724c1 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 11 Apr 2013 17:12:10 +0930 Subject: lib/param: lpcfg_private_db_path() This wrapper avoids testing lpcfg_use_ntdb() everywhere. Signed-off-by: Rusty Russell Reviewed-by: Jeremy Allison --- lib/param/param.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/param/param.h') diff --git a/lib/param/param.h b/lib/param/param.h index 18d4b29ea0..7e73dd0f23 100644 --- a/lib/param/param.h +++ b/lib/param/param.h @@ -283,6 +283,21 @@ char *lpcfg_private_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, const char *name); +/** + * @brief Returns an absolute path to a NTDB or TDB file in the Samba + * private directory. + * + * @param name File to find, relative to PRIVATEDIR, without .(n)tdb extension. + * Only provide fixed-string names which are supposed to change with "use ntdb" + * option. + * + * @retval Pointer to a talloc'ed string containing the full path, for + * use with dbwrap_local_open(). + **/ +char *lpcfg_private_db_path(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, + const char *name); + /** return a path in the smbd.tmp directory, where all temporary file for smbd go. If NULL is passed for name then return the directory -- cgit