summaryrefslogtreecommitdiff
path: root/source3/torture
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/torture
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/torture')
-rw-r--r--source3/torture/vfstest.c14
1 files changed, 11 insertions, 3 deletions
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;