/*
Unix SMB/CIFS implementation.
- RPC pipe client
+ Runtime plugin adapter for various "smbd"-functions.
Copyright (C) Gerald (Jerry) Carter 2004.
Copyright (C) Andrew Bartlett 2011.
#include "includes.h"
#include "smbd_shim.h"
-#include "smbd/proto.h"
static struct smbd_shim shim;
}
}
-NTSTATUS can_delete_directory(struct connection_struct *conn,
- const char *dirname)
+bool change_to_root_user(void)
{
- if (shim.can_delete_directory) {
- return shim.can_delete_directory(conn, dirname);
+ if (shim.change_to_root_user) {
+ return shim.change_to_root_user();
}
- return NT_STATUS_OK;
+ return false;
}
-bool change_to_root_user(void)
+bool become_authenticated_pipe_user(struct auth_session_info *session_info)
{
- if (shim.change_to_root_user) {
- return shim.change_to_root_user();
+ if (shim.become_authenticated_pipe_user) {
+ return shim.become_authenticated_pipe_user(session_info);
+ }
+
+ return false;
+}
+
+bool unbecome_authenticated_pipe_user(void)
+{
+ if (shim.unbecome_authenticated_pipe_user) {
+ return shim.unbecome_authenticated_pipe_user();
}
+
return false;
}
}
return;
}
+
+void exit_server(const char *reason)
+{
+ if (shim.exit_server) {
+ shim.exit_server(reason);
+ }
+ exit(1);
+}
+
+void exit_server_cleanly(const char *const reason)
+{
+ if (shim.exit_server_cleanly) {
+ shim.exit_server_cleanly(reason);
+ }
+ exit(0);
+}