Re: [PATCH] Console: fall back to /dev/null when no console is availlable

Jörn Engel
2004-10-06T19:08:57Z

On Wed, 6 October 2004 19:37:30 +0100, Gianni Tedesco wrote:
>
> BTW. What happens if /dev/console or /dev/null are regular files?

Interesting point. Any readers (init, some/all of it's children) will
read until one reaches EOF, all writers will flood it 'til it's full.
If there was an IOUAC (international obfuscated unix abuse contest),
you could use this for IPC, maybe.

> I don't see any check for this. I didn't think Linux imposed any
> namespace layout/ownership/permission requirements.

Anyone able to turn /dev/console into a regular file can already do
much worse things. Don't think it's a security issue.

Jörn

--
Simplicity is prerequisite for reliability.
-- Edsger W. Dijkstra