1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

lib/param: add lpcfg_sam_dnsname() helper function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2016-01-07 14:40:02 +01:00 committed by Andrew Bartlett
parent 193de1c0e9
commit 70cc56d3e7
2 changed files with 11 additions and 0 deletions

View File

@ -306,6 +306,7 @@ struct smb_iconv_handle *smb_iconv_handle_reinit_lp(TALLOC_CTX *mem_ctx,
struct smb_iconv_handle *old_ic);
const char *lpcfg_sam_name(struct loadparm_context *lp_ctx);
const char *lpcfg_sam_dnsname(struct loadparm_context *lp_ctx);
void lpcfg_default_kdc_policy(struct loadparm_context *lp_ctx,
time_t *svc_tkt_lifetime,

View File

@ -271,6 +271,16 @@ const char *lpcfg_sam_name(struct loadparm_context *lp_ctx)
}
}
const char *lpcfg_sam_dnsname(struct loadparm_context *lp_ctx)
{
switch (lpcfg_server_role(lp_ctx)) {
case ROLE_ACTIVE_DIRECTORY_DC:
return lpcfg_dnsdomain(lp_ctx);
default:
return NULL;
}
}
void lpcfg_default_kdc_policy(struct loadparm_context *lp_ctx,
time_t *svc_tkt_lifetime,
time_t *usr_tkt_lifetime,