*/
#include "includes.h"
+#include "system/filesys.h"
+#include "popt_common.h"
+#include "smbd/smbd.h"
#include "smbd/globals.h"
-#include "librpc/gen_ndr/messaging.h"
-#include "registry.h"
-
-static_decl_rpc;
+#include "registry/reg_init_full.h"
+#include "libcli/auth/schannel.h"
+#include "secrets.h"
+#include "memcache.h"
+#include "ctdbd_conn.h"
+#include "printing/printer_list.h"
+#include "rpc_server/rpc_ep_setup.h"
+#include "printing/pcap.h"
+#include "printing.h"
+#include "serverid.h"
+#include "passdb.h"
+#include "auth.h"
+#include "messages.h"
+#include "smbprofile.h"
+
+extern void start_epmd(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx);
+
+extern void start_spoolssd(struct event_context *ev_ctx,
+ struct messaging_context *msg_ctx);
#ifdef WITH_DFS
extern int dcelogin_atmost_once;
#endif /* WITH_DFS */
-int smbd_server_fd(void)
-{
- return server_fd;
-}
-
-static void smbd_set_server_fd(int fd)
-{
- server_fd = fd;
-}
-
-int get_client_fd(void)
-{
- return server_fd;
-}
-
-struct event_context *smbd_event_context(void)
-{
- if (!smbd_event_ctx) {
- smbd_event_ctx = event_context_init(talloc_autofree_context());
- }
- if (!smbd_event_ctx) {
- smb_panic("Could not init smbd event context");
- }
- return smbd_event_ctx;
-}
+/*******************************************************************
+ What to do when smb.conf is updated.
+ ********************************************************************/
-struct messaging_context *smbd_messaging_context(void)
+static void smb_conf_updated(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
{
- if (smbd_msg_ctx == NULL) {
- smbd_msg_ctx = messaging_init(talloc_autofree_context(),
- procid_self(),
- smbd_event_context());
- }
- if (smbd_msg_ctx == NULL) {
- DEBUG(0, ("Could not init smbd messaging context.\n"));
- }
- return smbd_msg_ctx;
-}
+ struct tevent_context *ev_ctx =
+ talloc_get_type_abort(private_data, struct tevent_context);
-struct memcache *smbd_memcache(void)
-{
- if (!smbd_memcache_ctx) {
- smbd_memcache_ctx = memcache_init(talloc_autofree_context(),
- lp_max_stat_cache_size()*1024);
- }
- if (!smbd_memcache_ctx) {
- smb_panic("Could not init smbd memcache");
+ DEBUG(10,("smb_conf_updated: Got message saying smb.conf was "
+ "updated. Reloading.\n"));
+ change_to_root_user();
+ reload_services(msg, smbd_server_conn->sock, False);
+ if (am_parent) {
+ pcap_cache_reload(ev_ctx, msg,
+ &reload_pcap_change_notify);
}
-
- return smbd_memcache_ctx;
}
/*******************************************************************
- What to do when smb.conf is updated.
+ What to do when printcap is updated.
********************************************************************/
-static void smb_conf_updated(struct messaging_context *msg,
+static void smb_pcap_updated(struct messaging_context *msg,
void *private_data,
uint32_t msg_type,
struct server_id server_id,
DATA_BLOB *data)
{
- DEBUG(10,("smb_conf_updated: Got message saying smb.conf was "
- "updated. Reloading.\n"));
+ struct tevent_context *ev_ctx =
+ talloc_get_type_abort(private_data, struct tevent_context);
+
+ DEBUG(10,("Got message saying pcap was updated. Reloading.\n"));
change_to_root_user();
- reload_services(False);
+ reload_printers(ev_ctx, msg);
}
-
/*******************************************************************
Delete a statcache entry.
********************************************************************/
if (!cleanup_te) {
/* call the cleanup timer, but not too often */
int cleanup_time = lp_parm_int(-1, "smbd", "cleanuptime", 20);
- cleanup_te = event_add_timed(smbd_event_context(), NULL,
+ cleanup_te = event_add_timed(server_event_context(), NULL,
timeval_current_ofs(cleanup_time, 0),
cleanup_timeout_fn,
&cleanup_te);
child_id = procid_self(); /* Just initialize pid and potentially vnn */
child_id.pid = pid;
- if (!serverid_deregister(&child_id)) {
+ if (!serverid_deregister(child_id)) {
DEBUG(1, ("Could not remove pid %d from serverid.tdb\n",
(int)pid));
}
}
}
- DEBUG(0, ("Could not find child %d -- ignoring\n", (int)pid));
+ /* not all forked child processes are added to the children list */
+ DEBUG(1, ("Could not find child %d -- ignoring\n", (int)pid));
}
/****************************************************************************
{
struct tevent_signal *se;
- se = tevent_add_signal(smbd_event_context(),
- smbd_event_context(),
+ se = tevent_add_signal(server_event_context(),
+ server_event_context(),
SIGCHLD, 0,
smbd_sig_chld_handler,
NULL);
uint16_t flags,
void *private_data)
{
+ struct smbd_server_connection *sconn = smbd_server_conn;
struct smbd_open_socket *s = talloc_get_type_abort(private_data,
struct smbd_open_socket);
struct sockaddr_storage addr;
socklen_t in_addrlen = sizeof(addr);
+ int fd;
pid_t pid = 0;
uint64_t unique_id;
- smbd_set_server_fd(accept(s->fd,(struct sockaddr *)&addr,&in_addrlen));
-
- if (smbd_server_fd() == -1 && errno == EINTR)
+ fd = accept(s->fd, (struct sockaddr *)(void *)&addr,&in_addrlen);
+ sconn->sock = fd;
+ if (fd == -1 && errno == EINTR)
return;
- if (smbd_server_fd() == -1) {
+ if (fd == -1) {
DEBUG(0,("open_sockets_smbd: accept: %s\n",
strerror(errno)));
return;
}
if (s->parent->interactive) {
- smbd_process();
+ smbd_process(sconn);
exit_server_cleanly("end of interactive mode");
return;
}
if (!allowable_number_of_smbd_processes()) {
- close(smbd_server_fd());
- smbd_set_server_fd(-1);
+ close(fd);
+ sconn->sock = -1;
return;
}
s = NULL;
status = reinit_after_fork(smbd_messaging_context(),
- smbd_event_context(), true);
+ server_event_context(), procid_self(),
+ true);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,
NT_STATUS_TOO_MANY_OPENED_FILES)) {
"because too many files are open\n"));
goto exit;
}
+ if (lp_clustering() &&
+ NT_STATUS_EQUAL(status,
+ NT_STATUS_INTERNAL_DB_ERROR)) {
+ DEBUG(1,("child process cannot initialize "
+ "because connection to CTDB "
+ "has failed\n"));
+ goto exit;
+ }
+
DEBUG(0,("reinit_after_fork() failed\n"));
smb_panic("reinit_after_fork() failed");
}
smbd_setup_sig_term_handler();
- smbd_setup_sig_hup_handler();
+ smbd_setup_sig_hup_handler(server_event_context(),
+ server_messaging_context());
- if (!serverid_register_self(FLAG_MSG_GENERAL|FLAG_MSG_SMBD
- |FLAG_MSG_DBWRAP
- |FLAG_MSG_PRINT_GENERAL)) {
+ if (!serverid_register(procid_self(),
+ FLAG_MSG_GENERAL|FLAG_MSG_SMBD
+ |FLAG_MSG_DBWRAP
+ |FLAG_MSG_PRINT_GENERAL)) {
exit_server_cleanly("Could not register myself in "
"serverid.tdb");
}
- smbd_process();
+ smbd_process(smbd_server_conn);
exit:
exit_server_cleanly("end of child");
return;
- } else if (pid < 0) {
+ }
+
+ if (pid < 0) {
DEBUG(0,("smbd_accept_connection: sys_fork() failed: %s\n",
strerror(errno)));
}
/* The parent doesn't need this socket */
- close(smbd_server_fd());
+ close(fd);
/* Sun May 6 18:56:14 2001 ackley@cs.unm.edu:
Clear the closed fd info out of server_fd --
getpeername failure if we reopen the logs
and use %I in the filename.
*/
-
- smbd_set_server_fd(-1);
+ sconn->sock = -1;
if (pid != 0) {
add_child_pid(pid);
return false;
}
- s->fde = tevent_add_fd(smbd_event_context(),
+ s->fde = tevent_add_fd(server_event_context(),
s,
s->fd, TEVENT_FD_READ,
smbd_accept_connection,
return true;
}
+static bool smbd_parent_housekeeping(const struct timeval *now, void *private_data)
+{
+ time_t printcap_cache_time = (time_t)lp_printcap_cache_time();
+ time_t t = time_mono(NULL);
+
+ DEBUG(5, ("parent housekeeping\n"));
+
+ /* if periodic printcap rescan is enabled, see if it's time to reload */
+ if ((printcap_cache_time != 0)
+ && (t >= (last_printer_reload_time + printcap_cache_time))) {
+ DEBUG( 3,( "Printcap cache time expired.\n"));
+ pcap_cache_reload(server_event_context(),
+ smbd_messaging_context(),
+ &reload_pcap_change_notify);
+ last_printer_reload_time = t;
+ }
+
+ return true;
+}
+
/****************************************************************************
Open the socket communication.
****************************************************************************/
static bool open_sockets_smbd(struct smbd_parent_context *parent,
+ struct messaging_context *msg_ctx,
const char *smb_ports)
{
int num_interfaces = iface_count();
int i;
- char *ports;
+ const char *ports;
unsigned dns_port = 0;
#ifdef HAVE_ATEXIT
continue;
}
+ /* Keep the first port for mDNS service
+ * registration.
+ */
+ if (dns_port == 0) {
+ dns_port = port;
+ }
+
if (!smbd_open_one_socket(parent, ifss, port)) {
return false;
}
operations until it has gone thru a full startup, which
includes checking to see that smbd is listening. */
- if (!serverid_register_self(FLAG_MSG_GENERAL|FLAG_MSG_SMBD
- |FLAG_MSG_DBWRAP)) {
+ if (!serverid_register(procid_self(),
+ FLAG_MSG_GENERAL|FLAG_MSG_SMBD
+ |FLAG_MSG_DBWRAP)) {
DEBUG(0, ("open_sockets_smbd: Failed to register "
"myself in serverid.tdb\n"));
return false;
}
+ if (!(event_add_idle(server_event_context(), NULL,
+ timeval_set(SMBD_HOUSEKEEPING_INTERVAL, 0),
+ "parent_housekeeping", smbd_parent_housekeeping,
+ NULL))) {
+ DEBUG(0, ("Could not add parent_housekeeping event\n"));
+ return false;
+ }
+
/* Listen to messages */
- messaging_register(smbd_messaging_context(), NULL,
- MSG_SMB_SAM_SYNC, msg_sam_sync);
- messaging_register(smbd_messaging_context(), NULL,
- MSG_SHUTDOWN, msg_exit_server);
- messaging_register(smbd_messaging_context(), NULL,
- MSG_SMB_FILE_RENAME, msg_file_was_renamed);
- messaging_register(smbd_messaging_context(), NULL,
- MSG_SMB_CONF_UPDATED, smb_conf_updated);
- messaging_register(smbd_messaging_context(), NULL,
- MSG_SMB_STAT_CACHE_DELETE, smb_stat_cache_delete);
- messaging_register(smbd_messaging_context(), NULL,
- MSG_DEBUG, smbd_msg_debug);
- brl_register_msgs(smbd_messaging_context());
+ messaging_register(msg_ctx, NULL, MSG_SMB_SAM_SYNC, msg_sam_sync);
+ messaging_register(msg_ctx, NULL, MSG_SHUTDOWN, msg_exit_server);
+ messaging_register(msg_ctx, NULL, MSG_SMB_FILE_RENAME,
+ msg_file_was_renamed);
+ messaging_register(msg_ctx, server_event_context(), MSG_SMB_CONF_UPDATED,
+ smb_conf_updated);
+ messaging_register(msg_ctx, NULL, MSG_SMB_STAT_CACHE_DELETE,
+ smb_stat_cache_delete);
+ messaging_register(msg_ctx, NULL, MSG_DEBUG, smbd_msg_debug);
+ messaging_register(msg_ctx, server_event_context(), MSG_PRINTER_PCAP,
+ smb_pcap_updated);
+ brl_register_msgs(msg_ctx);
+
+ msg_idmap_register_msgs(msg_ctx);
#ifdef CLUSTER_SUPPORT
if (lp_clustering()) {
#endif
#ifdef DEVELOPER
- messaging_register(smbd_messaging_context(), NULL,
- MSG_SMB_INJECT_FAULT, msg_inject_fault);
+ messaging_register(msg_ctx, NULL, MSG_SMB_INJECT_FAULT,
+ msg_inject_fault);
#endif
- if (dns_port != 0) {
+ if (lp_multicast_dns_register() && (dns_port != 0)) {
#ifdef WITH_DNSSD_SUPPORT
- smbd_setup_mdns_registration(smbd_event_context(),
+ smbd_setup_mdns_registration(server_event_context(),
parent, dns_port);
#endif
#ifdef WITH_AVAHI_SUPPORT
void *avahi_conn;
avahi_conn = avahi_start_register(
- smbd_event_context(), smbd_event_context(), dns_port);
+ server_event_context(), server_event_context(), dns_port);
if (avahi_conn == NULL) {
DEBUG(10, ("avahi_start_register failed\n"));
}
int ret;
TALLOC_CTX *frame = talloc_stackframe();
- ret = tevent_loop_once(smbd_event_context());
+ ret = tevent_loop_once(server_event_context());
if (ret != 0) {
exit_server_cleanly("tevent_loop_once() error");
}
/* NOTREACHED return True; */
}
-/****************************************************************************
- Reload printers
-**************************************************************************/
-void reload_printers(void)
-{
- int snum;
- int n_services = lp_numservices();
- int pnum = lp_servicenumber(PRINTERS_NAME);
- const char *pname;
-
- pcap_cache_reload();
-
- /* remove stale printers */
- for (snum = 0; snum < n_services; snum++) {
- /* avoid removing PRINTERS_NAME or non-autoloaded printers */
- if (snum == pnum || !(lp_snum_ok(snum) && lp_print_ok(snum) &&
- lp_autoloaded(snum)))
- continue;
-
- pname = lp_printername(snum);
- if (!pcap_printername_ok(pname)) {
- DEBUG(3, ("removing stale printer %s\n", pname));
-
- if (is_printer_published(NULL, snum, NULL))
- nt_printer_publish(NULL, snum, DSPRINT_UNPUBLISH);
- del_a_printer(pname);
- lp_killservice(snum);
- }
- }
-
- load_printers();
-}
-
-/****************************************************************************
- Reload the services file.
-**************************************************************************/
-
-bool reload_services(bool test)
-{
- bool ret;
-
- if (lp_loaded()) {
- char *fname = lp_configfile();
- if (file_exist(fname) &&
- !strcsequal(fname, get_dyn_CONFIGFILE())) {
- set_dyn_CONFIGFILE(fname);
- test = False;
- }
- }
-
- reopen_logs();
-
- if (test && !lp_file_list_changed())
- return(True);
-
- lp_killunused(conn_snum_used);
-
- ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True);
-
- reload_printers();
-
- /* perhaps the config filename is now set */
- if (!test)
- reload_services(True);
-
- reopen_logs();
-
- load_interfaces();
-
- if (smbd_server_fd() != -1) {
- set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
- set_socket_options(smbd_server_fd(), lp_socket_options());
- }
-
- mangle_reset_cache();
- reset_stat_cache();
-
- /* this forces service parameters to be flushed */
- set_current_service(NULL,0,True);
-
- return(ret);
-}
/****************************************************************************
Initialise connect, service and file structs.
if (!init_names())
return False;
- file_init();
-
if (!secrets_init())
return False;
POPT_TABLEEND
};
struct smbd_parent_context *parent = NULL;
- TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */
+ TALLOC_CTX *frame;
+ NTSTATUS status;
+ uint64_t unique_id;
+
+ /*
+ * Do this before any other talloc operation
+ */
+ talloc_enable_null_tracking();
+ frame = talloc_stackframe();
+
+ load_case_tables();
+
+ /* Initialize the event context, it will panic on error */
+ server_event_context();
smbd_init_globals();
log_stdout = True;
}
- setup_logging(argv[0],log_stdout);
+ if (log_stdout) {
+ setup_logging(argv[0], DEBUG_STDOUT);
+ } else {
+ setup_logging(argv[0], DEBUG_FILE);
+ }
if (print_build_options) {
build_options(True); /* Display output to screen as well as debug */
exit(0);
}
- load_case_tables();
-
#ifdef HAVE_SETLUID
/* needed for SecureWare on SCO */
setluid(0);
#endif
- sec_init();
-
set_remote_machine_name("smbd", False);
if (interactive && (DEBUGLEVEL >= 9)) {
client problems at a later date. (tridge) */
generate_random_buffer(NULL, 0);
+ /* get initial effective uid and gid */
+ sec_init();
+
/* make absolutely sure we run as root - to handle cases where people
are crazy enough to have it setuid */
-
gain_root_privilege();
gain_root_group_privilege();
- fault_setup((void (*)(void *))exit_server_fault);
- dump_core_setup("smbd");
+ fault_setup();
+ dump_core_setup("smbd", lp_logfile());
/* we are never interested in SIGPIPE */
BlockSignals(True,SIGPIPE);
so set our umask to 0 */
umask(0);
- init_sec_ctx();
-
reopen_logs();
DEBUG(0,("smbd version %s started.\n", samba_version_string()));
}
if (!lp_load_initial_only(get_dyn_CONFIGFILE())) {
- DEBUG(0, ("error opening config file\n"));
+ DEBUG(0, ("error opening config file '%s'\n", get_dyn_CONFIGFILE()));
exit(1);
}
+ /* Init the security context and global current_user */
+ init_sec_ctx();
+
if (smbd_messaging_context() == NULL)
exit(1);
- if (!reload_services(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(NULL, -1, 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"));
become_daemon(Fork, no_process_group, log_stdout);
}
+ generate_random_buffer((uint8_t *)&unique_id, sizeof(unique_id));
+ set_my_unique_id(unique_id);
+
#if HAVE_SETPGID
/*
* If we're interactive we want to set our own process group for
if (is_daemon)
pidfile_create("smbd");
- if (!NT_STATUS_IS_OK(reinit_after_fork(smbd_messaging_context(),
- smbd_event_context(), false))) {
+ status = reinit_after_fork(smbd_messaging_context(),
+ server_event_context(),
+ procid_self(), false);
+ if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("reinit_after_fork() failed\n"));
exit(1);
}
+ smbd_server_conn->msg_ctx = smbd_messaging_context();
+
smbd_setup_sig_term_handler();
- smbd_setup_sig_hup_handler();
+ smbd_setup_sig_hup_handler(server_event_context(),
+ smbd_server_conn->msg_ctx);
/* Setup all the TDB's - including CLEAR_IF_FIRST tdb's. */
/* Initialise the password backed before the global_sam_sid
to ensure that we fetch from ldap before we make a domain sid up */
- if(!initialize_password_db(False, smbd_event_context()))
+ if(!initialize_password_db(False, server_event_context()))
exit(1);
if (!secrets_init()) {
exit(1);
}
+ if (lp_server_role() == ROLE_DOMAIN_BDC || lp_server_role() == ROLE_DOMAIN_PDC) {
+ if (!open_schannel_session_store(NULL, lp_private_dir())) {
+ DEBUG(0,("ERROR: Samba cannot open schannel store for secured NETLOGON operations.\n"));
+ exit(1);
+ }
+ }
+
if(!get_global_sam_sid()) {
DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n"));
exit(1);
if (!locking_init())
exit(1);
- if (!messaging_tdb_parent_init()) {
+ if (!messaging_tdb_parent_init(server_event_context())) {
exit(1);
}
- if (!notify_internal_parent_init()) {
+ if (!notify_internal_parent_init(server_event_context())) {
exit(1);
}
- if (!serverid_parent_init()) {
+ if (!serverid_parent_init(server_event_context())) {
exit(1);
}
- if (!W_ERROR_IS_OK(registry_init_full()))
+ if (!printer_list_parent_init()) {
exit(1);
-
-#if 0
- if (!init_svcctl_db())
- exit(1);
-#endif
-
- if (!init_system_info()) {
- DEBUG(0,("ERROR: failed to setup system user info.\n"));
- return -1;
}
- if (!print_backend_init(smbd_messaging_context()))
+ if (!W_ERROR_IS_OK(registry_init_full()))
exit(1);
- if (!init_guest_info()) {
- DEBUG(0,("ERROR: failed to setup guest info.\n"));
- return -1;
- }
+ if (!print_backend_init(smbd_messaging_context()))
+ exit(1);
/* Open the share_info.tdb here, so we don't have to open
after the fork on every single connection. This is a small
exit(1);
}
+ 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(server_event_context(),
+ smbd_server_conn->msg_ctx);
+ }
+ }
+
+ if (!dcesrv_ep_setup(server_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);
+
/* 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
if (is_daemon && !interactive
&& lp_parm_bool(-1, "smbd", "backgroundqueue", true)) {
- start_background_queue();
+ start_background_queue(server_event_context(),
+ smbd_messaging_context());
+ }
+
+ if (is_daemon && !_lp_disable_spoolss()) {
+ const char *rpcsrv_type;
+
+ /* start spoolss daemon */
+ /* start as a separate daemon only if enabled */
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", "spoolss",
+ "embedded");
+ if (strcasecmp_m(rpcsrv_type, "daemon") == 0) {
+ start_spoolssd(server_event_context(),
+ smbd_messaging_context());
+ }
}
if (!is_daemon) {
/* Started from inetd. fd 0 is the socket. */
/* We will abort gracefully when the client or remote system
goes away */
- smbd_set_server_fd(dup(0));
+ smbd_server_conn->sock = dup(0);
/* close our standard file descriptors */
close_low_fds(False); /* Don't close stderr */
/* Stop zombies */
smbd_setup_sig_chld_handler();
- smbd_process();
+ smbd_process(smbd_server_conn);
exit_server_cleanly(NULL);
return(0);
}
- parent = talloc_zero(smbd_event_context(), struct smbd_parent_context);
+ parent = talloc_zero(server_event_context(), struct smbd_parent_context);
if (!parent) {
exit_server("talloc(struct smbd_parent_context) failed");
}
parent->interactive = interactive;
- if (!open_sockets_smbd(parent, ports))
+ if (!open_sockets_smbd(parent, smbd_messaging_context(), ports))
exit_server("open_sockets_smbd() failed");
TALLOC_FREE(frame);