summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-11 12:41:20 +0100
committerMichael Adam <obnox@samba.org>2008-03-12 02:12:33 +0100
commit62c9c6be22c453fb73970eb7da356bc8dbe5c133 (patch)
treeb437bd49972766531e6014f1978af841d57dc985 /source3
parent4f739abea5524153942bbb8b14bc8d2978738f34 (diff)
downloadsamba-62c9c6be22c453fb73970eb7da356bc8dbe5c133.tar.gz
samba-62c9c6be22c453fb73970eb7da356bc8dbe5c133.tar.bz2
samba-62c9c6be22c453fb73970eb7da356bc8dbe5c133.zip
loadparm: add utility function to check for config backend file.
Michael (This used to be commit 288495ec1a9b0c37bb3f98043f8f8dd946072bac)
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index c47e70492a..8dfc432924 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -6586,6 +6586,14 @@ bool lp_config_backend_is_registry(void)
return (lp_config_backend() == CONFIG_BACKEND_REGISTRY);
}
+/**
+ * Utility function to check if the config backend is FILE.
+ */
+bool lp_config_backend_is_file(void)
+{
+ return (lp_config_backend() == CONFIG_BACKEND_FILE);
+}
+
/*******************************************************************
Check if a config file has changed date.
********************************************************************/
@@ -8666,7 +8674,7 @@ bool lp_load(const char *pszFname,
Globals.param_opt = NULL;
}
- if (lp_config_backend() == CONFIG_BACKEND_FILE) {
+ if (lp_config_backend_is_file()) {
n2 = alloc_sub_basic(get_current_username(),
current_user_info.domain,
pszFname);