Re: Why unmanaged?

From: Ivan Medvedev [MS] (ivanmed_at_online.microsoft.com)
Date: 05/14/03

  • Next message: Ivan Medvedev [MS]: "Re: SignedXml.CheckSignature fails"
    Date: Wed, 14 May 2003 09:20:03 -0700
    
    

    Guido -
    We are trying to have as little permission classes as possible and at the
    same time enough to cover all major scenarios. The need to protect
    Application.Exit didn't seem enough a reason to grant creating a new
    permission class just for that, so we looked at the "severity" of the Exit
    opertaion and what it does under the hood and chose the UnmanagedCode
    permission as the closest fit. ControlThread permission was designed to
    protect thread operations, and exiting an application is something totally
    different (for example, imaging a managed control on a page in the Internet
    Explorer: it can be ok for it to create/abort threads, but it would never be
    ok for it to exit the process, because managed controls are run in the IE
    process). Basically, if we were creating a new permission for every
    operation that needs to be protected we would have hundreds of those and it
    all would be very confusing.
    --Ivan
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "Guido Stinnez" <Guido.Stinnez@tria.de> wrote in message
    news:08f001c319ea$7b6823d0$a301280a@phx.gbl...
    > Thanks Ivan,
    > that worked allright.
    >
    > I also found out in the meantime that the documentation
    > was updated in 1.1 to the correct Permission.
    > Still, though I understand that I may need a priviliged
    > permission to call Application.Exit (like ControlThread
    > for instance) - I'm still not directly calling Unmanaged
    > Code. Maybe you could help me understand.
    >
    > Best regards, Guido
    >
    > >-----Original Message-----
    > >Guido -
    > >explicitly ending thread/process/application is a
    > priviledged operation, so
    > >it is normal that it is protected with a permission
    > check. Use Form.Close()
    > >to close your WinForms client.
    > >--Ivan
    > >This posting is provided "AS IS" with no warranties, and
    > confers no rights.
    > >
    > >
    > >"Guido Stinnez" <Guido.Stinnez@tria.de> wrote in message
    > >news:0bcb01c31951$8db39db0$a401280a@phx.gbl...
    > >> Hi!
    > >>
    > >> The Method Windows.Forms.Application.Exit() seems to
    > >> require SecurityPermissionFlag.UnmanagedCode, while the
    > >> documentation states that a UIPermission.AllWindows is
    > all
    > >> that is needed.
    > >> Someone seems to have forgotton to call an Assert ; )
    > >>
    > >> Does anyone know, whether this is a known issue and
    > >> whether or not it will be fixed (and when)?
    > >>
    > >> It is quite uncomfortable not to be able to close my
    > >> SmartClient and if I require the permission to call
    > >> unmanaged code, I could just as well require FullTrust.
    > >>
    > >> Thx, Guido
    > >
    > >
    > >.
    > >


  • Next message: Ivan Medvedev [MS]: "Re: SignedXml.CheckSignature fails"

    Relevant Pages

    • Re: jambands.com letter to the editor
      ... > bands to get their permission to make shows available. ... and property that is in the public domain. ... You have to have the permission of the coyright or trademark ... act to protect it.** The end result was the attorney got permission from ...
      (rec.music.gdead)
    • How long is PHP cache (server side) kept for and how to modify it?
      ... I'm using NTFS ACL in Windows 2003 to protect a file with Group ... USERA and USERB in a group called GROUP1. ... I use is_readable function to check if a logged in user has permission ...
      (alt.php)
    • Re: Whats more dangerous? Not wearing Seatbelts or Seatbelt Traffic Stops
      ... Hmmm, difficult thing here. ... First off, CONGRESS gave him permission. ... He did it to protect us from ... the muslim terrorists. ...
      (rec.autos.driving)
    • Re: Protecting Portions of Documents
      ... To make only the document numbers, dates, and permission numbers editable, you'd insert formfields for them. ... Word gives you the option of using Text formfields, into which anything can be typed, and dropdown formfields, where the user can select only from a pre-defined list. ... protect everything in these sections except for document numbers, dates, and ... > numbers and dates within the protected portions? ...
      (microsoft.public.word.docmanagement)
    • Re: Identity Permission and Code Access Permission classes
      ... The most common use of assert and deny is when mapping from one permission ... to making the assertion that allows the unmanaged code to be run. ... and you want to protect its contents from modification by ...
      (microsoft.public.dotnet.security)