Fixes included in Power Manager 3.6.2

We recently launched Power Manager 3.6.2. This bug fix update improves the uninstaller/removal script. This build also includes a couple of tweaks to better support the pre-release Mac OS X 10.5 seeds.

We recommend all users download and install this new version. It safe to install on top of any existing Power Manager v3 installation.

A display of fresh fruit and vegetables, Lyon, France

What bugs?

We learnt about two separate bugs in our Power Manager removal script. Both bugs have been fixed.

The first bug is mentioned in a recent blog entry. This bug caused a couple of user’s Macs to fall back to a Darwin login window. This is a horrific situation for a Mac user and demanded our immediate attention.

The bug appears to be limited to Mac OS X 10.3.9 and I suspect is caused when a series of authentication requests are cancelled or interrupted by the user.

When removing Power Manager we ask the operating system to remove all our associated permissions.

On Mac OS X 10.3 each request asks the user to enter their password. Not fun, not rewarding, and nor is it acceptable thirty times. Apple recognised this prompting behaviour as a burden and reduced it in Mac OS X 10.4.

I presume the original choice to query every change was deliberate and the Apple security engineers decided that the removal of a permission was infrequent. Thus a certain level of mundane password entering was acceptable on those few occasions.

The problem we created was built upon our assumption that our Mac OS X 10.3 users would complete this dull repetitive task.

The second removal script bug caused Automator to crash. The crash appeared if you installed Power Manager but later removed it.

This bug was an oversight in our removal script. By forgetting to remove an Automator action we set up a requirement that could not be fulfilled. Automator launched, loaded the forgotten action, and that action in turned looked for the removed Power Manager. The end result was Automator crashing.

What changed?

Power Manager v3.6.2’s removal script includes a new check to ensure the Login Window is not left requiring a potentially removed file.

The solution is not pretty but it works. We search for and manually remove the reference to our file from a configuration file.

# Ensure authorization contains no mention of pmauth
sudo sed -E -e '/^[[:space:]]+pmauth:test<\/string>$/d' /etc/authorization > /tmp/authorization
sudo install -b -B .pm -m 0644 -o root -g wheel -S /tmp/authorization /etc/authorization

Including blunt code like this is a tough decision. The code is fragile — in a good way. It will not affect the configuration file unless an exact match is found.

Power Manager v3.6.2’s removal script includes a new check to remove the burden of multiple password requests for Mac OS X 10.3.9 users.

# Remove security policy rights; on Mac OS X 10.3.9 this takes n password requests...
OSVERSION=`sw_vers -productVersion`
if [ "$OSVERSION" != "10.3.9" ]; then
	sudo /usr/local/powermanager/bin/powermanagerd -u
fi

Finally, Power Manager v3.6.2’s removal script includes code to remove the previously missed Quick Schedule Automator action.

Mac OS X 10.5 - Leopard

Power Manager v3.6.2 includes tweaks to better support the latest Mac OS X 10.5 (Leopard) seed.

Power Manager v3.6.2 works with Mac OS X 10.5 but a minor update will be needed to fix a couple of outstanding bugs. The known bugs are not critical and we expect to ship an update shortly after Mac OS X 10.5 is released.

Thank you

Thank you for using Power Manager and for letting us know where and when we make mistakes. Your continued support and feedback is always appreciated.