2000-12-06 05:32:48 +03:00
/*
2002-01-30 09:08:46 +03:00
Unix SMB / CIFS implementation .
2000-12-06 05:32:48 +03:00
Portable SMB ACL interface
Copyright ( C ) Jeremy Allison 2000
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-09 23:25:36 +04:00
the Free Software Foundation ; either version 3 of the License , or
2000-12-06 05:32:48 +03:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program ; if not , write to the Free Software
Foundation , Inc . , 675 Mass Ave , Cambridge , MA 0213 9 , USA .
*/
# ifndef _SMB_ACLS_H
# define _SMB_ACLS_H
2001-02-15 22:56:10 +03:00
typedef int SMB_ACL_TYPE_T ;
2006-07-21 19:51:34 +04:00
typedef mode_t * SMB_ACL_PERMSET_T ;
typedef mode_t SMB_ACL_PERM_T ;
2001-04-06 00:52:02 +04:00
# define SMB_ACL_READ 4
# define SMB_ACL_WRITE 2
# define SMB_ACL_EXECUTE 1
2001-02-15 22:56:10 +03:00
/* Types of ACLs. */
2006-07-21 19:51:34 +04:00
enum smb_acl_tag_t {
2006-08-24 23:56:20 +04:00
SMB_ACL_TAG_INVALID = 0 ,
2006-07-21 19:51:34 +04:00
SMB_ACL_USER = 1 ,
SMB_ACL_USER_OBJ ,
SMB_ACL_GROUP ,
SMB_ACL_GROUP_OBJ ,
SMB_ACL_OTHER ,
SMB_ACL_MASK
} ;
2001-12-15 05:40:16 +03:00
2006-07-21 19:51:34 +04:00
typedef enum smb_acl_tag_t SMB_ACL_TAG_T ;
2001-12-15 05:40:16 +03:00
2006-07-21 19:51:34 +04:00
struct smb_acl_entry {
enum smb_acl_tag_t a_type ;
SMB_ACL_PERM_T a_perm ;
uid_t uid ;
gid_t gid ;
} ;
2001-12-15 05:40:16 +03:00
2006-07-21 19:51:34 +04:00
typedef struct smb_acl_t {
2001-12-15 05:40:16 +03:00
int size ;
int count ;
int next ;
2006-07-21 19:51:34 +04:00
struct smb_acl_entry acl [ 1 ] ;
2000-12-06 05:32:48 +03:00
} * SMB_ACL_T ;
2006-07-21 19:51:34 +04:00
typedef struct smb_acl_entry * SMB_ACL_ENTRY_T ;
2000-12-06 05:32:48 +03:00
# define SMB_ACL_FIRST_ENTRY 0
# define SMB_ACL_NEXT_ENTRY 1
# define SMB_ACL_TYPE_ACCESS 0
# define SMB_ACL_TYPE_DEFAULT 1
# endif /* _SMB_ACLS_H */