r7224: add some more usefull data to the auth_usersupplied_info struct
authorSimo Sorce <idra@samba.org>
Fri, 3 Jun 2005 12:13:33 +0000 (12:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:28 +0000 (13:17 -0500)
(This used to be commit e40c44e9cdc0be7c52207f8479568804e7d9cff2)

source4/auth/auth.h
source4/auth/auth_util.c

index 1ac0b82e1722c617ed10f9e8ad88af87a9518510..d1f8caa2a01a70b39bd8caff5863f3ab13d11fe0 100644 (file)
 /* version 4 - subsequent samba4 version - metze */
 #define AUTH_INTERFACE_VERSION 4
 
+#define USER_INFO_CASE_INSENSITIVE_USERNAME 0x01 /* username may be in any case */
+#define USER_INFO_CASE_INSENSITIVE_PASSWORD 0x02 /* password may be in any case */
+#define USER_INFO_DONT_CHECK_UNIX_ACCOUNT   0x04 /* dont check unix account status */
+
 struct auth_usersupplied_info
 {
        const char *account_name;
        const char *domain_name;
        const char *workstation_name;
+       const char *remote_host;
 
        /* the values the client gives us */
        struct {
@@ -55,6 +60,8 @@ struct auth_usersupplied_info
        DATA_BLOB lm_interactive_password;
        DATA_BLOB nt_interactive_password;
        DATA_BLOB plaintext_password;
+
+       uint32_t flags;
 };
 
 struct auth_serversupplied_info 
index ebd0b742270a5619e17ff14cbb5b545469f3c432..8d5a95cee86036826738dce4b123259b1cca7a41 100644 (file)
@@ -40,15 +40,16 @@ NTSTATUS auth_get_challenge_not_implemented(struct auth_method_context *ctx, TAL
 /****************************************************************************
  Create an auth_usersupplied_data structure
 ****************************************************************************/
-static NTSTATUS make_user_info(TALLOC_CTX *mem_ctx,
+NTSTATUS make_user_info(TALLOC_CTX *mem_ctx,
                                const char *c_account_name,
                                const char *account_name,
                                const char *c_domain_name, 
                                const char *domain_name,
                                const char *workstation_name, 
+                               const char *remote_host, 
                                DATA_BLOB *lm_password, DATA_BLOB *nt_password,
                                DATA_BLOB *lm_interactive_password, DATA_BLOB *nt_interactive_password,
-                               DATA_BLOB *plaintext_password, BOOL encrypted,
+                               DATA_BLOB *plaintext_password, BOOL encrypted, uint32_t flags,
                               struct auth_usersupplied_info **_user_info)
 {
        struct auth_usersupplied_info *user_info;
@@ -177,9 +178,10 @@ NTSTATUS make_user_info_map(TALLOC_CTX *mem_ctx,
                              c_account_name, account_name, 
                              c_domain_name, domain,
                              workstation_name,
+                             workstation_name,
                              lm_password, nt_password,
                              lm_interactive_password, nt_interactive_password,
-                             plaintext, encrypted,
+                             plaintext, encrypted, 0x00,
                              user_info);
 }
 
@@ -280,9 +282,9 @@ NTSTATUS make_user_info_for_reply_enc(TALLOC_CTX *mem_ctx,
 NTSTATUS make_user_info_anonymous(TALLOC_CTX *mem_ctx, struct auth_usersupplied_info **user_info) 
 {
        return make_user_info(mem_ctx,
-                             "", "", "", "", "", 
+                             "", "", "", "", "", "",
                              NULL, NULL, NULL, NULL, 
-                             NULL, True,
+                             NULL, True, 0x00,
                              user_info);
 }