2 Unix SMB/CIFS implementation.
3 Main SMB server routines
4 Copyright (C) Andrew Tridgell 1992-1998
5 Copyright (C) Martin Pool 2002
6 Copyright (C) Jelmer Vernooij 2002-2003
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 static int am_parent
= 1;
29 /* the last message the was processed */
30 int last_message
= -1;
32 /* a useful macro to debug the last message processed */
33 #define LAST_MESSAGE() smb_fn_name(last_message)
35 extern struct auth_context
*negprot_global_auth_context
;
36 extern pstring user_socket_options
;
37 extern SIG_ATOMIC_T got_sig_term
;
38 extern SIG_ATOMIC_T reload_after_sighup
;
39 static SIG_ATOMIC_T got_sig_cld
;
42 extern int dcelogin_atmost_once
;
45 /* really we should have a top level context structure that has the
46 client file descriptor as an element. That would require a major rewrite :(
48 the following 2 functions are an alternative - they make the file
49 descriptor private to smbd
51 static int server_fd
= -1;
53 int smbd_server_fd(void)
58 static void smbd_set_server_fd(int fd
)
64 /*******************************************************************
65 What to do when smb.conf is updated.
66 ********************************************************************/
68 static void smb_conf_updated(int msg_type
, struct process_id src
,
69 void *buf
, size_t len
)
71 DEBUG(10,("smb_conf_updated: Got message saying smb.conf was updated. Reloading.\n"));
72 reload_services(False
);
76 /****************************************************************************
78 ****************************************************************************/
80 static void sig_term(void)
83 sys_select_signal(SIGTERM
);
86 /****************************************************************************
88 ****************************************************************************/
90 static void sig_hup(int sig
)
92 reload_after_sighup
= 1;
93 sys_select_signal(SIGHUP
);
96 /****************************************************************************
98 ****************************************************************************/
99 static void sig_cld(int sig
)
102 sys_select_signal(SIGCLD
);
105 /****************************************************************************
106 Send a SIGTERM to our process group.
107 *****************************************************************************/
109 static void killkids(void)
111 if(am_parent
) kill(0,SIGTERM
);
114 /****************************************************************************
115 Process a sam sync message - not sure whether to do this here or
117 ****************************************************************************/
119 static void msg_sam_sync(int UNUSED(msg_type
), struct process_id
UNUSED(pid
),
120 void *UNUSED(buf
), size_t UNUSED(len
))
122 DEBUG(10, ("** sam sync message received, ignoring\n"));
125 /****************************************************************************
126 Process a sam sync replicate message - not sure whether to do this here or
128 ****************************************************************************/
130 static void msg_sam_repl(int msg_type
, struct process_id pid
,
131 void *buf
, size_t len
)
135 if (len
!= sizeof(uint32
))
138 low_serial
= *((uint32
*)buf
);
140 DEBUG(3, ("received sam replication message, serial = 0x%04x\n",
144 /****************************************************************************
145 Open the socket communication - inetd.
146 ****************************************************************************/
148 static BOOL
open_sockets_inetd(void)
150 /* Started from inetd. fd 0 is the socket. */
151 /* We will abort gracefully when the client or remote system
153 smbd_set_server_fd(dup(0));
155 /* close our standard file descriptors */
156 close_low_fds(False
); /* Don't close stderr */
158 set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
159 set_socket_options(smbd_server_fd(), user_socket_options
);
164 static void msg_exit_server(int msg_type
, struct process_id src
,
165 void *buf
, size_t len
)
167 DEBUG(3, ("got a SHUTDOWN message\n"));
168 exit_server_cleanly(NULL
);
172 static void msg_inject_fault(int msg_type
, struct process_id src
,
173 void *buf
, size_t len
)
177 if (len
!= sizeof(int)) {
179 DEBUG(0, ("Process %llu sent bogus signal injection request\n",
180 (unsigned long long)src
.pid
));
186 exit_server("internal error injected");
191 DEBUG(0, ("Process %llu requested injection of signal %d (%s)\n",
192 (unsigned long long)src
.pid
, sig
, strsignal(sig
)));
194 DEBUG(0, ("Process %llu requested injection of signal %d\n",
195 (unsigned long long)src
.pid
, sig
));
198 kill(sys_getpid(), sig
);
200 #endif /* DEVELOPER */
203 struct child_pid
*prev
, *next
;
207 static struct child_pid
*children
;
208 static int num_children
;
210 static void add_child_pid(pid_t pid
)
212 struct child_pid
*child
;
214 if (lp_max_smbd_processes() == 0) {
215 /* Don't bother with the child list if we don't care anyway */
219 child
= SMB_MALLOC_P(struct child_pid
);
221 DEBUG(0, ("Could not add child struct -- malloc failed\n"));
225 DLIST_ADD(children
, child
);
229 static void remove_child_pid(pid_t pid
)
231 struct child_pid
*child
;
233 if (lp_max_smbd_processes() == 0) {
234 /* Don't bother with the child list if we don't care anyway */
238 for (child
= children
; child
!= NULL
; child
= child
->next
) {
239 if (child
->pid
== pid
) {
240 struct child_pid
*tmp
= child
;
241 DLIST_REMOVE(children
, child
);
248 DEBUG(0, ("Could not find child %d -- ignoring\n", (int)pid
));
251 /****************************************************************************
252 Have we reached the process limit ?
253 ****************************************************************************/
255 static BOOL
allowable_number_of_smbd_processes(void)
257 int max_processes
= lp_max_smbd_processes();
262 return num_children
< max_processes
;
265 /****************************************************************************
266 Open the socket communication.
267 ****************************************************************************/
269 static BOOL
open_sockets_smbd(BOOL is_daemon
, BOOL interactive
, const char *smb_ports
)
271 int num_interfaces
= iface_count();
273 int fd_listenset
[FD_SETSIZE
];
281 return open_sockets_inetd();
287 static int atexit_set
;
288 if(atexit_set
== 0) {
296 CatchSignal(SIGCLD
, sig_cld
);
298 FD_ZERO(&listen_set
);
300 /* use a reasonable default set of ports - listing on 445 and 139 */
302 ports
= lp_smb_ports();
303 if (!ports
|| !*ports
) {
304 ports
= smb_xstrdup(SMB_PORTS
);
306 ports
= smb_xstrdup(ports
);
309 ports
= smb_xstrdup(smb_ports
);
312 if (lp_interfaces() && lp_bind_interfaces_only()) {
313 /* We have been given an interfaces line, and been
314 told to only bind to those interfaces. Create a
315 socket per interface and bind to only these.
318 /* Now open a listen socket for each of the
320 for(i
= 0; i
< num_interfaces
; i
++) {
321 struct in_addr
*ifip
= iface_n_ip(i
);
326 DEBUG(0,("open_sockets_smbd: interface %d has NULL IP address !\n", i
));
330 for (ptr
=ports
; next_token(&ptr
, tok
, " \t,", sizeof(tok
)); ) {
331 unsigned port
= atoi(tok
);
335 s
= fd_listenset
[num_sockets
] = open_socket_in(SOCK_STREAM
, port
, 0, ifip
->s_addr
, True
);
339 /* ready to listen */
340 set_socket_options(s
,"SO_KEEPALIVE");
341 set_socket_options(s
,user_socket_options
);
343 /* Set server socket to non-blocking for the accept. */
344 set_blocking(s
,False
);
346 if (listen(s
, SMBD_LISTEN_BACKLOG
) == -1) {
347 DEBUG(0,("listen: %s\n",strerror(errno
)));
351 FD_SET(s
,&listen_set
);
352 maxfd
= MAX( maxfd
, s
);
355 if (num_sockets
>= FD_SETSIZE
) {
356 DEBUG(0,("open_sockets_smbd: Too many sockets to bind to\n"));
362 /* Just bind to 0.0.0.0 - accept connections
370 for (ptr
=ports
; next_token(&ptr
, tok
, " \t,", sizeof(tok
)); ) {
371 unsigned port
= atoi(tok
);
372 if (port
== 0) continue;
373 /* open an incoming socket */
374 s
= open_socket_in(SOCK_STREAM
, port
, 0,
375 interpret_addr(lp_socket_address()),True
);
379 /* ready to listen */
380 set_socket_options(s
,"SO_KEEPALIVE");
381 set_socket_options(s
,user_socket_options
);
383 /* Set server socket to non-blocking for the accept. */
384 set_blocking(s
,False
);
386 if (listen(s
, SMBD_LISTEN_BACKLOG
) == -1) {
387 DEBUG(0,("open_sockets_smbd: listen: %s\n",
393 fd_listenset
[num_sockets
] = s
;
394 FD_SET(s
,&listen_set
);
395 maxfd
= MAX( maxfd
, s
);
399 if (num_sockets
>= FD_SETSIZE
) {
400 DEBUG(0,("open_sockets_smbd: Too many sockets to bind to\n"));
408 /* Listen to messages */
410 message_register(MSG_SMB_SAM_SYNC
, msg_sam_sync
);
411 message_register(MSG_SMB_SAM_REPL
, msg_sam_repl
);
412 message_register(MSG_SHUTDOWN
, msg_exit_server
);
413 message_register(MSG_SMB_FILE_RENAME
, msg_file_was_renamed
);
414 message_register(MSG_SMB_CONF_UPDATED
, smb_conf_updated
);
417 message_register(MSG_SMB_INJECT_FAULT
, msg_inject_fault
);
420 /* now accept incoming connections - forking a new process
421 for each incoming connection */
422 DEBUG(2,("waiting for a connection\n"));
427 /* Free up temporary memory from the main smbd. */
430 /* Ensure we respond to PING and DEBUG messages from the main smbd. */
437 while ((pid
= sys_waitpid(-1, NULL
, WNOHANG
)) > 0) {
438 remove_child_pid(pid
);
442 memcpy((char *)&lfds
, (char *)&listen_set
,
445 num
= sys_select(maxfd
+1,&lfds
,NULL
,NULL
,NULL
);
447 if (num
== -1 && errno
== EINTR
) {
449 exit_server_cleanly(NULL
);
452 /* check for sighup processing */
453 if (reload_after_sighup
) {
454 change_to_root_user();
455 DEBUG(1,("Reloading services after SIGHUP\n"));
456 reload_services(False
);
457 reload_after_sighup
= 0;
463 /* check if we need to reload services */
464 check_reload(time(NULL
));
466 /* Find the sockets that are read-ready -
468 for( ; num
> 0; num
--) {
469 struct sockaddr addr
;
470 socklen_t in_addrlen
= sizeof(addr
);
474 for(i
= 0; i
< num_sockets
; i
++) {
475 if(FD_ISSET(fd_listenset
[i
],&lfds
)) {
477 /* Clear this so we don't look
479 FD_CLR(fd_listenset
[i
],&lfds
);
484 smbd_set_server_fd(accept(s
,&addr
,&in_addrlen
));
486 if (smbd_server_fd() == -1 && errno
== EINTR
)
489 if (smbd_server_fd() == -1) {
490 DEBUG(0,("open_sockets_smbd: accept: %s\n",
495 /* Ensure child is set to blocking mode */
496 set_blocking(smbd_server_fd(),True
);
498 if (smbd_server_fd() != -1 && interactive
)
501 if (allowable_number_of_smbd_processes() &&
502 smbd_server_fd() != -1 &&
503 ((child
= sys_fork())==0)) {
506 /* Stop zombies, the parent explicitly handles
507 * them, counting worker smbds. */
510 /* close the listening socket(s) */
511 for(i
= 0; i
< num_sockets
; i
++)
512 close(fd_listenset
[i
]);
514 /* close our standard file
516 close_low_fds(False
);
519 set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
520 set_socket_options(smbd_server_fd(),user_socket_options
);
522 /* this is needed so that we get decent entries
523 in smbstatus for port 445 connects */
524 set_remote_machine_name(get_peer_addr(smbd_server_fd()),
527 /* Reset the state of the random
528 * number generation system, so
529 * children do not get the same random
530 * numbers as each other */
532 set_need_random_reseed();
533 /* tdb needs special fork handling - remove
534 * CLEAR_IF_FIRST flags */
535 if (tdb_reopen_all(1) == -1) {
536 DEBUG(0,("tdb_reopen_all failed.\n"));
537 smb_panic("tdb_reopen_all failed.");
542 /* The parent doesn't need this socket */
543 close(smbd_server_fd());
545 /* Sun May 6 18:56:14 2001 ackley@cs.unm.edu:
546 Clear the closed fd info out of server_fd --
547 and more importantly, out of client_fd in
548 util_sock.c, to avoid a possible
549 getpeername failure if we reopen the logs
550 and use %I in the filename.
553 smbd_set_server_fd(-1);
556 add_child_pid(child
);
559 /* Force parent to check log size after
560 * spawning child. Fix from
561 * klausr@ITAP.Physik.Uni-Stuttgart.De. The
562 * parent smbd will log to logserver.smb. It
563 * writes only two messages for each child
564 * started/finished. But each child writes,
565 * say, 50 messages also in logserver.smb,
566 * begining with the debug_count of the
567 * parent, before the child opens its own log
568 * file logserver.client. In a worst case
569 * scenario the size of logserver.smb would be
570 * checked after about 50*50=2500 messages
573 force_check_log_size();
578 /* NOTREACHED return True; */
581 /****************************************************************************
583 **************************************************************************/
584 void reload_printers(void)
587 int n_services
= lp_numservices();
588 int pnum
= lp_servicenumber(PRINTERS_NAME
);
593 /* remove stale printers */
594 for (snum
= 0; snum
< n_services
; snum
++) {
595 /* avoid removing PRINTERS_NAME or non-autoloaded printers */
596 if (snum
== pnum
|| !(lp_snum_ok(snum
) && lp_print_ok(snum
) &&
597 lp_autoloaded(snum
)))
600 pname
= lp_printername(snum
);
601 if (!pcap_printername_ok(pname
)) {
602 DEBUG(3, ("removing stale printer %s\n", pname
));
604 if (is_printer_published(NULL
, snum
, NULL
))
605 nt_printer_publish(NULL
, snum
, SPOOL_DS_UNPUBLISH
);
606 del_a_printer(pname
);
607 lp_killservice(snum
);
614 /****************************************************************************
615 Reload the services file.
616 **************************************************************************/
618 BOOL
reload_services(BOOL test
)
624 pstrcpy(fname
,lp_configfile());
625 if (file_exist(fname
, NULL
) &&
626 !strcsequal(fname
, dyn_CONFIGFILE
)) {
627 pstrcpy(dyn_CONFIGFILE
, fname
);
634 if (test
&& !lp_file_list_changed())
637 lp_killunused(conn_snum_used
);
639 ret
= lp_load(dyn_CONFIGFILE
, False
, False
, True
, True
);
643 /* perhaps the config filename is now set */
645 reload_services(True
);
651 if (smbd_server_fd() != -1) {
652 set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
653 set_socket_options(smbd_server_fd(), user_socket_options
);
656 mangle_reset_cache();
659 /* this forces service parameters to be flushed */
660 set_current_service(NULL
,0,True
);
665 /****************************************************************************
667 ****************************************************************************/
669 /* Reasons for shutting down a server process. */
670 enum server_exit_reason
{ SERVER_EXIT_NORMAL
, SERVER_EXIT_ABNORMAL
};
672 static void exit_server_common(enum server_exit_reason how
,
673 const char *const reason
) NORETURN_ATTRIBUTE
;
675 static void exit_server_common(enum server_exit_reason how
,
676 const char *const reason
)
678 static int firsttime
=1;
684 change_to_root_user();
686 if (negprot_global_auth_context
) {
687 (negprot_global_auth_context
->free
)(&negprot_global_auth_context
);
692 invalidate_all_vuids();
694 print_notify_send_messages(3); /* 3 second timeout. */
696 /* delete our entry in the connections database. */
697 yield_connection(NULL
,"");
699 respond_to_all_remaining_local_messages();
702 if (dcelogin_atmost_once
) {
710 if (how
!= SERVER_EXIT_NORMAL
) {
711 int oldlevel
= DEBUGLEVEL
;
712 char *last_inbuf
= get_InBuffer();
717 DEBUG(0,("Abnormal server exit: %s\n",
718 reason
? reason
: "no explanation provided"));
723 DEBUG(0,("Last message was %s\n", LAST_MESSAGE()));
724 show_msg(last_inbuf
);
727 DEBUGLEVEL
= oldlevel
;
731 DEBUG(3,("Server exit (%s)\n",
732 (reason
? reason
: "normal exit")));
738 void exit_server(const char *const explanation
)
740 exit_server_common(SERVER_EXIT_ABNORMAL
, explanation
);
743 void exit_server_cleanly(const char *const explanation
)
745 exit_server_common(SERVER_EXIT_NORMAL
, explanation
);
748 void exit_server_fault(void)
750 exit_server("critical server fault");
753 /****************************************************************************
754 Initialise connect, service and file structs.
755 ****************************************************************************/
757 static BOOL
init_structs(void )
760 * Set the machine NETBIOS name if not already
761 * set from the config file.
781 /****************************************************************************
783 ****************************************************************************/
785 /* Declare prototype for build_options() to avoid having to run it through
786 mkproto.h. Mixing $(builddir) and $(srcdir) source files in the current
787 prototype generation system is too complicated. */
789 extern void build_options(BOOL screen
);
791 int main(int argc
,const char *argv
[])
793 /* shall I run as a daemon */
794 static BOOL is_daemon
= False
;
795 static BOOL interactive
= False
;
796 static BOOL Fork
= True
;
797 static BOOL no_process_group
= False
;
798 static BOOL log_stdout
= False
;
799 static char *ports
= NULL
;
803 struct poptOption long_options
[] = {
805 {"daemon", 'D', POPT_ARG_VAL
, &is_daemon
, True
, "Become a daemon (default)" },
806 {"interactive", 'i', POPT_ARG_VAL
, &interactive
, True
, "Run interactive (not a daemon)"},
807 {"foreground", 'F', POPT_ARG_VAL
, &Fork
, False
, "Run daemon in foreground (for daemontools, etc.)" },
808 {"no-process-group", '\0', POPT_ARG_VAL
, &no_process_group
, True
, "Don't create a new process group" },
809 {"log-stdout", 'S', POPT_ARG_VAL
, &log_stdout
, True
, "Log to stdout" },
810 {"build-options", 'b', POPT_ARG_NONE
, NULL
, 'b', "Print build options" },
811 {"port", 'p', POPT_ARG_STRING
, &ports
, 0, "Listen on the specified ports"},
813 POPT_COMMON_DYNCONFIG
819 #ifdef HAVE_SET_AUTH_PARAMETERS
820 set_auth_parameters(argc
,argv
);
823 pc
= poptGetContext("smbd", argc
, argv
, long_options
, 0);
825 while((opt
= poptGetNextOpt(pc
)) != -1) {
828 build_options(True
); /* Display output to screen as well as debug */
837 /* needed for SecureWare on SCO */
843 set_remote_machine_name("smbd", False
);
850 if (interactive
&& (DEBUGLEVEL
>= 9)) {
851 talloc_enable_leak_report();
854 if (log_stdout
&& Fork
) {
855 DEBUG(0,("ERROR: Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i)\n"));
859 setup_logging(argv
[0],log_stdout
);
861 /* we want to re-seed early to prevent time delays causing
862 client problems at a later date. (tridge) */
863 generate_random_buffer(NULL
, 0);
865 /* make absolutely sure we run as root - to handle cases where people
866 are crazy enough to have it setuid */
868 gain_root_privilege();
869 gain_root_group_privilege();
871 fault_setup((void (*)(void *))exit_server_fault
);
872 dump_core_setup("smbd");
874 CatchSignal(SIGTERM
, SIGNAL_CAST sig_term
);
875 CatchSignal(SIGHUP
,SIGNAL_CAST sig_hup
);
877 /* we are never interested in SIGPIPE */
878 BlockSignals(True
,SIGPIPE
);
881 /* we are never interested in SIGFPE */
882 BlockSignals(True
,SIGFPE
);
886 /* We are no longer interested in USR2 */
887 BlockSignals(True
,SIGUSR2
);
890 /* POSIX demands that signals are inherited. If the invoking process has
891 * these signals masked, we will have problems, as we won't recieve them. */
892 BlockSignals(False
, SIGHUP
);
893 BlockSignals(False
, SIGUSR1
);
894 BlockSignals(False
, SIGTERM
);
896 /* we want total control over the permissions on created files,
897 so set our umask to 0 */
904 DEBUG(0,( "smbd version %s started.\n", SAMBA_VERSION_STRING
));
905 DEBUGADD( 0, ( "%s\n", COPYRIGHT_STARTUP_MESSAGE
) );
907 DEBUG(2,("uid=%d gid=%d euid=%d egid=%d\n",
908 (int)getuid(),(int)getgid(),(int)geteuid(),(int)getegid()));
910 /* Output the build options to the debug log */
911 build_options(False
);
913 if (sizeof(uint16
) < 2 || sizeof(uint32
) < 4) {
914 DEBUG(0,("ERROR: Samba is not configured correctly for the word size on your machine\n"));
919 * Do this before reload_services.
922 if (!reload_services(False
))
928 if (!profile_setup(False
)) {
929 DEBUG(0,("ERROR: failed to setup profiling\n"));
934 DEBUG(3,( "loaded services\n"));
936 if (!is_daemon
&& !is_a_socket(0)) {
938 DEBUG(0,("standard input is not a socket, assuming -D option\n"));
941 * Setting is_daemon here prevents us from eventually calling
942 * the open_sockets_inetd()
948 if (is_daemon
&& !interactive
) {
949 DEBUG( 3, ( "Becoming a daemon.\n" ) );
950 become_daemon(Fork
, no_process_group
);
955 * If we're interactive we want to set our own process group for
958 if (interactive
&& !no_process_group
)
959 setpgid( (pid_t
)0, (pid_t
)0);
962 if (!directory_exist(lp_lockdir(), NULL
))
963 mkdir(lp_lockdir(), 0755);
966 pidfile_create("smbd");
968 /* Setup all the TDB's - including CLEAR_IF_FIRST tdb's. */
972 /* Initialise the password backed before the global_sam_sid
973 to ensure that we fetch from ldap before we make a domain sid up */
975 if(!initialize_password_db(False
))
978 if (!secrets_init()) {
979 DEBUG(0, ("ERROR: smbd can not open secrets.tdb\n"));
983 if(!get_global_sam_sid()) {
984 DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n"));
991 if (conn_tdb_ctx() == NULL
)
994 if (!locking_init(0))
999 if (!init_registry())
1003 if (!init_svcctl_db())
1007 if (!print_backend_init())
1010 if (!init_guest_info()) {
1011 DEBUG(0,("ERROR: failed to setup guest info.\n"));
1015 /* Setup the main smbd so that we can get messages. */
1016 /* don't worry about general printing messages here */
1018 claim_connection(NULL
,"",0,True
,FLAG_MSG_GENERAL
|FLAG_MSG_SMBD
);
1020 /* only start the background queue daemon if we are
1021 running as a daemon -- bad things will happen if
1022 smbd is launched via inetd and we fork a copy of
1025 if ( is_daemon
&& !interactive
)
1026 start_background_queue();
1028 /* Always attempt to initialize DMAPI. We will only use it later if
1029 * lp_dmapi_support is set on the share, but we need a single global
1030 * session to work with.
1032 dmapi_init_session();
1034 if (!open_sockets_smbd(is_daemon
, interactive
, ports
))
1038 * everything after this point is run after the fork()
1045 /* possibly reload the services file. */
1046 reload_services(True
);
1048 if (!init_account_policy()) {
1049 DEBUG(0,("Could not open account policy tdb.\n"));
1053 if (*lp_rootdir()) {
1054 if (sys_chroot(lp_rootdir()) == 0)
1055 DEBUG(2,("Changed root to %s\n", lp_rootdir()));
1059 if (!init_oplocks())
1062 /* Setup change notify */
1063 if (!init_change_notify())
1066 /* Setup aio signal handler. */
1067 initialize_async_io_handler();
1069 /* re-initialise the timezone */
1072 /* register our message handlers */
1073 message_register(MSG_SMB_FORCE_TDIS
, msg_force_tdis
);
1077 namecache_shutdown();
1079 exit_server_cleanly(NULL
);