! if (geteuid()) { this of course should be `if (geteuid() == 0) {', as pointed out by ghudson. .mrg.