• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getting the application path in VnodeScopeListener
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the application path in VnodeScopeListener


  • Subject: Re: getting the application path in VnodeScopeListener
  • From: Terry Lambert <email@hidden>
  • Date: Wed, 12 Oct 2005 19:33:55 -0700

vfs_context_pid(), which is exported in BSDKernel.exports, will tell you the pid.

proc_name(), which is exported in BSDKernel.exports, will convert the pid into a name and copy it into a buffer you supply and give a length for.

This won't necessarily be the application path if the application was launched via finder; it might also be a volfs path, so it should not be relied on as a credential for authorization or authentication purposes or for the granting of some other type of trust, if you are trying to establish a security association.

Note that you should not use file I/O in the kernel, either, so if you are intending to use this information to get a bundle ID from which to optain some other file path and read it in the kernel - don't do that.

-- Terry

On Oct 12, 2005, at 3:39 PM, Ben wrote:
I am doing some work in the kauth KPI and I need to get the application path (of the application performing the action causing this function to get called) from within VnodeScopeListener.

I think this will be available because VnodeScopeListener gets passed in a vfs_context_t for the application in question, however most of the accessor functions for this opaque object are undocumented, so my hope is someone can point me to which one to use to obtain a vnode from the vfs_context_t, which I can then get a path from, or some other way of getting the path.

I am okay if the path cannot be obtained all of the time, just some of the time (I'm aware of the issues of trying to use paths, so I'm not relying on them, but when they are there they do make things easier)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: getting the application path in VnodeScopeListener
      • From: Ben <email@hidden>
    • Re: getting the application path in VnodeScopeListener
      • From: Mike Smith <email@hidden>
References: 
 >getting the application path in VnodeScopeListener (From: Ben <email@hidden>)

  • Prev by Date: Re: What's the darwinbuild argument to build a debug kernel?
  • Next by Date: Re: getting the application path in VnodeScopeListener
  • Previous by thread: getting the application path in VnodeScopeListener
  • Next by thread: Re: getting the application path in VnodeScopeListener
  • Index(es):
    • Date
    • Thread