Re: Authorization in an Installer plugin
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=TWnUA8a5djpW+MHhmy6g4BowuOfWkdHgX0csGXvhBHs=; b=KDGK5yhbBBrLQKQ4I2vosGJoUQ/a/ibq7wEeJ3b4Y4AGviA6pbtWwA4dLsbge9rxOX +T7d84x9sRWjxoWr6gH7iJZ9IpMT8ZR6SDSF1REdjymXytNxdZTTC1TJ9fpDugH95Gp1 YeBiVjz447Ixb8yVly0QNZWn+vo5ctwdLM/9U= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=cAYzvqi8qVfKAuMLhnDu6BrdBGOorga0UXQrmW2s0mf+8h8tM55XIxCpgjb6Cd74jK C42pC6HWZVDk+Ets6k4EyV+Cwxj/n4sUnHJwxZGwa6m9RIZ9MUNTPPL9+yS3VkNerT+l Fyswz5t0Dq8lvQWqyjGRKoVrnfGWwmiHNhG2c= User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812) Hi Greg, - Erik -Greg On Sep 4, 2009, at 7:17 AM, Erik Larsson wrote: Hi, Currently, I create a new Authorization reference and have the user authenticate, which means the user will have to type its password in a new authentication dialog, before calling a helper tool with AuthorizationExecuteWithPrivileges to carry out the actual operation. I would really like to avoid having the user type its credentials in two dialogs in a row (first for copying files, second for writing to the preference file). Any hints would be welcome... Regards, - Erik _______________________________________________ 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... That's a possible solution, yes. Thanks for the suggestion... I didn't think about that. However, I have been so naughty as to peek into the object code of those installer plugins that magically seem to get authorized and found references to AuthorizationCreateFromExternalForm, and I thought that maybe there's something poorly documented about the Install procedure that they are making use of. Like a lingering AuthorizationRef from the first time the user authorized that you could somehow get hold of... Greg Neagle wrote: Since postflight/upgrade/install scripts run with privileges (assuming the package requires RootAuthorization), couldn't you just have your plugin write the data some place world-writable (like /tmp) and then have the postflight script read that and write to the system-wide prefs file? I'm writing an Installer plugin which needs to perform a privileged operation (writing to a system-wide preference file), and I'm wondering how I can reuse the authorization already made when installing the files. I have witnessed many installer plugins that execute after the file copy stage that make changes to otherwise protected files without requiring the user to re-authenticate, but I cannot understand how they do it. P.S. I sent the previous email from the wrong address. Blame Thunderbird. _______________________________________________ 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/greg.neagle%40disneyani... This email sent to greg.neagle@disneyanimation.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Erik Larsson