Wednesday, September 23, 2009

The Benefits of Checking One's Credit Card Bills...

extend to finding out that McAfee keeps billing for anti-virus software that has been uninstalled from a non-working computer, even a year later.

It's amazing how willing companies are to take advantage of standard human cognitive deficits.

Monday, September 21, 2009

Sun breaks gethostbyname(), nscd.

Thanks, Sun!

gethostbyname(3) is supposed to return the canonical hostname in the h_name field of the struct hostent that it returns a pointer to. It is supposed to return any aliases (e.g. CNAMEs in DNS) in the h_aliases field.

Sun recently released a version of /lib/nss_dns.so.1, which is used by nscd (which, if it is running, all calls to gethostbyname(3) go through). This is part of patch 140391-02 (for SPARC) or 140392-02 (for x86). The -03 version of these patches also has the problem. This patch is part of the most recent Recommended Patch cluster, and it is included in the Solaris 10 u7 release.

This patch messes up the return from gethostbyname(3), so that when you look up a CNAME, the CNAME goes into the h_name field and the actual canonical name goes into the h_aliases field.

This breaks anything that uses gethostbyname(3) and actually expects the h_name field to contain the canonicalized hostname. (At work, we found the bug because certain software wouldn't start right -- because the start script compares the local hostname to the result of a lookup of a CNAME, and that no longer worked right.)

Note that this bug persists even if you have hosts caching turned off in nscd.conf.

The simple workaround is to turn off nscd (by using svcadm disable name-service-cache). This can cause some serious slowdowns if you have a lot of name lookups (e.g. directories that contain lots of different users and groups). I measured a slowdown of a factor of 7.7 doing 'ls -l' on a directory containing 150 files each owned by a different user and group. (It was a local directory, and I redirected the output to /dev/null, so I believe I limited confounding factors.) If you don't want to turn off nscd, your only other choice (until a real patch is released) is to ask Sun for their IDR ("Interim Diagnostics and Relief") pseudo-patch for this, which is IDR142516-01 for SPARC, IDR142517-01 for x86. This will require a Sun service contract.

Feh.

Saturday, September 19, 2009

Best Shop Sign Ever

Seen in a shop window in Niagara Falls, NY:

Friday, September 18, 2009

Zzzt! Oww! Zzzt! Oww! Zzzt! Oww!

I was leaning my arm on a Juniper firewall (which I use for work), and touching my iPod in its Bose dock, and got what felt like a heat burn (the Juniper is not cool to the touch), but turned out to be an electric shock!

Who's more likely to blame? Apple, Bose, or Juniper?

Time to dig out my multimeter.

 

UPDATE: I got my multimeter out and there is about 80 Vac between ground and the housing of the iPod when it's sitting in the dock. The other iPod in the house shows the same thing. I then plugged one of the iPods into the DC adapter (DC adapter into wall socket, USB-to-base cord connecting it to the iPod) and *that* gives 37 Vac between wall ground and the iPod housing.

WTF? Is this why iPods occasionally explode?

Or have I just managed to totally forget how to use a multimeter??

Wednesday, September 16, 2009

Lois McMaster Bujold vs. E.R. Eddison

Lois McMaster Bujold crystallizes why I couldn't get through The Worm Ouroboros:

I am also slogging through The Worm Ouroboros, (~1922), by E.R. Eddison. Early 20th C. British adult fantasy, post William Morris, also a little after the charming Lord Dunsany, I think (both of whom are much better writers, so far.) The book reads like Medieval/Reniassance Romance (the other sort of Romance) fanfiction, actually. Some wince-worthy naming choices that one must sort of muscle past lead to a tale about a cast of characters in the old high heroic mold, i.e., with the emotional maturity and egocentric focus of an overdressed drunken high school football squad, except they are running countries. Redshirt follower death-rate very high, female characters few and decorative rather than functional. Historically interesting as a reaction to the relentlessly mundane turn contemporary mainstream fiction was taking about then, I suppose. I'm having trouble deciding who I dislike more, the heroes or the villains. Eddison does get off some pretty elegant prose passages now and then, granted. Shall perservere, hoping for a payoff.