Archive for January, 2010

False Economies in Energy Saving

January 31, 2010

I’ve noticed a trend in my flat where every time I leave my laptop charger on and I leave the room the charger is mysteriously unplugged from the socket. This made me curious as to how much this little act is actually saving us. From searching around my best estimate for the ’standby’ power use for  my charger is 1/2 a watt. I also estimate we are being charged around £0.07/kWh for electricity. So if the laptop charger was being wasted 24 hours a day, 365 days a year this would end up costing: 0.5 * 24 * 0.07 * 365 / 1000 = £0.30.

Not much, but I guess it all adds up. However, how much work is being done for this £0.30. Assuming it takes 5 seconds to unplug the charger this adds up to 1/2 an hours work over the whole year. I doubt many people would work for £0.60/hour. This also ignores the time I spend plugging the charger back in :)

Sorry for the rant post but my housemates are on an irrational drive to reduce electricity and gas usage. The gas usage is the bit that is pissing me most off :(

Neutered Root

January 19, 2010

Had a problem today where a root process was unable to read files owned by other users.  I looked through the strace and there were no calls to setXXuid which might be giving the process other permissions.

[pid 12930] geteuid()                   = 0
[pid 12930] open(“/opt/tomcat/conf/logging.properties”, O_RDONLY) = -1 EACCES (Permission denied)

Then I noticed this call:

[pid 12930] capset(0×19980330, 0, {CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE, CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE}) = 0

It appears this removes useful permissions like CAP_DAC_OVERRIDE that allows the process to read files not owned by it :(

(blah blah blah.. tomcat shouldn’t be running as root)

Martha Stewart’s Blog Show

January 15, 2010

Martha has made a show dedicated to her internet stalkers. The two guys I saw on the show were almost identical. Both were middle aged, thin, balding and had lispy voices. Very weird.