in reply to Clues on writing a secure daemon

Well, thanks to everyone who commented. I thought I'd fill you all in on my progress since I posted the question: