tmux, a BSD alternative to GNU Screen

I started using tmux today. Its a terminal multiplexer / task switcher for UNIX-likes, very much in the same vein as GNU Screen. However, its a from-scratch implementation, designed to be clean, sane and easy to configure. The more liberal 3-clause BSD license is a plus also, since it means that [...]

Easy private DNS – authoritative and recursive – with Unbound

Lots of people have a small home network. Usually you have a combo box which acts as a router/firewall/file server. Then you have a couple of other machines hooked up, and you share the Internet using NAT. A private DNS server is helpful in this kind of scenario for two reasons:

Recursive resolver [...]

Mount remote filesystems via SSH on Windows with free software

I often use Windows as a terminal to my various UNIX systems. Sometimes its helpful to run proprietary software – and I don’t have time/inclination to mess around with half-baked emulators/ports/binary blobs/whatevers under Linux. I either run a completely open system like OpenBSD or I run Windows.

Anyway, I never use Windows to do [...]

OpenBSD 4.5 is out, solid release, but some package bugs

OpenBSD 4.5 was released the other day. I upgraded one of my servers and workstations to the new release, from 4.4-current and 4.4-release respectively. Mostly, things have gone pretty smoothly, as is usually the case with OpenBSD. The new release has plenty of incremental improvements, with the developers gradually polishing and refining [...]

Good spam filtering with OSBF-Lua and Mutt

I’ve used Mutt as my mail reader (aka MUA) for years. My personal mail goes through OpenBSD’s greylister, spamd(8) which cuts out a very large portion of spam. However, my work email account, and also any personal account subscribed to mailing lists, still get a fair bit of spam. So some additional [...]

mkpath() – `mkdir -p’ alike in C for UNIX

Most people are probably familiar with the UNIX utility, mkdir(1). The mkdir utility makes directories (surprise surprise). There is a matching mkdir(2) system call available in the POSIX standard C library. The usage is pretty straightforward – how ever, the command-line executable, mkdir(1), supports a useful option -p to “create intermediate directories [...]

OpenBSD’s omalloc: Bug and buffer overflow detection

For quite a long time now, OpenBSD has, among numerous exploit mitigation techniques, had a very strict mmap()-based malloc() implementation. Recently re-written by Otto Moerbeek, it is even harsher now. I find that this feature makes OpenBSD one of the best platforms to develop C programs on. If you have a [...]

Porting software from OpenBSD to Windows

Just committed the bits for Unworkable to build under Windows, using Cygwin. The code changes were pretty minimal – specifically, Cygwin lacks getaddrinfo() – however this was a relatively simple matter of bundling the KAME implementation (which is BSD licensed) in the source tree and building and linking with that if it wasn’t [...]

Porting software from OpenBSD to Linux II

I wrote the other day about porting software to Linux. I talked about some of the differences between the platforms in terms of the implementation of some well-known C library functions, and hinted at some other incompatibilities. Well, now I’m going to write about some of the other issues I encountered.

There are a [...]

Faster BitTorrent, or, SHA1 is slow

This weekend I have been concentrating on improving the performance of my BitTorrent implementation. I somewhat believe in the mantra “premature optimisation is the root of all evil”, or at least, I’m not too worried about making everything super fast the first time around. Asynchronous network programs are complicated enough to write that [...]