diff options
author | Jeremy Allison <jra@samba.org> | 2000-12-07 05:38:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-12-07 05:38:01 +0000 |
commit | 423227d7ca87a6a4b9412e9ecbc3d6dd073818b1 (patch) | |
tree | e8e68c7bc2b7cee20b986d0510911647e735d937 /source3/include | |
parent | 70922b9bbe412dc43397ecfd3feeb01169ed0b96 (diff) | |
download | samba-423227d7ca87a6a4b9412e9ecbc3d6dd073818b1.tar.gz samba-423227d7ca87a6a4b9412e9ecbc3d6dd073818b1.tar.bz2 samba-423227d7ca87a6a4b9412e9ecbc3d6dd073818b1.zip |
Working code to read POSIX ACLs on a Linux system using the bestbits
ACL patch from http://acl.bestbits.at/.
configure support needs more work (just assumes correct headers at
the moment). ACL writing needs adding.
Jeremy.
(This used to be commit 6ae63e502e6adf3666a34aa87860c74e106fdb84)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/config.h.in | 1 | ||||
-rw-r--r-- | source3/include/proto.h | 8 | ||||
-rw-r--r-- | source3/include/smb_acls.h | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in index a647db2911..a9bc166139 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -200,6 +200,7 @@ #undef INTEL_SPINLOCKS #undef MIPS_SPINLOCKS #undef POWERPC_SPINLOCKS +#undef HAVE_POSIX_ACLS /* The number of bytes in a int. */ #undef SIZEOF_INT diff --git a/source3/include/proto.h b/source3/include/proto.h index fe04dcb5e3..62d978ee7a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -249,6 +249,10 @@ 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_free( void *obj_p); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T acl, ssize_t *plen); int sys_acl_get_entry( SMB_ACL_T 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); @@ -256,6 +260,10 @@ 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_free( void *obj_p); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T acl, ssize_t *plen); /*The following definitions come from lib/system.c */ diff --git a/source3/include/smb_acls.h b/source3/include/smb_acls.h index bc07a1b271..944baaa4e5 100644 --- a/source3/include/smb_acls.h +++ b/source3/include/smb_acls.h @@ -31,6 +31,7 @@ #define SMB_ACL_TAG_T acl_tag_t #define SMB_ACL_TYPE_T acl_type_t #define SMB_ACL_PERMSET_T acl_permset_t +#define SMB_ACL_PERM_T acl_perm_t #define SMB_ACL_READ ACL_READ #define SMB_ACL_WRITE ACL_WRITE #define SMB_ACL_EXECUTE ACL_EXECUTE @@ -40,7 +41,7 @@ #define SMB_ACL_USER_OBJ ACL_USER_OBJ #define SMB_ACL_GROUP ACL_GROUP #define SMB_ACL_GROUP_OBJ ACL_GROUP_OBJ -#define SMB_ACL_OTHER_OBJ ACL_OTHER_OBJ +#define SMB_ACL_OTHER ACL_OTHER #define SMB_ACL_MASK ACL_MASK #define SMB_ACL_T acl_t @@ -63,6 +64,7 @@ #define SMB_ACL_TAG_T int #define SMB_ACL_TYPE_T int #define SMB_ACL_PERMSET_T mode_t +#define SMB_ACL_PERM_T mode_t #define SMB_ACL_READ S_IRUSR #define SMB_ACL_WRITE S_IWUSR #define SMB_ACL_EXECUTE S_IXUSR @@ -72,7 +74,7 @@ #define SMB_ACL_USER_OBJ 1 #define SMB_ACL_GROUP 2 #define SMB_ACL_GROUP_OBJ 3 -#define SMB_ACL_OTHER_OBJ 4 +#define SMB_ACL_OTHER 4 #define SMB_ACL_MASK 5 typedef struct SMB_ACL_T { |