Cook: security things in Linux v5.1
Cook: security things in Linux v5.1
Posted May 29, 2019 18:35 UTC (Wed) by epa (subscriber, #39769)Parent article: Cook: security things in Linux v5.1
Posted May 29, 2019 19:14 UTC (Wed)
by josh (subscriber, #17465)
[Link] (5 responses)
Posted May 30, 2019 3:26 UTC (Thu)
by wahern (subscriber, #37304)
[Link] (2 responses)
Posted May 30, 2019 15:43 UTC (Thu)
by mgedmin (subscriber, #34497)
[Link] (1 responses)
Posted May 30, 2019 16:21 UTC (Thu)
by nybble41 (subscriber, #55106)
[Link]
No, the O_DIRECTORY flag just causes the open() call to fail if the path does not refer to a directory. You can open directories without it. The shell has no issues redirecting from a directory rather than a file. You can test that yourself easily:
Posted May 30, 2019 4:53 UTC (Thu)
by epa (subscriber, #39769)
[Link] (1 responses)
Posted May 30, 2019 5:00 UTC (Thu)
by epa (subscriber, #39769)
[Link]
Cook: security things in Linux v5.1
Cook: security things in Linux v5.1
Cook: security things in Linux v5.1
Cook: security things in Linux v5.1
$ ls -l /proc/self/fd 3</etc
total 0
lrwx------ 1 user group 64 May 30 11:16 0 -> /dev/pts/N
lrwx------ 1 user group 64 May 30 11:16 1 -> /dev/pts/N
lrwx------ 1 user group 64 May 30 11:16 2 -> /dev/pts/N
lr-x------ 1 user group 64 May 30 11:16 3 -> /etc/
lr-x------ 1 user group 64 May 30 11:16 4 -> /proc/NNNN/fd/
Cook: security things in Linux v5.1
Cook: security things in Linux v5.1