site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=ZYlSEA4gwISM3jFJktFgT/Up2AVIbwSUvNj82yEHqe8sg6drjNKGRlwjyNrZvoXiDgaDYJqdKQYzRjelV03rFSFFwajQjdYEOm7+Qdp0HnePrqETL9ybV3wNU4SpKLztbsCSrUAs2mn0eSKzDyJVzas9HyuN8PEgN8VDNDhZpjc= On May 17, 2006, at 1:41 PM, Michael Smith wrote: On May 17, 2006, at 10:26 AM, Russ Seehafer wrote: Let me elaborate on what I am actually trying to accomplish: Here is the question: = Mike I suppose my first statement below was incorrect: Thanks again for all of your input. -Russ _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... My application starts exactly once for each mac user account on a given computer. This user space application communicates with the nke via a control socket. In the case of fast user switching the nke needs to associate network traffic initiated by applications running in a specific user's account with the instance of my application running under that user's account. How do I determine with confidence (from within the nke) the uid of the user that owns the process that initiated the network traffic? You need to get this from the socket. Sadly, this isn't something you can do with the KPI as far as I know - you'll want to ask one of the networking folks that posts/reads here on a regular basis (I copied Vincent) about how they recommend you get a copy of the credential that ought to be associated with the socket at creation time. This is what you should use to obtain the user ID. Note, however, that user ID is not the same thing as login session ID. It is perfectly legal to have more than one session owned by the same user; perhaps you need to rethink your architecture? What are you really trying to achieve? The credential contains other information that can be used to uniquely identify the session; it may be this that you need. My application starts exactly once for each mac user account on a given computer. It starts exactly once per login session. I could easily use the session ID instead - as long as this is available. My question is simply how to obtain this from within the nke. This email sent to site_archiver@lists.apple.com