2 Unix SMB/CIFS implementation.
3 Portable SMB ACL interface
4 Copyright (C) Jeremy Allison 2000
5 Copyright (C) Andrew Bartlett 2012
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 * Allow the smb_acl interface to be pushed into an NDR blob and
24 * read/written in python.
26 * The exact layout of these stuctures is CRITICAL, as a SHA-256 hash is
27 * taken over these after they are pushed as NDR blobs, and stored in an
28 * xattr for ACL verification.
31 pointer_default(unique)
36 const int SMB_ACL_READ
= 4;
37 const int SMB_ACL_WRITE
= 2;
38 const int SMB_ACL_EXECUTE
= 1;
42 SMB_ACL_TAG_INVALID
= 0,
46 SMB_ACL_GROUP_OBJ
= 4,
59 typedef [switch_type(uint16
)] union {
60 [case (SMB_ACL_USER
)] smb_acl_user user
;
61 [case (SMB_ACL_USER_OBJ
)];
62 [case (SMB_ACL_GROUP
)] smb_acl_group group
;
63 [case (SMB_ACL_GROUP_OBJ
)];
64 [case (SMB_ACL_OTHER
)];
65 [case (SMB_ACL_MASK
)];
70 [switch_is(a_type
)] smb_acl_entry_info info
;
74 [public] typedef struct {
77 [size_is(count
)] smb_acl_entry acl
[*];
80 const int SMB_ACL_FIRST_ENTRY
= 0;
81 const int SMB_ACL_NEXT_ENTRY
= 1;
83 const int SMB_ACL_TYPE_ACCESS
= 0;
84 const int SMB_ACL_TYPE_DEFAULT
= 1;
86 /* A wrapper of all the information required to reproduce an
87 * ACL, so we can hash it for the acl_xattr and acl_tdb
89 [public] typedef struct {
90 smb_acl_t
*access_acl
;
91 smb_acl_t
*default_acl
; /* NULL on files */