summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-18 22:07:48 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-06-01 17:11:24 +1000
commit6d2e796f35dea93ca31e6879e79942a02572754d (patch)
treefc35f321aed0968809132516b1d3c75d85e08677
parent458b2484c73b9381aa3d10b94b3e3576d4bb44d3 (diff)
downloadsamba-6d2e796f35dea93ca31e6879e79942a02572754d.tar.gz
samba-6d2e796f35dea93ca31e6879e79942a02572754d.tar.bz2
samba-6d2e796f35dea93ca31e6879e79942a02572754d.zip
s3:param Add helper function to get at Gobals.iDomainMaster
This is needed for a future split out of the server_role code. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/param/loadparm.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 237772e9bd..7af8035126 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4283,6 +4283,7 @@ struct share_params *snum2params_static(int snum);
const char *volume_label(int snum);
int lp_server_role(void);
bool lp_domain_master(void);
+bool lp_domain_master_true_or_auto(void);
bool lp_preferred_master(void);
void lp_remove_service(int snum);
void lp_copy_service(int snum, const char *new_name);
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 2d389d4fa6..09d89f5d7f 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -9691,6 +9691,18 @@ bool lp_domain_master(void)
}
/***********************************************************
+ If we are PDC then prefer us as DMB
+************************************************************/
+
+bool lp_domain_master_true_or_auto(void)
+{
+ if (Globals.iDomainMaster) /* auto or yes */
+ return true;
+
+ return false;
+}
+
+/***********************************************************
If we are DMB then prefer us as LMB
************************************************************/