Re: /dev/stderr gets unlinked 8]

From: Jan Engelhardt
Date: Fri Mar 17 2006 - 09:31:48 EST


>> >> any good daemon closes stdout, stderr, stdin
>> >
>> >A real good daemon would redirect them to /dev/null.
>>
>> and writes to /var/log/mysql/...
>
>And has log rotation. Apache has log rotation. Squid has log rotation.
>
>Why they all need to have log rotation code? I forced them all to just

I dunno. SUSE Linux (no advertisement intended) uses a global solution -
"logrotate" rather than using each project's own logrotation.


>write log to stderr, and multilog from daemontools does the logging
>(with rotation and postprocessing (for example, feeds Squid log into
>Mysql db)) just fine.
>
>But we digress. Is there any magic (mount --bind?) to make
>/dev/stderr undestructible?

If not, you could write an LSM that prohibits unlinking /dev/stderr.



Jan Engelhardt
--
| Software Engineer and Linux/Unix Network Administrator
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/