auth: Reorder arguments to generate_session_info
authorAndrew Bartlett <abartlet@samba.org>
Sat, 4 Feb 2012 06:49:49 +0000 (17:49 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 18 Feb 2012 01:19:35 +0000 (02:19 +0100)
This matches check_ntlm_password() and generate_session_info_pac()

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Feb 18 02:19:35 CET 2012 on sn-devel-104

auth/common_auth.h
auth/ntlmssp/gensec_ntlmssp_server.c
source3/auth/auth_ntlmssp.c
source3/auth/proto.h
source4/auth/ntlm/auth.c
source4/auth/ntlm/auth_simple.c
source4/smb_server/smb/sesssetup.c

index d9996e1..c0fd6b6 100644 (file)
@@ -117,8 +117,8 @@ struct auth4_context {
 
        NTSTATUS (*set_challenge)(struct auth4_context *auth_ctx, const uint8_t chal[8], const char *set_by);
 
-       NTSTATUS (*generate_session_info)(TALLOC_CTX *mem_ctx,
-                                         struct auth4_context *auth_context,
+       NTSTATUS (*generate_session_info)(struct auth4_context *auth_context,
+                                         TALLOC_CTX *mem_ctx,
                                          void *server_returned_info,
                                          const char *original_user_name,
                                          uint32_t session_info_flags,
index 8f45c2c..a1d43e6 100644 (file)
@@ -235,7 +235,7 @@ NTSTATUS gensec_ntlmssp_session_info(struct gensec_security *gensec_security,
        session_info_flags |= AUTH_SESSION_INFO_DEFAULT_GROUPS;
 
        if (gensec_security->auth_context && gensec_security->auth_context->generate_session_info) {
-               nt_status = gensec_security->auth_context->generate_session_info(mem_ctx, gensec_security->auth_context,
+               nt_status = gensec_security->auth_context->generate_session_info(gensec_security->auth_context, mem_ctx, 
                                                                                 gensec_ntlmssp->server_returned_info,
                                                                                 gensec_ntlmssp->ntlmssp_state->user,
                                                                                 session_info_flags,
index 7b632fd..582c8dc 100644 (file)
@@ -24,8 +24,8 @@
 #include "includes.h"
 #include "auth.h"
 
-NTSTATUS auth3_generate_session_info(TALLOC_CTX *mem_ctx,
-                                    struct auth4_context *auth_context,
+NTSTATUS auth3_generate_session_info(struct auth4_context *auth_context,
+                                    TALLOC_CTX *mem_ctx,
                                     void *server_returned_info,
                                     const char *original_user_name,
                                     uint32_t session_info_flags,
index bb25fed..1697eda 100644 (file)
@@ -74,8 +74,8 @@ NTSTATUS auth_generic_prepare(TALLOC_CTX *mem_ctx, const struct tsocket_address
 
 /* The following definitions come from auth/auth_ntlmssp.c  */
 
-NTSTATUS auth3_generate_session_info(TALLOC_CTX *mem_ctx,
-                                    struct auth4_context *auth_context,
+NTSTATUS auth3_generate_session_info(struct auth4_context *auth_context,
+                                    TALLOC_CTX *mem_ctx,
                                     void *server_returned_info,
                                     const char *original_user_name,
                                     uint32_t session_info_flags,
index fdfdb63..5c65da9 100644 (file)
@@ -33,9 +33,9 @@
 #include "auth/kerberos/kerberos.h"
 #include "auth/kerberos/kerberos_util.h"
 
-static NTSTATUS auth_generate_session_info_wrapper(TALLOC_CTX *mem_ctx,
-                                                  struct auth4_context *auth_context,
-                                                  void *server_returned_info,
+static NTSTATUS auth_generate_session_info_wrapper(struct auth4_context *auth_context,
+                                                  TALLOC_CTX *mem_ctx,
+                                                  void *server_returned_info,
                                                   const char *original_user_name,
                                                   uint32_t session_info_flags,
                                                   struct auth_session_info **session_info);
@@ -139,7 +139,7 @@ static NTSTATUS auth_generate_session_info_principal(struct auth4_context *auth_
                        return nt_status;
                }
 
-               nt_status = auth_generate_session_info_wrapper(mem_ctx, auth_ctx,
+               nt_status = auth_generate_session_info_wrapper(auth_ctx, mem_ctx, 
                                                               user_info_dc,
                                                               user_info_dc->info->account_name,
                                                               session_info_flags, session_info);
@@ -465,8 +465,8 @@ _PUBLIC_ NTSTATUS auth_check_password_recv(struct tevent_req *req,
   * know that session_info is generated from the main ldb, and because
   * we need to break a depenency loop between the DCE/RPC layer and the
   * generation of unix tokens via IRPC */
-static NTSTATUS auth_generate_session_info_wrapper(TALLOC_CTX *mem_ctx,
-                                                  struct auth4_context *auth_context,
+static NTSTATUS auth_generate_session_info_wrapper(struct auth4_context *auth_context,
+                                                  TALLOC_CTX *mem_ctx,
                                                   void *server_returned_info,
                                                   const char *original_user_name,
                                                   uint32_t session_info_flags,
@@ -543,7 +543,7 @@ static NTSTATUS auth_generate_session_info_pac(struct auth4_context *auth_ctx,
                session_info_flags |= AUTH_SESSION_INFO_AUTHENTICATED;
        }
 
-       status = auth_generate_session_info_wrapper(mem_ctx, auth_ctx,
+       status = auth_generate_session_info_wrapper(auth_ctx, mem_ctx, 
                                                    user_info_dc,
                                                    user_info_dc->info->account_name,
                                                    session_info_flags, session_info);
index 2e69991..f6dd9d0 100644 (file)
@@ -94,7 +94,8 @@ _PUBLIC_ NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
                if (user_info_dc->info->authenticated) {
                        flags |= AUTH_SESSION_INFO_AUTHENTICATED;
                }
-               nt_status = auth_context->generate_session_info(tmp_ctx, auth_context,
+               nt_status = auth_context->generate_session_info(auth_context,
+                                                               tmp_ctx, 
                                                                user_info_dc,
                                                                nt4_username,
                                                                flags,
index 2943747..57460fa 100644 (file)
@@ -83,8 +83,8 @@ static void sesssetup_old_send(struct tevent_req *subreq)
                flags |= AUTH_SESSION_INFO_AUTHENTICATED;
        }
        /* This references user_info_dc into session_info */
-       status = req->smb_conn->negotiate.auth_context->generate_session_info(req,
-                                                                             req->smb_conn->negotiate.auth_context,
+       status = req->smb_conn->negotiate.auth_context->generate_session_info(req->smb_conn->negotiate.auth_context,
+                                                                             req,
                                                                              user_info_dc, sess->old.in.user, 
                                                                              flags, &session_info);
        if (!NT_STATUS_IS_OK(status)) goto failed;
@@ -215,8 +215,8 @@ static void sesssetup_nt1_send(struct tevent_req *subreq)
                flags |= AUTH_SESSION_INFO_AUTHENTICATED;
        }
        /* This references user_info_dc into session_info */
-       status = state->auth_context->generate_session_info(req,
-                                                           state->auth_context,
+       status = state->auth_context->generate_session_info(state->auth_context,
+                                                           req,
                                                            user_info_dc,
                                                            sess->nt1.in.user,
                                                            flags,