From 8adde1b46b49011298e77f44a2053d0ec735a306 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 30 Jan 2012 22:11:41 +1100 Subject: s3-auth Hook checking passwords and generating session_info via the auth4_context This avoids creating a second auth_context, as it is a private pointer in the auth4_context that has already been passed in, and makes the gensec_ntlmssp code agnostic to the type of authentication backend behind it. This will in turn allow the ntlmssp server code to be further merged. Andrew Bartlett Signed-off-by: Stefan Metzmacher --- source3/auth/proto.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'source3/auth/proto.h') diff --git a/source3/auth/proto.h b/source3/auth/proto.h index 82d6018556..bb25fedce6 100644 --- a/source3/auth/proto.h +++ b/source3/auth/proto.h @@ -67,11 +67,33 @@ NTSTATUS auth_domain_init(void); NTSTATUS auth_netlogond_init(void); -/* The following definitions come from auth/auth_ntlmssp.c */ +/* The following definitions come from auth/auth_generic.c */ NTSTATUS auth_generic_prepare(TALLOC_CTX *mem_ctx, const struct tsocket_address *remote_address, struct gensec_security **gensec_security_out); +/* The following definitions come from auth/auth_ntlmssp.c */ + +NTSTATUS auth3_generate_session_info(TALLOC_CTX *mem_ctx, + struct auth4_context *auth_context, + void *server_returned_info, + const char *original_user_name, + uint32_t session_info_flags, + struct auth_session_info **session_info); + +NTSTATUS auth3_get_challenge(struct auth4_context *auth4_context, + uint8_t chal[8]); + +bool auth3_may_set_challenge(struct auth4_context *auth4_context); +NTSTATUS auth3_set_challenge(struct auth4_context *auth4_context, const uint8_t *chal, + const char *challenge_set_by); + +NTSTATUS auth3_check_password(struct auth4_context *auth4_context, + TALLOC_CTX *mem_ctx, + const struct auth_usersupplied_info *user_info, + void **server_returned_info, + DATA_BLOB *session_key, DATA_BLOB *lm_session_key); + /* The following definitions come from auth/auth_sam.c */ NTSTATUS check_sam_security(const DATA_BLOB *challenge, @@ -320,4 +342,5 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx, DATA_BLOB *session_key, struct auth_session_info **session_info); + #endif /* _AUTH_PROTO_H_ */ -- cgit