• 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
UID of parent process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UID of parent process


  • Subject: UID of parent process
  • From: James Bucanek <email@hidden>
  • Date: Fri, 17 Jun 2005 23:17:16 -0700

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:email@hidden>
 _______________________________________________
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

  • Follow-Ups:
    • Re: UID of parent process
      • From: email@hidden (Peter Seebach)
  • Prev by Date: Communicating a memory entry between two unrelated processes
  • Next by Date: Re: UID of parent process
  • Previous by thread: Communicating a memory entry between two unrelated processes
  • Next by thread: Re: UID of parent process
  • Index(es):
    • Date
    • Thread