Re:#include </etc/shadow>
by commandersaki on Tuesday December 17, 2019 @02:10AM
(#21811371)
I’ve known about it for a very long time after someone pointed it out. I always joke that’s how I write C.
I never thought about it in terms of a security problem.
Of course, I know how the #include mechanism works, and what the special device files do, so I can anticipate the results of #include </dev/stdin>, but it is unusual enough that I had to write a small test program to see for myself.