diff options
| author | Andrew Tridgell <tridge@samba.org> | 2009-05-26 14:18:16 +1000 | 
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2009-05-26 14:18:16 +1000 | 
| commit | 02996093088a9244c44f46818ac093430d21a99c (patch) | |
| tree | e635307f9ba9c259b183fdcbc6bd0c5d096718da /source4/param/util.c | |
| parent | c80c3b5edd231ab919b2054e22a99ba28aa11eac (diff) | |
| parent | 6ef65389fd2f2bdcafe840e0cd0221bb9f26bdfc (diff) | |
| download | samba-02996093088a9244c44f46818ac093430d21a99c.tar.gz samba-02996093088a9244c44f46818ac093430d21a99c.tar.bz2 samba-02996093088a9244c44f46818ac093430d21a99c.zip  | |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/param/util.c')
| -rw-r--r-- | source4/param/util.c | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/source4/param/util.c b/source4/param/util.c index 3881107cbc..366c3f1d78 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -41,6 +41,13 @@ bool lp_is_mydomain(struct loadparm_context *lp_ctx,  	return strequal(lp_workgroup(lp_ctx), domain);  } +bool lp_is_my_domain_or_realm(struct loadparm_context *lp_ctx,  +			     const char *domain) +{ +	return strequal(lp_workgroup(lp_ctx), domain) ||  +		strequal(lp_realm(lp_ctx), domain); +} +  /**    see if a string matches either our primary or one of our secondary     netbios aliases. do a case insensitive match @@ -296,3 +303,13 @@ struct smb_iconv_convenience *smb_iconv_convenience_init_lp(TALLOC_CTX *mem_ctx,  } +const char *lp_sam_name(struct loadparm_context *lp_ctx)  +{ +	switch (lp_server_role(lp_ctx)) { +	case ROLE_DOMAIN_CONTROLLER: +		return lp_workgroup(lp_ctx); +	default: +		return lp_netbios_name(lp_ctx); +	} +} +  | 
