Re: postflight script on Leopard
site_archiver@lists.apple.com Delivered-To: Installer-dev@lists.apple.com Thread-index: AchjXZth2cIvIs9QEdyRqwAX8gU9wA== Thread-topic: postflight script on Leopard User-agent: Microsoft-Entourage/11.3.6.070618 On 1/30/08 11:10 AM, "Geoffrey Hutchison" <geoff@geoffhutchison.net> wrote:
I have a postflight install script for my Spotlight plugin. Since stand-alone Spotlight plugins need to be installed into /Library/ Spotlight, I have set the install package to run with administrator privileges.
On the other hand, the postflight script calls /usr/bin/mdimport which refuses to run as root.
Is there an easy way to "drop" admin rights for a postflight script?
Using su with the -c flag for the /usr/bin/mdimport command could work. You'd have to programmatically determine what user you really are, so you could feed that to su. I seem to remember perl still knowing who you really were, even with elevated privs. There may be other ways to determine it as well. Jim _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
James Kelly