summaryrefslogtreecommitdiff
path: root/source3/auth/proto.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-02-03 21:58:44 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-03-08 10:14:05 +0100
commit77602d877e755b2672b136704b039d85797fe305 (patch)
tree2145edafe1b4a97eda738c54e89056583c563353 /source3/auth/proto.h
parent50547a9950062311a4952846960b15e1d6cdfdf5 (diff)
downloadsamba-77602d877e755b2672b136704b039d85797fe305.tar.gz
samba-77602d877e755b2672b136704b039d85797fe305.tar.bz2
samba-77602d877e755b2672b136704b039d85797fe305.zip
s3-auth: Remove single-implementation plugin layer
The ->get_ntlm_challenge and ->check_ntlm_password elements of struct auth_context were only ever initialised to a single value. Make it easier to follow by just calling the function directly. Andrew Bartlett
Diffstat (limited to 'source3/auth/proto.h')
-rw-r--r--source3/auth/proto.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index 04f94ae84b..01e2934dc7 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -44,6 +44,46 @@ NTSTATUS make_auth_context_fixed(TALLOC_CTX *mem_ctx,
struct auth_context **auth_context,
uchar chal[8]) ;
+/****************************************************************************
+ Try to get a challenge out of the various authentication modules.
+ Returns a const char of length 8 bytes.
+****************************************************************************/
+
+NTSTATUS auth_get_ntlm_challenge(struct auth_context *auth_context,
+ uint8_t chal[8]);
+
+/**
+ * Check a user's Plaintext, LM or NTLM password.
+ *
+ * Check a user's password, as given in the user_info struct and return various
+ * interesting details in the server_info struct.
+ *
+ * This function does NOT need to be in a become_root()/unbecome_root() pair
+ * as it makes the calls itself when needed.
+ *
+ * The return value takes precedence over the contents of the server_info
+ * struct. When the return is other than NT_STATUS_OK the contents
+ * of that structure is undefined.
+ *
+ * @param user_info Contains the user supplied components, including the passwords.
+ * Must be created with make_user_info() or one of its wrappers.
+ *
+ * @param auth_context Supplies the challenges and some other data.
+ * Must be created with make_auth_context(), and the challenges should be
+ * filled in, either at creation or by calling the challenge geneation
+ * function auth_get_challenge().
+ *
+ * @param server_info If successful, contains information about the authentication,
+ * including a struct samu struct describing the user.
+ *
+ * @return An NTSTATUS with NT_STATUS_OK or an appropriate error.
+ *
+ **/
+
+NTSTATUS auth_check_ntlm_password(const struct auth_context *auth_context,
+ const struct auth_usersupplied_info *user_info,
+ struct auth_serversupplied_info **server_info);
+
/* The following definitions come from auth/auth_builtin.c */
NTSTATUS auth_builtin_init(void);