summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-16 17:03:21 +0100
committerMichael Adam <obnox@samba.org>2008-01-16 17:10:02 +0100
commitd3be7a7bdd8b1ddbbcd39dd55d62467dc6c1a73b (patch)
treefb92d996f3ab377a7090321e0bc0d081be23cbf5
parent1abc94e95b1cdeff0d85840b4dfc6e5cea3a71da (diff)
downloadsamba-d3be7a7bdd8b1ddbbcd39dd55d62467dc6c1a73b.tar.gz
samba-d3be7a7bdd8b1ddbbcd39dd55d62467dc6c1a73b.tar.bz2
samba-d3be7a7bdd8b1ddbbcd39dd55d62467dc6c1a73b.zip
Add utility function lp_config_backend_is_registry().
So external callers can determine if we are running on registry config without knowing the internals. Michael (This used to be commit d8a7c3ec8e2bd548509178f138d00a3b57119d10)
-rw-r--r--source3/param/loadparm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 4afef23103..90b015b5a2 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3663,6 +3663,14 @@ bool lp_include_registry_globals(void)
return include_registry_globals;
}
+/**
+ * Utility function for outsiders to check if we're running on registry.
+ */
+bool lp_config_backend_is_registry(void)
+{
+ return (lp_config_backend() == CONFIG_BACKEND_REGISTRY);
+}
+
/*******************************************************************
Check if a config file has changed date.
********************************************************************/