Author Archives: admin

Perverse geekery

Have you ever run NetBSD/x86 on qemu in Linux on your PS3? Don’t bother, it’s not that cool.

“Wikipedian Protester”

I’d love to see this toon spark a political movement:

Wikipedian Protester

Neat optical technology

This sounds really cool if they can commercialize it in the various application domains mentioned. One of the most interesting aspects is that they say that it’s “fully tunable in the visible range of the electromagnetic spectrum”, which could simultaneously simplify display technology while making color reproduction richer.

Nanotechnology News: A simple magnet can control the color of a liquid

java:comp exception in Tomcat 6

I don’t know if this will do anyone any good (please leave a comment if it helps you!), but I want to get myself into the habit of blogging these sort of things for the potential good of other web searchers out there.

We were having the following problem: when starting an web app in Tomcat 6 that uses JNDI to locate a database connection, we got the exception:
javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
Lots of people point out that this could be a problem with there being a JNDI implementation in the web app’s lib/, so that the app doesn’t get the global one defined by Tomcat, and they recommend removing all naming* JARs from lib/. But, in our case, it was catalina.jar that was causing the problem; it also includes a JNDI implementation.

Bobbing and weaving, technologically speaking

Just read a pretty good overview of some of the nits of de-interlacing: The basics of de-interlacing from good to great. This is a sort of fascinating topic to me.

I guess the first thing I think of, when I think of interlacing on either an aesthetic or technical level, is ugh. Aesthetically, I’d be quite happy to never see another interlaced video or monitor again. Technically, I’m thinking that the resources, both of engineers and of computers, that have been used to de-interlace could really have gone to something much cooler.

And it’s so persistent, too. Interlaced videos are still being produced, I’m sure interlaced monitors are, and at the same time, de-interlacers are still being developed, and all that will continue for years from today.

But this is all just one of those things that happen so often in technology, where something that was a great idea at the time becomes a self-reproducing monster. I wonder if the people who started us down the road to the interlaced world we’re in today (and I don’t mean to deride them; I can only snipe at them with the advantage of hindsight and from the vantage point of _today’s_ technology) are all like “I am become tearing” or if they’re all “I wish people would love everybody else the way they love me”?

In any case, at least we can say that interlacing stimulates the economy.

Little decisions

One thing that’s nice about writing software for a living is that it helps remind you often that little decisions are important ones.

If thine axiom offend thee,

pluck it out.

Legacy weirdness

It makes me chuckle when I notice some of the weird information my computer gives me as a holdover from the old days. Some people probably don’t remember the days of ‘lower memory’ and ‘upper memory’. Here’s a little reminder about it, in case you need it.

There was a time when a BIOS boot-up report of available lower and upper memory was useful, back when the numbers were like “640k lower, 384k upper” and it was likely someone was running MS-DOS with a memory manager. But my laptop’s BIOS still reports it, in the days of Linux and Windows, when the numbers are “640k lower, 2096512k upper”.

SVN v. OSSEC

Learned of an interesting interaction between Subversion (SVN) and OSSEC, an intrusion detection system that happens to be installed on a server I work with. If you’re seeing a problem where Subversion hangs when you’re trying to do a checkin, and you happen to be renaming a number of files, this might be your problem. I don’t offer a complete solution here, but maybe some help.

When you rename a file in Subversion (I’ve seen this with TortoiseSVN, Subclipse, and the official command line client, and would expect it in any client), the client does a check to make sure the new name isn’t in use. It does a PROPFIND on the file and expects a 404, giving an Apache log entry like this:

xx.xx.xxx.xx - username [07/Apr/2007:06:11:10 -0400] "PROPFIND /svn/trunk/blah/blah/newfilename.java HTTP/1.1" 404 297 "-" "SVN/1.4.2 (r22196) neon/0.25.5"

OSSEC has a rule (31151, in web_rules.xml) that alerts at level 10 whenever there are more than 10 404s (well, 4xxs) from the same IP in the same 120-second interval. That causes an active response from OSSEC to ban the IP for 10 minutes.

So, if you rename 10 or more files in a SVN checkin, OSSEC will ban you for a while. The 31151 rule makes sense in a basic way, in that some exploits will try to find vulnerable URLs for insecure scripts, etc., but it’s clearly too heavy-handed when SVN is running.

I don’t perceive that sort of URL scan to be a big threat on a well-maintained server, so one solution is just to drop the rule’s level below the active response threshold. However, it would be somewhat more sophisticated to do something like “don’t trigger if the username field in the log entry exists and the error is not 401 (unauthorized) and the method is PROPFIND and the URL is within the domain of the SVN install”. That refinement only works when mod_svn is configured to use Apache authentication (so that the username field would be in the log) and requires that you know the URL that SVN was installed under, so it can’t be done that way in the generic ossec install.

You could also make refinements based on IP address or something, but in my case, the server is used by different remote people on different dynamically-assigned IPs on different networks.

I don’t really know how to express any of that in terms of OSSEC rules anyway, given that I’d never heard of ossec before an hour ago :-). So I can’t say how OSSEC might mitigate this problem in general, but on an individual install, you can just drop the rule’s level or comment it out, if you’re feeling lucky.

Tricky translation

Hmmm, language translation is tricker than I understood. Here’s a translation from an article I just saw:
“Simple DS Series Vol.14 The Jidousha Kyoushuujo DS [translates to] Simple DS Series Vol.13: The Vehicle Learning DS.”

I never knew a Japanese 14 was an English 13.