Re: Access to /usr/local from installer plug-in
Re: Access to /usr/local from installer plug-in
- Subject: Re: Access to /usr/local from installer plug-in
- From: Steve Stockman <email@hidden>
- Date: Thu, 10 Dec 2009 09:37:06 -0600
- Thread-topic: Access to /usr/local from installer plug-in
That actually depends on whether your plug-in runs before or after the
actual installation.
If the plug-in can follow the installation, then a postflight script in the
installer can launch a daemon that listens to a socket or Mach port.
(launchd and launchctl make this particularly easy.) Your plug-in then
connects to the daemon and requests that it perform the task requiring
elevated rights.
If the plug-in must run before the install, then the only way to elevate
rights is to have another authentication separate from that presented by the
installer itself. Something that users may find annoying or even alarming.
But as the Iceberg-Dev writer pointed out, there is the caveat that plug-ins
do not run in command line or ARD installs, so you must plan accordingly if
either of those is possible.
Steve Stockman
Software Architect
Consumer Products - Macintosh
Symantec Corporation
www.symantec.com
> From: Stanislav Kolar <email@hidden>
> Date: Thu, 10 Dec 2009 10:46:47 +0100
> To: "<undisclosed-recipients: ;>"
> Cc: <email@hidden>
> Subject: RE: Access to /usr/local from installer plug-in
>
> Thank you for the responses.
> So do you think that there is no way to elevate rights to "root" somewhere in
> my Installer plug-in ? (In the "shouldExitPane" method, for example)
>
> Stanislav Kolar
> Research & Development
> .................................................................
> Kerio Technologies
> Anglicke nabrezi 1, 301 49 Plzen
> Czech Republic
> tel. 377 338 901, fax 377 338 921
> www.kerio.com
> .................................................................
> Connect. Communicate. Collaborate. Securely.
>
>
> -----Original Message-----
> From: Iceberg-Dev [mailto:email@hidden]
> Sent: Wednesday, December 09, 2009 9:51 PM
> To: Stanislav Kolar
> Cc: email@hidden
> Subject: Re: Access to /usr/local from installer plug-in
>
>
> On Dec 9, 2009, at 8:38 PM, Stanislav Kolar wrote:
>
>> Hello,
>>
>>
>>
>> I have to write an installer plug-in that asks for some initial
>> information during the installation process and saves them as a xml
>> file into /usr/local/my_dir directory.
>>
>> The problem is that in the method "shouldExitPane" I don't have an
>> appropriate rights to modify anything in the directory /usr/local...
>>
>> Is there a solution of my problem ?
>>
>
> A solution is to save the file in a location where you can write
> (such as /tmp or /Users/Shared) and then move the files to the final
> destination through a postflight (or postinstall) script depending on
> the package format you're using) because the script will probably be
> run as root in your situation (if you're requiring admin
> authorization it will (in Leopard and Snow Leopard)).
>
> The pitfall here is that an installer plugin may not be run if the
> package, metapackage or distribution is installed through installer
> or ARD. So you need to take this into account too.
>
> My $0.02
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Installer-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> .com
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden