Add support for the new modules system to auth/ (merge from HEAD)
[jra/samba/.git] / source3 / auth / auth_domain.c
index b3f50072bcb6ea965b23a0c78bf073c8b1cd72ec..24a5bb562cbc1e24eff2c00ef4c11b721824ee5d 100644 (file)
@@ -24,7 +24,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
 
-BOOL global_machine_password_needs_changing = False;
+extern BOOL global_machine_password_needs_changing;
 
 extern userdom_struct current_user_info;
 
@@ -115,7 +115,7 @@ static NTSTATUS rpc_resolve_dc(const char *server,
  * @param cli the cli to return containing the active connection
  * @param server either a machine name or text IP address to
  *               connect to.
- * @param trust_password the trust password to establish the
+ * @param trust_passwd the trust password to establish the
  *                       credentials with.
  *
  **/
@@ -350,13 +350,6 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
        } else {
                nt_status = make_server_info_info3(mem_ctx, user_info->internal_username.str, 
                                                   user_info->smb_name.str, domain, server_info, &info3);
-#if 0 
-               /* The stuff doesn't work right yet */
-               SMB_ASSERT(sizeof((*server_info)->session_key) == sizeof(info3.user_sess_key)); 
-               memcpy((*server_info)->session_key, info3.user_sess_key, sizeof((*server_info)->session_key)/* 16 */);
-               SamOEMhash((*server_info)->session_key, trust_passwd, sizeof((*server_info)->session_key));
-#endif         
-
                uni_group_cache_store_netlogon(mem_ctx, &info3);
        }
 
@@ -552,3 +545,10 @@ NTSTATUS auth_init_trustdomain(struct auth_context *auth_context, const char* pa
        (*auth_method)->auth = check_trustdomain_security;
        return NT_STATUS_OK;
 }
+
+int auth_domain_init(void) 
+{
+       smb_register_auth("trustdomain", auth_init_trustdomain, AUTH_INTERFACE_VERSION);
+       smb_register_auth("ntdomain", auth_init_ntdomain, AUTH_INTERFACE_VERSION);
+       return True;
+}