Re: Getting PID of a unix domain socket client
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com -- Terry _______________________________________________ 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... On Nov 27, 2007, at 9:38 PM, Murali J <jmuralinux@gmail.com> wrote: Hi all, I am writing a simple client server program using Unix domain sockets. Client sends some 10 bytes to the server and the server responses with another 10 bytes. Is there any way I can get the PID of the client which sends the request to the server?!? In linux, I am able to do this by using getsockopt(). But in MAC OS X, I am able to get only GID and UID of the client. I am running Darwin Kernal 8.6.0. Were you intending to use the PID as a simple client identifier, or were you intending to make security inferences based on it? If as an identifier, you could just send the information in-band as the first thing in the data stream. If you were intending to make security decisions, that's probaly not useful, since you can't trust the other end to be who they say they are, based on the PID: it's not a security identifier. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert