mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] move xattr permission checks into the VFS
) From: Christoph Hellwig <[email protected]> The xattr code has rather complex permission checks because the rules are very different for different attribute namespaces. This patch moves as much as we can into the generic code. Currently all the major disk based filesystems duplicate these checks, while many minor filesystems or network filesystems lack some or all of them. To do this we need defines for the extended attribute names in common code, I moved them up from JFS which had the nicest defintions. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Dave Kleikamp <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
5be196e5f9
commit
e0ad7b073e
3 changed files with 72 additions and 19 deletions
|
|
@ -83,21 +83,6 @@ struct ea_buffer {
|
|||
#define EA_NEW 0x0004
|
||||
#define EA_MALLOC 0x0008
|
||||
|
||||
/* Namespaces */
|
||||
#define XATTR_SYSTEM_PREFIX "system."
|
||||
#define XATTR_SYSTEM_PREFIX_LEN (sizeof (XATTR_SYSTEM_PREFIX) - 1)
|
||||
|
||||
#define XATTR_USER_PREFIX "user."
|
||||
#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
|
||||
|
||||
#define XATTR_OS2_PREFIX "os2."
|
||||
#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
|
||||
|
||||
/* XATTR_SECURITY_PREFIX is defined in include/linux/xattr.h */
|
||||
#define XATTR_SECURITY_PREFIX_LEN (sizeof (XATTR_SECURITY_PREFIX) - 1)
|
||||
|
||||
#define XATTR_TRUSTED_PREFIX "trusted."
|
||||
#define XATTR_TRUSTED_PREFIX_LEN (sizeof (XATTR_TRUSTED_PREFIX) - 1)
|
||||
|
||||
/*
|
||||
* These three routines are used to recognize on-disk extended attributes
|
||||
|
|
|
|||
Loading…
Reference in a new issue