site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com In message <r02010500-1041-9EAB14D0DFC011D9BEB4000A959D1544@[10.0.1.12]>, James Bucanek writes:
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.
You should look into the docs for seteuid(), getuid(), and so on. If you are running setuid, you start out in a state where you can check what UID you were called with. You do not need to look at the parent process to do this! -s _______________________________________________ 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)
-
seebs@plethora.net