CVE-2020-25717: s3:auth: simplify make_session_info_krb5() by removing unused arguments
[samba.git] / source3 / auth / user_krb5.c
index 7b69ca6c222e957c06fd28777a3920a4017d2bcd..b8f37cbeee05e3c4b0661c264d780f6afa116257 100644 (file)
@@ -150,9 +150,7 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
                                char *ntdomain,
                                char *username,
                                struct passwd *pw,
-                               const struct netr_SamInfo3 *info3,
                                bool mapped_to_guest, bool username_was_mapped,
-                               DATA_BLOB *session_key,
                                struct auth_session_info **session_info)
 {
        NTSTATUS status;
@@ -166,20 +164,6 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
                        return status;
                }
 
-       } else if (info3) {
-               /* pass the unmapped username here since map_username()
-                  will be called again in make_server_info_info3() */
-
-               status = make_server_info_info3(mem_ctx,
-                                               ntuser, ntdomain,
-                                               &server_info,
-                                               info3);
-               if (!NT_STATUS_IS_OK(status)) {
-                       DEBUG(1, ("make_server_info_info3 failed: %s!\n",
-                                 nt_errstr(status)));
-                       return status;
-               }
-
        } else {
                /*
                 * We didn't get a PAC, we have to make up the user
@@ -231,7 +215,7 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
 
        server_info->nss_token |= username_was_mapped;
 
-       status = create_local_token(mem_ctx, server_info, session_key, ntuser, session_info);
+       status = create_local_token(mem_ctx, server_info, NULL, ntuser, session_info);
        talloc_free(server_info);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(10,("failed to create local token: %s\n",
@@ -261,9 +245,7 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
                                char *ntdomain,
                                char *username,
                                struct passwd *pw,
-                               const struct netr_SamInfo3 *info3,
                                bool mapped_to_guest, bool username_was_mapped,
-                               DATA_BLOB *session_key,
                                struct auth_session_info **session_info)
 {
        return NT_STATUS_NOT_IMPLEMENTED;