RE: AXMakeProcessTrusted helper process
RE: AXMakeProcessTrusted helper process
- Subject: RE: AXMakeProcessTrusted helper process
- From: John Ten Cate <email@hidden>
- Date: Wed, 19 Jan 2011 21:24:05 +0000
- Thread-topic: AXMakeProcessTrusted helper process
Bill,
Thanks for the info concerning how you did things. I have created a small helper app that will be run at the end of my installation to set the trust for my process. I've gotten a lot of knowledge from the many posts that you've made over the years and it helped me to figure it out.
-John
-----Original Message-----
From: accessibility-dev-bounces+jtencate=email@hidden [mailto:accessibility-dev-bounces+jtencate=email@hidden] On Behalf Of email@hidden
Sent: Wednesday, January 19, 2011 3:02 PM
To: email@hidden
Subject: Accessibility-dev Digest, Vol 8, Issue 6
Send Accessibility-dev mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.apple.com/mailman/listinfo/accessibility-dev
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific than "Re: Contents of Accessibility-dev digest..."
Today's Topics:
1. Re: AXMakeProcessTrusted helper process (Bill Cheeseman)
----------------------------------------------------------------------
Message: 1
Date: Tue, 18 Jan 2011 15:10:09 -0500
From: Bill Cheeseman <email@hidden>
Subject: Re: AXMakeProcessTrusted helper process
To: Accessibility-Dev Mail Mail <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=us-ascii
On Jan 18, 2011, at 2:36 PM, John Ten Cate wrote:
> I have an app that I need to set the trust level on during the install process so I can use the Accessibility API's even if they are not enabled on the machine by the user. I've seen a lot of talk on the list about using AXMakeProcessTrusted and I understand the basics of doing so. Where I am not seeing the whole picture is in creating a setuid root tool that I could call under root privileges during the install process to set the trusted level for my process.
>
> Can anyone give me any more detailed info on what is involved in doing this.
My application gives the user the option to make it trusted by clicking a button or selecting a checkbox after my application is launched. To do this, I wrote a very small executable that does nothing except call AXMakeProcessTrusted to make my application's main executable a trusted process. I placed this executable at the root level of the Contents folder in my application package, and I set this executable's privileges to run as root. When the user clicks the button or selects the checkbox after launching my application, my application calls security services routines to get the user's administrator password, then launches the small executable as root. My application then launches another small executable embedded in my application package, and my application quits. This second executable relaunches my application, which now runs as a trusted process.
If you want to make your application trusted during installation, you have to follow a similar series of steps, but do it in the installer. Either way, one objective is to make sure that the executable that calls AXMakeProcessTrusted is very small and quits immediately after performing its single task. It has to run as root, but you don't want a root application running for very long.
--
Bill Cheeseman - email@hidden
------------------------------
_______________________________________________
Accessibility-dev mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/accessibility-dev
End of Accessibility-dev Digest, Vol 8, Issue 6
***********************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden