summaryrefslogtreecommitdiff
path: root/source4/auth/auth.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-02-13 10:24:16 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-02-13 10:24:16 +1100
commit71632a16977a93968b0d520a491a52f635e611a1 (patch)
tree75604f676004c10bdd9c4ee1cfdf917a90ddfc0b /source4/auth/auth.h
parent147a2e3440056ec30d8b386901754a58ea3947d1 (diff)
downloadsamba-71632a16977a93968b0d520a491a52f635e611a1.tar.gz
samba-71632a16977a93968b0d520a491a52f635e611a1.tar.bz2
samba-71632a16977a93968b0d520a491a52f635e611a1.zip
Remove auth/ntlm as a dependency of GENSEC by means of function pointers.
When starting GENSEC on the server, the auth subsystem context must be passed in, which now includes function pointers to the key elements. This should (when the other dependencies are fixed up) allow GENSEC to exist as a client or server library without bundling in too much of our server code. Andrew Bartlett
Diffstat (limited to 'source4/auth/auth.h')
-rw-r--r--source4/auth/auth.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index e184776140..0ef1e24cd3 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -175,6 +175,20 @@ struct auth_context {
/* loadparm context */
struct loadparm_context *lp_ctx;
+
+ NTSTATUS (*check_password)(struct auth_context *auth_ctx,
+ TALLOC_CTX *mem_ctx,
+ const struct auth_usersupplied_info *user_info,
+ struct auth_serversupplied_info **server_info);
+
+ NTSTATUS (*get_challenge)(struct auth_context *auth_ctx, const uint8_t **_chal);
+
+ bool (*challenge_may_be_modified)(struct auth_context *auth_ctx);
+
+ NTSTATUS (*set_challenge)(struct auth_context *auth_ctx, const uint8_t chal[8], const char *set_by);
+
+
+
};
/* this structure is used by backends to determine the size of some critical types */
@@ -197,6 +211,8 @@ struct auth_critical_sizes {
struct ldb_message;
struct ldb_context;
+struct gensec_security;
+
NTSTATUS auth_get_challenge(struct auth_context *auth_ctx, const uint8_t **_chal);
NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
struct ldb_context *sam_ctx,
@@ -254,4 +270,12 @@ void auth_check_password_send(struct auth_context *auth_ctx,
void *private_data);
NTSTATUS auth_context_set_challenge(struct auth_context *auth_ctx, const uint8_t chal[8], const char *set_by);
+NTSTATUS samba_server_gensec_start(TALLOC_CTX *mem_ctx,
+ struct tevent_context *event_ctx,
+ struct messaging_context *msg_ctx,
+ struct loadparm_context *lp_ctx,
+ struct cli_credentials *server_credentials,
+ const char *target_service,
+ struct gensec_security **gensec_context);
+
#endif /* _SMBAUTH_H_ */