if (smbd_messaging_context() == NULL)
exit(1);
- if (!reload_services(smbd_messaging_context(), False))
- return(-1);
+ /*
+ * Reloading of the printers will not work here as we don't have a
+ * server info and rpc services set up. It will be called later.
+ */
+ if (!reload_services(smbd_messaging_context(), False)) {
+ exit(1);
+ }
+
+ /* ...NOTE... Log files are working from this point! */
+
+ DEBUG(3,("loaded services\n"));
init_structs();
}
#endif
- DEBUG(3,( "loaded services\n"));
-
if (!is_daemon && !is_a_socket(0)) {
if (!interactive)
DEBUG(0,("standard input is not a socket, assuming -D option\n"));
static_init_rpc;
+ /* Publish nt printers, this requires a working winreg pipe */
+ reload_printers(smbd_messaging_context());
+
/* only start the background queue daemon if we are
running as a daemon -- bad things will happen if
smbd is launched via inetd and we fork a copy of
status = make_server_info_system(talloc_tos(), &server_info);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("reload_printers: "
+ DEBUG(3, ("reload_printers: "
"Could not create system server_info\n"));
/* can't remove stale printers before we
* are fully initilized */