s3:param Add helper function to get at Gobals.iDomainMaster
authorAndrew Bartlett <abartlet@samba.org>
Tue, 18 May 2010 12:07:48 +0000 (22:07 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 1 Jun 2010 07:11:24 +0000 (17:11 +1000)
This is needed for a future split out of the server_role code.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/include/proto.h
source3/param/loadparm.c

index 237772e9bd1096dc361ff69b0c94346fa217fd10..7af8035126ee0f50298baa200cd87921b13d8588 100644 (file)
@@ -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);
index 2d389d4fa6a1515f4642067cbb4ce9ee944781e5..09d89f5d7f14851ffdbc552d5b267169c4b9431b 100644 (file)
@@ -9690,6 +9690,18 @@ bool lp_domain_master(void)
        return (bool)Globals.iDomainMaster;
 }
 
+/***********************************************************
+ 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
 ************************************************************/