site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Greetings, I would like to know if there is a straightforward way of obtaining the UID (or EUID) of the parent process. getppid() gives me the PID of the parent process getuid()/geteuid() gives me the UID of the current process I want to know the UID of PPID. Why: The tool I'm writing is a SetUID executable that will run as root when launched. I'd like for it to (normally) run under the UID of whatever process launched it, until such time that it actually needs to run as root. -- James Bucanek <mailto:privatereply@gloaming.com> _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
James Bucanek