[PATCH] VFS: document what MAY_ACCESS means

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

 



The vfs MAY_ACCESS flag really means that we might not use the object
immediately (consider chdir which might not actually use the new dir).
Thus permissions must be checked rather than relying on checkes during
later access of the object in question.  This patch just adds some
documentation so the meaning of the flag is clear.  I would rename the flag,
but it's already visable (although useless) to userspace.

Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
---

 include/linux/fs.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 215b708..f683b29 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -51,6 +51,13 @@ struct inodes_stat_t {
 #define MAY_WRITE 2
 #define MAY_READ 4
 #define MAY_APPEND 8
+/*
+ * The vfs MAY_ACCESS flag really means that we might not use the object
+ * immediately (consider chdir which might not actually use the new dir).
+ * Thus permissions must be checked mmediately rather than relying on later
+ * checks during the actual user of the object in question.  This is an
+ * internal flag and should not come from userspace.
+ */
 #define MAY_ACCESS 16
 #define MAY_OPEN 32
 

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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