talloc: use the system pytalloc-util for python3 as well
[sfrench/samba-autobuild/.git] / lib / param / util.c
index 7e4232d3628743fa53a4fb67d1882e5b05eddb92..233981abfa854ed8f93bb02eea9b1c8cc4d73b0b 100644 (file)
@@ -28,6 +28,7 @@
 #include "system/filesys.h"
 #include "system/dir.h"
 #include "param/param.h"
+#include "libds/common/roles.h"
 
 /**
  * @file
@@ -270,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,