Behaviour of /proc/self/fd/NN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

If I understand Documentation/filesystems/path-lookup.md correctly, then
the "symlinks" in /proc/self/fd/NN are not true symlinks but just
presented as such to userspace. Does this mean that I can access (e.g.,
open(), setxattr(), or chmod()) these files without the possibility of
race conditions? I.e., there is no way for someone to rename the target
after the kernel has "looked up" the target but before the operation is
applied?

Secondly, under which conditions can I open the files in /proc? Does
this still work if the destination file has been unlinked? Does it
always follow renames? What if I mounted something over the destination?

(Background: I'm trying to ascertain how well a true bind mount can be
emulated by a passthrough FUSE filesystem).

Best,
-Nikolaus
-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux