2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Thu, 16 Jun 2005 11:57:10 +0000 (11:57 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Thu, 16 Jun 2005 11:57:10 +0000 (11:57 -0000)
* declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
not on callee assembly). Fixed some comments.

svn path=/trunk/mono/; revision=46083

mono/mini/ChangeLog
mono/mini/declsec.c

index f0aeefb46874d34d8f7875096200b66b1094d28f..3bff525995d10a709f2e7bf51850aa95167fac42 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
+       not on callee assembly). Fixed some comments.
+
 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
 
        * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
index 474297092b8d6c2b232e25c430a206092f6c6507..2ce31fb2fa3c2b656fade7089f2268e3e7a79b0b 100644 (file)
@@ -175,7 +175,7 @@ mono_declsec_is_assembly_fulltrust (MonoDomain *domain, MonoAssembly *assembly)
  * @domain     The current application domain
  * @caller     The method calling
  * @callee     The called method
- * return value: TRUE if a security violation is detection, FALSE otherwise.
+ * return value: TRUE if a security violation is detected, FALSE otherwise.
  *
  * If callee's assembly is strongnamed and doesn't have an 
  * [AllowPartiallyTrustedCallers] attribute then we must enforce a LinkDemand
@@ -221,6 +221,7 @@ mono_declsec_linkdemand_aptc (MonoDomain *domain, MonoMethod *caller, MonoMethod
                return FALSE;
 
        /* E - the caller's assembly must have full trust permissions */
+       assembly = mono_image_get_assembly (caller->klass->image);
        if (mono_declsec_is_assembly_fulltrust (domain, assembly))
                return FALSE;
 
@@ -236,7 +237,7 @@ mono_declsec_linkdemand_aptc (MonoDomain *domain, MonoMethod *caller, MonoMethod
  * @domain     The current application domain
  * @caller     The method calling
  * @native     The native method called
- * return value: TRUE if a security violation is detection, FALSE otherwise.
+ * return value: TRUE if a security violation is detected, FALSE otherwise.
  *
  * Executing Platform Invokes (P/Invoke) is a is a restricted operation.
  * The security policy must allow (SecurityPermissionFlag.UnmanagedCode)
@@ -302,7 +303,7 @@ mono_declsec_linkdemand_pinvoke (MonoDomain *domain, MonoMethod *caller, MonoMet
  * @domain     The current application domain
  * @caller     The method calling
  * @icall      The internal call method
- * return value: TRUE if a security violation is detection, FALSE otherwise.
+ * return value: TRUE if a security violation is detected, FALSE otherwise.
  *
  * We can't trust the icall flags/iflags as it comes from the assembly
  * that we may want to restrict and we do not have the public/restricted