1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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>
This commit is contained in:
Andrew Bartlett 2010-05-18 22:07:48 +10:00
parent 458b2484c7
commit 6d2e796f35
2 changed files with 13 additions and 0 deletions

View 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);

View 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
************************************************************/