From 8a1c7a0a660d78786adac483ecafa157c3a3dc2e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 9 Oct 2012 08:35:04 -0400 Subject: 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 --- source3/torture/vfstest.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source3/torture') diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index 3b474597e9..72156a5752 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -33,6 +33,7 @@ #include "serverid.h" #include "messages.h" #include "libcli/security/security.h" +#include "lib/smbd_shim.h" /* List to hold groups of commands */ static struct cmd_list { @@ -405,15 +406,15 @@ static void process_file(struct vfs_state *pvfs, char *filename) { } } -void exit_server(const char *reason) +static void vfstest_exit_server(const char * const reason) { DEBUG(3,("Server exit (%s)\n", (reason ? reason : ""))); exit(0); } -void exit_server_cleanly(const char *const reason) +static void vfstest_exit_server_cleanly(const char * const reason) { - exit_server("normal exit"); + vfstest_exit_server("normal exit"); } struct smb_request *vfstest_get_smbreq(TALLOC_CTX *mem_ctx, @@ -464,6 +465,11 @@ int main(int argc, char *argv[]) POPT_COMMON_SAMBA POPT_TABLEEND }; + static const struct smbd_shim vfstest_shim_fns = + { + .exit_server = vfstest_exit_server, + .exit_server_cleanly = vfstest_exit_server_cleanly, + }; load_case_tables(); @@ -486,6 +492,8 @@ int main(int argc, char *argv[]) facilities. See lib/debug.c */ setup_logging("vfstest", DEBUG_STDOUT); + set_smbd_shim(&vfstest_shim_fns); + /* Load command lists */ cmd_set = vfstest_command_list; -- cgit