Can an Assembly INCREASE the permissions granted to it at run-time.

From: Novice (6tc1_at_qlink.queensu.ca)
Date: 03/23/04

  • Next message: Joe Kaplan \(MVP - ADSI\): "Re: Can an Assembly INCREASE the permissions granted to it at run-time."
    Date: 23 Mar 2004 13:51:44 -0800
    
    

    I have been reading about .NET security off and on for about a month
    now and I'm a bit confused by this excerpt from one document I was
    reading.

    The document concerns the grant set that is given to an assembly when
    it is loaded by the CLR. The statement is:
    The code itself can use a permission request to influence the
    permissions that are granted.

    I can understand how the code could DECREASE the permission set that
    is granted to it (through the use of imperative or declarative
    security checks), but I have no idea how code could request increased
    permissions.

    For example, I have a test application that writes a blank file to a
    directory (c:\temp) on my machine. If I give that assembly full trust
    it will
    write the file to my directory even if it is being accessed over the
    internet. However, if I don't "trust" the assembly, it will not be
    able to write the file to that directory. And I don't know of anyway
    that I could code the assembly such that it could request additional
    permissions at run-time. If this were possible I would imagine it
    would take the form of the user being presented with a dialog box that
    says something like:

    Currently this application does not have permission to write to
    "c:\temp" - do you wish to give this applicatin that permission?

    Is there a way to do this?

    Thanks,
    Novice


  • Next message: Joe Kaplan \(MVP - ADSI\): "Re: Can an Assembly INCREASE the permissions granted to it at run-time."

    Relevant Pages

    • Re: Request for the permission of type System.Data.SqlClien
      ... you have to configure a configfile, in other enviroments you have to set ... ..NET security for that. ... > Request for the permission of type System.Data.SqlClienAdditional ...
      (microsoft.public.sqlserver.connect)
    • Re: A Technical Question
      ... But you reading by spilled light does not make that light dimmer for the ... giving permission to use. ... person would believe that an open wifi connection was open for a reason. ...
      (uk.legal)
    • User IIS W2000 server
      ... How can I protect a web area, after creating a group of users which only the ... administrator and them have access to the web, but at the same time these ... users donīt have permission for nothing else but reading? ...
      (microsoft.public.inetserver.iis.security)
    • Re: User IIS W2000 server
      ... > How can I protect a web area, after creating a group of users which only ... > users donīt have permission for nothing else but reading? ... > access with the basic authenticity on, ...
      (microsoft.public.inetserver.iis.security)
    • Re: [OT] Silly (copyright?) claim by "Galen".
      ... > least ignore the signature at that point.) ... > not owned by Microsoft then this work is being used without MY permission. ... "Please note that if you're reading this with a web-browser and the ...
      (comp.security.misc)