• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UID of parent process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >UID of parent process (From: James Bucanek <email@hidden>)

  • Prev by Date: UID of parent process
  • Next by Date: not understanding how to make use of ppp_msg.h, PPPLib.c and PPPLib.h
  • Previous by thread: UID of parent process
  • Next by thread: not understanding how to make use of ppp_msg.h, PPPLib.c and PPPLib.h
  • Index(es):
    • Date
    • Thread