4 (extended attribute representation of access control lists)
6 Copyright (C) 2002 Andreas Gruenbacher, <agruen@suse.de>
8 This program is free software: you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation, either version 2.1 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #define ACL_EA_ACCESS "system.posix_acl_access"
23 #define ACL_EA_DEFAULT "system.posix_acl_default"
25 #define ACL_EA_VERSION 0x0002
35 acl_ea_entry a_entries[0];
38 static inline size_t acl_ea_size(int count)
40 return sizeof(acl_ea_header) + count * sizeof(acl_ea_entry);
43 static inline int acl_ea_count(size_t size)
45 if (size < sizeof(acl_ea_header))
47 size -= sizeof(acl_ea_header);
48 if (size % sizeof(acl_ea_entry))
50 return size / sizeof(acl_ea_entry);