#include "s3compat_proto.h"
#include "smbd/service.h"
#include "lib/socket/socket.h"
+#include "librpc/gen_ndr/samr.h"
static struct stream_connection *samba3_conn;
return s3compat_get_tevent_ctx();
}
+/* Ensure that the most vital smb.conf options are in sync, or we will go mad! */
const char *s3compat_lp_netbios_name(void)
{
return lp_netbios_name(s3compat_get_lp_ctx());
return lp_sam_name(s3compat_get_lp_ctx());
}
+/* By both design and coincidence the source3 code uses enum samr_Role for this parameter */
+int s3compat_server_role(void)
+{
+ switch (lp_server_role(s3compat_get_lp_ctx())) {
+ case ROLE_DOMAIN_MEMBER:
+ return SAMR_ROLE_DOMAIN_MEMBER;
+ case ROLE_DOMAIN_CONTROLLER:
+ /* For now, never pretend to be the PDC emulator in the s3compat code */
+ return SAMR_ROLE_DOMAIN_BDC;
+ case ROLE_STANDALONE:
+ default:
+ return SAMR_ROLE_STANDALONE;
+ }
+}
+
return s3compat_lp_sam_name();
}
+int lp_server_role(void)
+{
+ return s3compat_server_role();
+}
+
+void set_server_role(void)
+{
+ /* This is ignored, the only way to set the server role is by the source4/ loadparm */
+ return;
+}
+
/* Nothing do do here - we don't store these in globals */
void gfree_netbios_names(void)
{