#include "includes.h"
#include "system/network.h"
-#include "lib/events/events.h"
-#include "lib/socket/socket.h"
-#include "lib/tsocket/tsocket.h"
+#include "tevent.h"
#include "../lib/util/tevent_ntstatus.h"
#include "librpc/rpc/dcerpc.h"
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
-#include "auth/gensec/gensec_proto.h"
-#include "auth/auth.h"
-#include "auth/system_session_proto.h"
-#include "param/param.h"
+#include "lib/param/param.h"
#include "lib/util/tsort.h"
-#include "auth/gensec/gensec_toplevel_proto.h"
#include "lib/util/samba_modules.h"
/* the list of currently registered GENSEC backends */
@ gensec_security return
*/
static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
struct gensec_settings *settings,
struct auth4_context *auth_context,
struct gensec_security **gensec_security)
{
- if (ev == NULL) {
- DEBUG(0, ("No event context available!\n"));
- return NT_STATUS_INTERNAL_ERROR;
- }
-
(*gensec_security) = talloc_zero(mem_ctx, struct gensec_security);
NT_STATUS_HAVE_NO_MEMORY(*gensec_security);
- (*gensec_security)->event_ctx = ev;
SMB_ASSERT(settings->lp_ctx != NULL);
(*gensec_security)->settings = talloc_reference(*gensec_security, settings);
(*gensec_security)->subcontext = true;
(*gensec_security)->want_features = parent->want_features;
- (*gensec_security)->event_ctx = parent->event_ctx;
+ (*gensec_security)->dcerpc_auth_level = parent->dcerpc_auth_level;
(*gensec_security)->auth_context = talloc_reference(*gensec_security, parent->auth_context);
(*gensec_security)->settings = talloc_reference(*gensec_security, parent->settings);
(*gensec_security)->auth_context = talloc_reference(*gensec_security, parent->auth_context);
*/
_PUBLIC_ NTSTATUS gensec_client_start(TALLOC_CTX *mem_ctx,
struct gensec_security **gensec_security,
- struct tevent_context *ev,
struct gensec_settings *settings)
{
NTSTATUS status;
return NT_STATUS_INTERNAL_ERROR;
}
- status = gensec_start(mem_ctx, ev, settings, NULL, gensec_security);
+ status = gensec_start(mem_ctx, settings, NULL, gensec_security);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@note The mem_ctx is only a parent and may be NULL.
*/
_PUBLIC_ NTSTATUS gensec_server_start(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
struct gensec_settings *settings,
struct auth4_context *auth_context,
struct gensec_security **gensec_security)
{
NTSTATUS status;
- if (!ev) {
- DEBUG(0,("gensec_server_start: no event context given!\n"));
- return NT_STATUS_INTERNAL_ERROR;
- }
-
if (!settings) {
DEBUG(0,("gensec_server_start: no settings given!\n"));
return NT_STATUS_INTERNAL_ERROR;
}
- status = gensec_start(mem_ctx, ev, settings, auth_context, gensec_security);
+ status = gensec_start(mem_ctx, settings, auth_context, gensec_security);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
DEBUG(3, ("Could not find GENSEC backend for auth_type=%d\n", (int)auth_type));
return NT_STATUS_INVALID_PARAMETER;
}
+ gensec_security->dcerpc_auth_level = auth_level;
gensec_want_feature(gensec_security, GENSEC_FEATURE_DCE_STYLE);
gensec_want_feature(gensec_security, GENSEC_FEATURE_ASYNC_REPLIES);
if (auth_level == DCERPC_AUTH_LEVEL_INTEGRITY) {
{
static bool initialized = false;
#define _MODULE_PROTO(init) extern NTSTATUS init(void);
-#if _SAMBA_BUILD_ == 4
+#ifdef STATIC_gensec_MODULES
STATIC_gensec_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_gensec_MODULES };
#else