+ status = init_system_info();
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("ERROR: failed to setup system user info: %s.\n",
+ nt_errstr(status)));
+ return -1;
+ }
+
+ if (!init_guest_info()) {
+ DEBUG(0,("ERROR: failed to setup guest info.\n"));
+ return -1;
+ }
+
+ if (!file_init(smbd_server_conn)) {
+ DEBUG(0, ("ERROR: file_init failed\n"));
+ return -1;
+ }
+
+ if (is_daemon && !interactive) {
+ const char *rpcsrv_type;
+
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", "epmapper",
+ "none");
+ if (strcasecmp_m(rpcsrv_type, "daemon") == 0) {
+ start_epmd(smbd_event_context(),
+ smbd_server_conn->msg_ctx);
+ }
+ }
+
+ if (!dcesrv_ep_setup(smbd_event_context(), smbd_server_conn->msg_ctx)) {
+ exit(1);
+ }
+
+ /* Publish nt printers, this requires a working winreg pipe */
+ pcap_cache_reload(server_event_context(), smbd_messaging_context(),
+ &reload_printers);
+