capabilities: clean up file capability reading

Simplify the vfs_cap_data structure.

Also fix get_file_caps which was declaring
__le32 v1caps[XATTR_CAPS_SZ] on the stack, but
XATTR_CAPS_SZ is already * sizeof(__le32).

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Andrew Morgan <morgan@kernel.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Serge E. Hallyn 2007-10-21 16:41:38 -07:00 committed by Linus Torvalds
parent b9049e2344
commit b68680e473
2 changed files with 17 additions and 12 deletions

View file

@ -56,10 +56,8 @@ typedef struct __user_cap_data_struct {
struct vfs_cap_data {
__u32 magic_etc; /* Little endian */
struct {
__u32 permitted; /* Little endian */
__u32 inheritable; /* Little endian */
} data[1];
__u32 permitted; /* Little endian */
__u32 inheritable; /* Little endian */
};
#ifdef __KERNEL__