s3:auth Make get_ntlm_challenge more like Samba4
authorAndrew Bartlett <abartlet@samba.org>
Mon, 14 Dec 2009 08:43:59 +0000 (19:43 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 13 May 2010 00:12:26 +0000 (10:12 +1000)
This helps with the upcoming NTLMSSP merge, and allows errors to be returned.

Andrew Bartlett

source3/auth/auth.c
source3/include/auth.h

index 317fe307d4bd220616852e3c13a7df107b2be25c..b4995ce19b5bc510f42956630df1b5f88a758d2e 100644 (file)
@@ -76,7 +76,7 @@ static struct auth_init_function_entry *auth_find_backend_entry(const char *name
  Returns a const char of length 8 bytes.
 ****************************************************************************/
 
-static void get_ntlm_challenge(struct auth_context *auth_context,
+static NTSTATUS get_ntlm_challenge(struct auth_context *auth_context,
                               uint8_t chal[8])
 {
        DATA_BLOB challenge = data_blob_null;
@@ -87,7 +87,7 @@ static void get_ntlm_challenge(struct auth_context *auth_context,
                DEBUG(5, ("get_ntlm_challenge (auth subsystem): returning previous challenge by module %s (normal)\n", 
                          auth_context->challenge_set_by));
                memcpy(chal, auth_context->challenge.data, 8);
-               return;
+               return NT_STATUS_OK;
        }
 
        auth_context->challenge_may_be_modified = False;
@@ -138,6 +138,7 @@ static void get_ntlm_challenge(struct auth_context *auth_context,
        auth_context->challenge_set_by=challenge_set_by;
 
        memcpy(chal, auth_context->challenge.data, 8);
+       return NT_STATUS_OK;
 }
 
 
index efae56ae52e36f587907d071bcd89a593d0ea23f..09ad6319365a25670225790df0595cd0d07f95cd 100644 (file)
@@ -91,8 +91,8 @@ struct auth_context {
        /* What order are the various methods in?   Try to stop it changing under us */ 
        struct auth_methods *auth_method_list;  
 
-       void (*get_ntlm_challenge)(struct auth_context *auth_context,
-                                  uint8_t chal[8]);
+       NTSTATUS (*get_ntlm_challenge)(struct auth_context *auth_context,
+                                      uint8_t chal[8]);
        NTSTATUS (*check_ntlm_password)(const struct auth_context *auth_context,
                                        const struct auth_usersupplied_info *user_info, 
                                        struct auth_serversupplied_info **server_info);