summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-10-09 08:35:04 -0400
committerMichael Adam <obnox@samba.org>2012-10-19 12:14:58 +0200
commit8a1c7a0a660d78786adac483ecafa157c3a3dc2e (patch)
tree6dc679aea61ef42c3ff54e3d5d126f95de80e3d5 /source3/smbd
parent8eab264470ee7adea1e448fc29bc8111902a83b0 (diff)
downloadsamba-8a1c7a0a660d78786adac483ecafa157c3a3dc2e.tar.gz
samba-8a1c7a0a660d78786adac483ecafa157c3a3dc2e.tar.bz2
samba-8a1c7a0a660d78786adac483ecafa157c3a3dc2e.zip
s3:smbd: add exit_server to the smbd_shim hooks
This is in preparation of moving sessionid_tdb and conn_tdb to smbd exclusively. metze Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/proto.h7
-rw-r--r--source3/smbd/server.c3
-rw-r--r--source3/smbd/server_exit.c4
3 files changed, 10 insertions, 4 deletions
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 1b3c23227d..a01629aaea 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -963,11 +963,14 @@ void delete_and_reload_printers(struct tevent_context *ev,
bool reload_services(struct smbd_server_connection *sconn,
bool (*snumused) (struct smbd_server_connection *, int),
bool test);
-void exit_server(const char *const explanation);
-void exit_server_cleanly(const char *const explanation);
NTSTATUS messaging_send_to_children(struct messaging_context *msg_ctx,
uint32_t msg_type, DATA_BLOB* data);
+/* The following definitions come from smbd/server_exit.c */
+
+void smbd_exit_server(const char *reason) _NORETURN_;
+void smbd_exit_server_cleanly(const char *const reason) _NORETURN_;
+
/* The following definitions come from smbd/service.c */
bool set_conn_connectpath(connection_struct *conn, const char *connectpath);
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index d34ee4cbf2..8eb3d9ef93 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1065,6 +1065,9 @@ extern void build_options(bool screen);
.become_root = smbd_become_root,
.unbecome_root = smbd_unbecome_root,
+
+ .exit_server = smbd_exit_server,
+ .exit_server_cleanly = smbd_exit_server_cleanly,
};
/*
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index 517d4c27da..fa28374ba0 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -225,12 +225,12 @@ static void exit_server_common(enum server_exit_reason how,
exit(0);
}
-void exit_server(const char *const explanation)
+void smbd_exit_server(const char *const explanation)
{
exit_server_common(SERVER_EXIT_ABNORMAL, explanation);
}
-void exit_server_cleanly(const char *const explanation)
+void smbd_exit_server_cleanly(const char *const explanation)
{
exit_server_common(SERVER_EXIT_NORMAL, explanation);
}