diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/config.h.in | 2 | ||||
-rw-r--r-- | source3/include/proto.h | 24 | ||||
-rw-r--r-- | source3/include/rpc_client_proto.h | 3 | ||||
-rw-r--r-- | source3/include/smb_acls.h | 36 |
4 files changed, 61 insertions, 4 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in index dd8e8dca88..82fd2910ca 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -201,6 +201,8 @@ #undef MIPS_SPINLOCKS #undef POWERPC_SPINLOCKS #undef HAVE_POSIX_ACLS +#undef HAVE_UNIXWARE_ACLS +#undef HAVE_SOLARIS_ACLS #undef HAVE_NO_ACLS /* The number of bytes in a int. */ diff --git a/source3/include/proto.h b/source3/include/proto.h index 4f703dedb1..764fcf0e62 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -276,6 +276,26 @@ int sys_acl_set_file(char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); int sys_acl_free_text(char *text); int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); @@ -528,6 +548,7 @@ BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); void sid_copy(DOM_SID *dst, const DOM_SID *src); DOM_SID *sid_dup(DOM_SID *src); BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); size_t sid_size(DOM_SID *sid); @@ -2085,8 +2106,7 @@ BOOL cli_net_auth2(struct cli_state *cli, uint16 sec_chan, uint32 neg_flags, DOM_CHAL *srv_chal); BOOL cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal); BOOL cli_net_srv_pwset(struct cli_state *cli, uint8 hashed_mach_pwd[16]); -BOOL cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr, - NET_USER_INFO_3 *user_info3); +BOOL cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3); BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr); BOOL change_trust_account_password( char *domain, char *remote_machine_list); diff --git a/source3/include/rpc_client_proto.h b/source3/include/rpc_client_proto.h index 3b94c37d59..210a352cf4 100644 --- a/source3/include/rpc_client_proto.h +++ b/source3/include/rpc_client_proto.h @@ -70,8 +70,7 @@ BOOL cli_net_auth2(struct cli_state *cli, uint16 sec_chan, uint32 neg_flags, DOM_CHAL *srv_chal); BOOL cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal); BOOL cli_net_srv_pwset(struct cli_state *cli, uint8 hashed_mach_pwd[16]); -BOOL cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr, - NET_USER_INFO_3 *user_info3); +BOOL cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3); BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr); BOOL change_trust_account_password( char *domain, char *remote_machine_list); diff --git a/source3/include/smb_acls.h b/source3/include/smb_acls.h index 578e9f2751..4469432e36 100644 --- a/source3/include/smb_acls.h +++ b/source3/include/smb_acls.h @@ -95,6 +95,42 @@ typedef struct acl *SMB_ACL_ENTRY_T; #elif defined(HAVE_SOLARIS_ACLS) +/* + * Code donated by Toomas Soome <tsoome@ut.ee>. + * Based on the implementation by Michael Davidson <md@sco.COM> for UnixWare. + */ + +typedef int SMB_ACL_TAG_T; +typedef int SMB_ACL_TYPE_T; +typedef ushort *SMB_ACL_PERMSET_T; +typedef ushort SMB_ACL_PERM_T; +#define SMB_ACL_READ 4 +#define SMB_ACL_WRITE 2 +#define SMB_ACL_EXECUTE 1 + +/* Types of ACLs. */ +#define SMB_ACL_USER USER +#define SMB_ACL_USER_OBJ USER_OBJ +#define SMB_ACL_GROUP GROUP +#define SMB_ACL_GROUP_OBJ GROUP_OBJ +#define SMB_ACL_OTHER OTHER_OBJ +#define SMB_ACL_MASK CLASS_OBJ + +typedef struct SMB_ACL_T { + int size; + int count; + int next; + struct acl acl[1]; +} *SMB_ACL_T; + +typedef struct acl *SMB_ACL_ENTRY_T; + +#define SMB_ACL_FIRST_ENTRY 0 +#define SMB_ACL_NEXT_ENTRY 1 + +#define SMB_ACL_TYPE_ACCESS 0 +#define SMB_ACL_TYPE_DEFAULT 1 + #elif defined(HAVE_IRIX_ACLS) #else /* No ACLs. */ |