in reply to How to use setuid with modules?

Avoid setuid if at all possible since it is easy to screw up and give root permissions away. You generally don't need this for logging secretly anyway. I suggest you create your log file with 0600 permissions so only you (and root) can read it. Another way -- use syslog instead and setup your syslogd to send your entries to your own special file that only root can get to.

bluto Update: Fixed Permissions

Replies are listed 'Best First'.
Re: Re: How to use setuid with modules?
by shanonvl (Initiate) on Nov 06, 2001 at 01:54 UTC
    Thanks for the advice, however I don't think that will work. Syslogd doesn't give me the control that I desire on the message style and your first suggestion 0600 wouldn't work because I have a ton of users that will be running a bunch of scripts and all of them need to have logging functionality. So my original question still stands, do you know how to use setuid with modules? Thanks!