FROM : Phil
DATE : Fri Dec 31 08:29:23 2004
On Thu, 30 Dec 2004 21:32:46 -0500, Gwynne <<email_removed>> wrote:
> On Dec 30, 2004, at 9:13 PM, Gregory Clarke wrote:
> >> The problem I'm running into is when I try to use the above within my
> >> PackageMaker's postinstall script. What occurs is the entire
> >> com.apple.dock.plist file gets reset to the factory default.
> > I have seen this before when exploring a script to add to the Dock. I
> > don't remember the details, but I recall that there was a big
> > difference if the script was executed as the user compared to root. I
> > think if the same command is done using sudo then the users dock plist
> > gets replaced with the factory default. My gut tells me that the clue
> > to your problem is in this somewhere.
> The only way around this
> is to ensure that your euid is NEVER root when CFPrefs is called into
> (by 'defaults' or directly). I don't know offhand how one would do this
> in a shell script.
What if you set "No Authorisation Required" in PackageMaker? Then it
doesn't have your password to authorise sudo permissions... or with
the Installer simply over-ride that and ask for them anyway?
-Phil
DATE : Fri Dec 31 08:29:23 2004
On Thu, 30 Dec 2004 21:32:46 -0500, Gwynne <<email_removed>> wrote:
> On Dec 30, 2004, at 9:13 PM, Gregory Clarke wrote:
> >> The problem I'm running into is when I try to use the above within my
> >> PackageMaker's postinstall script. What occurs is the entire
> >> com.apple.dock.plist file gets reset to the factory default.
> > I have seen this before when exploring a script to add to the Dock. I
> > don't remember the details, but I recall that there was a big
> > difference if the script was executed as the user compared to root. I
> > think if the same command is done using sudo then the users dock plist
> > gets replaced with the factory default. My gut tells me that the clue
> > to your problem is in this somewhere.
> The only way around this
> is to ensure that your euid is NEVER root when CFPrefs is called into
> (by 'defaults' or directly). I don't know offhand how one would do this
> in a shell script.
What if you set "No Authorisation Required" in PackageMaker? Then it
doesn't have your password to authorise sudo permissions... or with
the Installer simply over-ride that and ask for them anyway?
-Phil






Cocoa mail archive

