-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Milestone
Description
If I create a new PermissionSet and create a new AppDomain with it, then it the permissions don't carry over.
I've also filed a related issue over in #12900, which may be worth checking out too.
Steps to Reproduce
- Download this test case project: PermissionSets.tar.gz
- Compile it with
msbuild. - Run the program with
mono --security TestProject.exe
Current Behavior
The following output can be observed:
*** Expected permissions ***
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="Execution"/>
</PermissionSet>
*** Permissions of sandbox ***
<PermissionSet class="System.Security.PermissionSet"
version="1"
Unrestricted="true"/>
Although the program creates a PermissionSet that only allows the Execute SecurityPermissionFlag, the AppDomain is actually created with unrestricted permissions - ignoring the PermissionSet completely!
Expected Behavior
On Windows, the PermissionSet the program creates and the PermissionSet the AppDomain actually has are identical. This is what Mono should do too.
On which platforms did you notice this
[ ] macOS
[x] Linux
[ ] Windows
Version Used:
Mono JIT compiler version 5.18.0.240 (tarball Wed Jan 16 09:10:16 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(600)
Suspend: preemptive
GC: sgen (concurrent by default)
Stacktrace
Not applicable, but if there's anything else I can provide to aid in the tracking down of the issue, I'd be happy to help.
Darkar25