All of lore.kernel.org
 help / color / mirror / Atom feed
* Allowed operations on O_PATH handles
@ 2021-07-30  9:22 Ralph Boehme
  2021-07-30 16:57 ` Amir Goldstein
  0 siblings, 1 reply; 3+ messages in thread
From: Ralph Boehme @ 2021-07-30  9:22 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Miklos Szeredi, Christoph Hellwig


[-- Attachment #1.1: Type: text/plain, Size: 998 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-04 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30  9:22 Allowed operations on O_PATH handles Ralph Boehme
2021-07-30 16:57 ` Amir Goldstein
2021-08-04 14:20   ` Ralph Boehme

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.