Add utility function lp_config_backend_is_registry().
authorMichael Adam <obnox@samba.org>
Wed, 16 Jan 2008 16:03:21 +0000 (17:03 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 16 Jan 2008 16:10:02 +0000 (17:10 +0100)
So external callers can determine if we are running on
registry config without knowing the internals.

Michael

source/param/loadparm.c

index 4afef23103698cae3bdb98ed662fb4a434eda965..90b015b5a223999afd33e8ae3fc39374b178e692 100644 (file)
@@ -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.
 ********************************************************************/