Re: task_for_pid fails with os/kern failure even with system.privilege.taskport
Re: task_for_pid fails with os/kern failure even with system.privilege.taskport
- Subject: Re: task_for_pid fails with os/kern failure even with system.privilege.taskport
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 13 Oct 2011 19:07:38 +0200
Le 13 oct. 2011 à 18:52, Ben Staveley-Taylor a écrit : Thanks very much for creating that code snippet.
Using your code, I still get an security prompt once per login session. If I reboot and run ./test, I get: "Developer Tools Access is trying to take control of another process. Type your password to allow this." the first time. Thereafter, the tool runs successfully with no further prompt until the next reboot. (Yes, I have run the 'security add-trust ..' steps in the lldb document on my self-signed certificate). Does your test tool run without any user interaction, every time even after a fresh boot? If so I guess I must have messed up the security add-trust steps, though I have done it a couple of times now.
Yes, I forgot to mention it, but I also have the "once per session prompt". Even so, this is much better than my test app behaved, which simply failed every time (without sudo). Although I realised that I didn't need to get my own Authorization right and that taskgated would do it for me, I put that code in as a diagnostic aid and with hindsight it seems to have caused the problems. Once I completely removed any attempt to Authorize in my own code, taskgated seems to allow my app through, subject to that once-per-login-session security alert. So thanks for pointing that out.
I can't give a definitive answer, but AFAIK, it is indeed unavoidable.
|
_______________________________________________
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