Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / include / linux / richacl_xattr.h
1 /*
2  * Copyright (C) 2006, 2010  Novell, Inc.
3  * Written by Andreas Gruenbacher <agruen@suse.de>
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation; either version 2, or (at your option) any
8  * later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  */
15
16 #ifndef __RICHACL_XATTR_H
17 #define __RICHACL_XATTR_H
18
19 #include <linux/richacl.h>
20
21 #define RICHACL_XATTR "system.richacl"
22
23 struct richace_xattr {
24         __le16          e_type;
25         __le16          e_flags;
26         __le32          e_mask;
27         __le32          e_id;
28         char            e_who[0];
29 };
30
31 struct richacl_xattr {
32         unsigned char   a_version;
33         unsigned char   a_flags;
34         __le16          a_count;
35         __le32          a_owner_mask;
36         __le32          a_group_mask;
37         __le32          a_other_mask;
38 };
39
40 #define ACL4_XATTR_VERSION      0
41 #define ACL4_XATTR_MAX_COUNT    1024
42
43 extern struct richacl *richacl_from_xattr(const void *, size_t);
44 extern size_t richacl_xattr_size(const struct richacl *acl);
45 extern void richacl_to_xattr(const struct richacl *, void *);
46
47 #endif /* __RICHACL_XATTR_H */