Skip to content

Commit

Permalink
Cleanup mono coreclr security model (#57826)
Browse files Browse the repository at this point in the history
This was used back then to implement the Silverlight security model, it is no longer used.
  • Loading branch information
akoeplinger authored Aug 20, 2021
1 parent 99928a3 commit 2a1d100
Show file tree
Hide file tree
Showing 32 changed files with 31 additions and 349 deletions.
1 change: 1 addition & 0 deletions src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
#include <mono/metadata/runtime.h>
#include <mono/metadata/verify-internals.h>
#include <mono/metadata/reflection-internals.h>
#include <mono/metadata/tokentype.h>
#include <mono/utils/mono-coop-mutex.h>
#include <mono/utils/mono-coop-semaphore.h>
#include <mono/utils/mono-error-internals.h>
Expand Down
3 changes: 0 additions & 3 deletions src/mono/mono/metadata/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ set(metadata_common_sources
profiler.c
profiler-private.h
runtime.c
security-core-clr.c
security-core-clr.h
security-manager.h
string-icalls.c
string-icalls.h
sysmath.c
Expand Down
12 changes: 12 additions & 0 deletions src/mono/mono/metadata/appdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,3 +970,15 @@ runtimeconfig_json_read_props (const char *ptr, const char **endp, int nprops, g

*endp = ptr;
}

void
mono_security_enable_core_clr ()
{
// no-op
}

void
mono_security_set_core_clr_platform_callback (MonoCoreClrPlatformCB callback)
{
// no-op
}
4 changes: 2 additions & 2 deletions src/mono/mono/metadata/class-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#include <mono/metadata/gc-internals.h>
#include <mono/metadata/object-internals.h>
#include <mono/metadata/profiler-private.h>
#include <mono/metadata/security-core-clr.h>
#include <mono/metadata/security-manager.h>
#include <mono/metadata/verify-internals.h>
#include <mono/metadata/abi-details.h>
#include <mono/metadata/tokentype.h>
#include <mono/metadata/marshal.h>
#include <mono/utils/checked-build.h>
#include <mono/utils/mono-counters.h>
#include <mono/utils/mono-error-internals.h>
Expand Down
4 changes: 2 additions & 2 deletions src/mono/mono/metadata/class-setup-vtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <mono/metadata/class-init-internals.h>
#include <mono/metadata/class-internals.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/security-core-clr.h>
#include <mono/metadata/security-manager.h>
#include <mono/metadata/tokentype.h>
#include <mono/metadata/marshal.h>
#include <mono/utils/mono-logger-internals.h>
#include <mono/utils/unlocked.h>
#ifdef MONO_CLASS_DEF_PRIVATE
Expand Down
2 changes: 0 additions & 2 deletions src/mono/mono/metadata/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/reflection.h>
#include <mono/metadata/exception.h>
#include <mono/metadata/security-manager.h>
#include <mono/metadata/security-core-clr.h>
#include <mono/metadata/attrdefs.h>
#include <mono/metadata/gc-internals.h>
#include <mono/metadata/mono-debug.h>
Expand Down
2 changes: 0 additions & 2 deletions src/mono/mono/metadata/icall-decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include "object-forward.h"
#include "object-internals.h"
#include "reflection.h"
#include "security-core-clr.h"
#include "security-manager.h"
#include "string-icalls.h"
#include "mono/utils/mono-digest.h"
#include "mono/utils/mono-forward-internal.h"
Expand Down
2 changes: 0 additions & 2 deletions src/mono/mono/metadata/icall.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
#include <mono/metadata/profiler-private.h>
#include <mono/metadata/mono-config.h>
#include <mono/metadata/cil-coff.h>
#include <mono/metadata/security-manager.h>
#include <mono/metadata/security-core-clr.h>
#include <mono/metadata/mono-perfcounters.h>
#include <mono/metadata/mono-debug.h>
#include <mono/metadata/mono-ptr-array.h>
Expand Down
3 changes: 0 additions & 3 deletions src/mono/mono/metadata/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <mono/metadata/class-internals.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/object-internals.h>
#include <mono/metadata/security-core-clr.h>
#include <mono/metadata/verify.h>
#include <mono/metadata/image-internals.h>
#include <mono/metadata/loaded-images-internals.h>
Expand Down Expand Up @@ -1458,8 +1457,6 @@ do_mono_image_open (MonoAssemblyLoadContext *alc, const char *fname, MonoImageOp
image->metadata_only = metadata_only;
image->load_from_context = load_from_context;
image->ref_count = 1;
/* if MONO_SECURITY_MODE_CORE_CLR is set then determine if this image is platform code */
image->core_clr_platform_code = mono_security_core_clr_determine_platform_image (image);
image->alc = alc;
return do_mono_image_load (image, status, care_about_cli, care_about_pecoff);
}
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/metadata-internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ struct _MonoImage {
guint8 idx_guid_wide : 1;
guint8 idx_blob_wide : 1;

/* Whenever this image is considered as platform code for the CoreCLR security model */
/* NOT SUPPORTED: Whenever this image is considered as platform code for the CoreCLR security model */
guint8 core_clr_platform_code : 1;

/* Whether a #JTD stream was present. Indicates that this image was a minimal delta and its heaps only include the new heap entries */
Expand Down
1 change: 0 additions & 1 deletion src/mono/mono/metadata/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <mono/metadata/threads-types.h>
#include <mono/metadata/environment.h>
#include "mono/metadata/profiler-private.h"
#include "mono/metadata/security-manager.h"
#include <mono/metadata/reflection-internals.h>
#include <mono/metadata/w32event.h>
#include <mono/metadata/w32process.h>
Expand Down
3 changes: 1 addition & 2 deletions src/mono/mono/metadata/reflection.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include "mono/metadata/assembly.h"
#include "mono/metadata/object-internals.h"
#include <mono/metadata/exception.h>
#include <mono/metadata/tokentype.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/security-manager.h>
#include <mono/metadata/reflection-cache.h>
#include <mono/metadata/sre-internals.h>
#include <stdio.h>
Expand All @@ -42,7 +42,6 @@
#include "mono-endian.h"
#include <mono/metadata/gc-internals.h>
#include <mono/metadata/mempool-internals.h>
#include <mono/metadata/security-core-clr.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/verify-internals.h>
#include <mono/metadata/mono-ptr-array.h>
Expand Down
208 changes: 0 additions & 208 deletions src/mono/mono/metadata/security-core-clr.c

This file was deleted.

Loading

0 comments on commit 2a1d100

Please sign in to comment.