source: branches/samba-3.0/source/include/smb_acls.h

Last change on this file was 1, checked in by Paul Smedley, 18 years ago

Initial code import

File size: 1.6 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 Portable SMB ACL interface
4 Copyright (C) Jeremy Allison 2000
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21#ifndef _SMB_ACLS_H
22#define _SMB_ACLS_H
23
24typedef int SMB_ACL_TYPE_T;
25typedef mode_t *SMB_ACL_PERMSET_T;
26typedef mode_t SMB_ACL_PERM_T;
27#define SMB_ACL_READ 4
28#define SMB_ACL_WRITE 2
29#define SMB_ACL_EXECUTE 1
30
31/* Types of ACLs. */
32enum smb_acl_tag_t {
33 SMB_ACL_TAG_INVALID=0,
34 SMB_ACL_USER=1,
35 SMB_ACL_USER_OBJ,
36 SMB_ACL_GROUP,
37 SMB_ACL_GROUP_OBJ,
38 SMB_ACL_OTHER,
39 SMB_ACL_MASK
40};
41
42typedef enum smb_acl_tag_t SMB_ACL_TAG_T;
43
44struct smb_acl_entry {
45 enum smb_acl_tag_t a_type;
46 SMB_ACL_PERM_T a_perm;
47 uid_t uid;
48 gid_t gid;
49};
50
51typedef struct smb_acl_t {
52 int size;
53 int count;
54 int next;
55 struct smb_acl_entry acl[1];
56} *SMB_ACL_T;
57
58typedef struct smb_acl_entry *SMB_ACL_ENTRY_T;
59
60#define SMB_ACL_FIRST_ENTRY 0
61#define SMB_ACL_NEXT_ENTRY 1
62
63#define SMB_ACL_TYPE_ACCESS 0
64#define SMB_ACL_TYPE_DEFAULT 1
65
66#endif /* _SMB_ACLS_H */
Note: See TracBrowser for help on using the repository browser.