Re: UID of parent process
Re: UID of parent process
- Subject: Re: UID of parent process
- From: email@hidden (Peter Seebach)
- Date: Sat, 18 Jun 2005 01:46:15 -0500
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden