Re: geteuid() while debugging
Re: geteuid() while debugging
- Subject: Re: geteuid() while debugging
- From: Brian Bergstrand <email@hidden>
- Date: Sat, 25 Jun 2005 13:07:37 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jun 25, 2005, at 8:45 AM, Chase wrote:
>
> -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
I don't believe gdb respects setuid (if I'm wrong, someone will pipe
in), so you'll have to launch gdb as root from the command line and
eschew XCode debugging.
$ sudo gdb <PATH TO YOUR APP>
Brian Bergstrand
<http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.1 (Build 2185)
iQA/AwUBQr2dannR2Fu2x7aiEQKKzgCgiS4hYi/w4XcImLg/1nfE481w5cYAoO/7
2B2Qp1ZYHPwfdcO7fzdQC3Ri
=Fjeq
-----END PGP SIGNATURE-----
_______________________________________________
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