Allowed operations on O_PATH handles

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

 



Hi!

A recent commit 44a3b87444058b2cb055092cdebc63858707bf66 allows utimensat() to be called on O_PATH opened handles.

If utimensat() is allowed, why isn't fchmod()? What's the high level rationale here that I'm missing? Why is this not documented in man openat.2?

From man openat.2

  O_PATH (since Linux 2.6.39)

    Obtain a file descriptor that can be used for two purposes:
    to indicate a location in the filesystem tree and to perform
    operations that act purely at the file descriptor level. The
    file itself is not opened, and other file operations (e.g.,
    read(2),  write(2),   fchmod(2),   fchown(2),   fgetxattr(2),
    ioctl(2), mmap(2)) fail with the error EBADF.
    ...

My understanding of which operations are allowed on file handles opened with O_PATH was that generally modifying operations would not be allowed, but only read access to inode data.

Can someone please help me to make sense of this?

Thanks a lot!
-slow

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[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