C Hacks for Linux

Here are a few of the utility programs that I have built to make my Linux box a more pleasant place to live.

dcu - David's Call-Up

For some reason, SuSE have stopped shipping cu with their Linux distribution. At least it's no their in the 8.0 Personal edition. This is really frustrating. I understand about trying to be user-friendly (which standard cu definitely is not), but without cu I don't know of any good way to really figure out how to write a proper chat script for a particular modem/ISP connection.

Anyway, this is a quick hack which lets you interact with a modem/serial port.

error - Print error message

I hate having to look up the error messages for the numeric return values provided by so many unix programs in errno.h, so I wrote a program which solves the problem for me. This is not a new idea. I think I first saw it on AIX, I've just not seen it consistently on other *nix platforms.

exec-as - A giant, useful security hole

Like exec, but you give it a username (and optionally a group) and it will run your program setuid apropriately. You install it setuid root so you don't have to put up with remembering every password on the system. This makes it a very dangerous program. I use it because the Linux box is also the family computer and it allows me to mix security and usability nicely. YMMV. YHBW.

execvt - Run program on a virtual terminal

Like exec, but it runs your program on the first available (or first free) virtual terminal on your Linux box. Works under kernel 2.2.x; I make no promises about anything else.