Add support for the new modules system to auth/ (merge from HEAD)
[jra/samba/.git] / source3 / auth / auth_domain.c
index 0d90a184a407a5d2095c4a0d034ad4f3ff7a119b..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;
 
@@ -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;
+}