• 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
geteuid() while debugging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

geteuid() while debugging


  • Subject: geteuid() while debugging
  • From: Chase <email@hidden>
  • Date: Sat, 25 Jun 2005 08:45:31 -0500

i have an if statement that looks like:

if (geteuid()==0) {
    // routing table adjustments that only root can make
}

after each compile, i use chown/chmod to set the binary's privs like so:

-rwsr-xr-x    root     wheel


when i run the code normally, everything works just fine, whether launching as root or as a vanilla user.


but, when i'm trying to step through the code with the xcode/gdb debugger, geteuid() is returning the uid of my vanilla user (the one i'm running xcode as).

what can i do to fix this so that i can properly debug without having to log in as root to run xcode?

thanks.

- chase



_______________________________________________
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: geteuid() while debugging
      • From: Adam Nohejl <email@hidden>
    • Re: geteuid() while debugging
      • From: Brian Bergstrand <email@hidden>
  • Prev by Date: Re: .hidden gone in Tiger?
  • Next by Date: Re: geteuid() while debugging
  • Previous by thread: Re: .hidden gone in Tiger?
  • Next by thread: Re: geteuid() while debugging
  • Index(es):
    • Date
    • Thread