diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-03 00:40:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-03 00:40:01 +0000 |
commit | 0865366f6b1070a8db3d8421c37c8072b36b96e3 (patch) | |
tree | 60cc8036ab0fe746e46a162d458a5ddd5213f095 /source/include | |
parent | 2f2365e93833e5f08dc14ab0022dd9f6f0d028ad (diff) | |
download | samba-0865366f6b1070a8db3d8421c37c8072b36b96e3.tar.gz samba-0865366f6b1070a8db3d8421c37c8072b36b96e3.tar.xz samba-0865366f6b1070a8db3d8421c37c8072b36b96e3.zip |
Added XFS ACLs on Linux. Code from John Trostel <jtrostel@connex.com>.
Jeremy.
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/config.h.in | 5 | ||||
-rw-r--r-- | source/include/includes.h | 4 | ||||
-rw-r--r-- | source/include/smb_acls.h | 42 |
3 files changed, 51 insertions, 0 deletions
diff --git a/source/include/config.h.in b/source/include/config.h.in index e60d5ca425a..64714b1e91d 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -203,6 +203,8 @@ #undef HAVE_POSIX_ACLS #undef HAVE_UNIXWARE_ACLS #undef HAVE_SOLARIS_ACLS +#undef HAVE_IRIX_ACLS +#undef HAVE_XFS_ACLS #undef HAVE_NO_ACLS /* The number of bytes in a int. */ @@ -715,6 +717,9 @@ /* Define if you have the yp_get_default_domain function. */ #undef HAVE_YP_GET_DEFAULT_DOMAIN +/* Define if you have the <acl/acl.h> header file. */ +#undef HAVE_ACL_ACL_H + /* Define if you have the <arpa/inet.h> header file. */ #undef HAVE_ARPA_INET_H diff --git a/source/include/includes.h b/source/include/includes.h index 93c756a6901..1c72220d4f4 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -271,6 +271,10 @@ #include <sys/acl.h> #endif +#ifdef HAVE_XFS_ACLS +#include <acl/acl.h> +#endif + #ifdef HAVE_SYS_FS_S5PARAM_H #include <sys/fs/s5param.h> #endif diff --git a/source/include/smb_acls.h b/source/include/smb_acls.h index d7a9c53aaac..9de3a5b6a15 100644 --- a/source/include/smb_acls.h +++ b/source/include/smb_acls.h @@ -163,6 +163,48 @@ typedef struct SMB_ACL_T { #define SMB_ACL_TYPE_ACCESS ACL_TYPE_ACCESS #define SMB_ACL_TYPE_DEFAULT ACL_TYPE_DEFAULT +/* XFS ACLS are defined here */ +/* donated by John Trostel (jtrostel@connex.com) */ + +#elif defined(HAVE_XFS_ACLS) + +/* This is an nearly an identity mapping (just remove the SMB_). */ +#define SMB_ACL_TAG_T acl_tag_t +#define SMB_ACL_TYPE_T acl_type_t +//#define SMB_ACL_PERMSET_T acl_permset_t +typedef ushort *SMB_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 + +/* Types of ACLs. */ +#define SMB_ACL_USER ACL_USER +#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 ACL_OTHER_OBJ +#define SMB_ACL_MASK ACL_MASK + +#define SMB_ACL_T acl_t + +#define SMB_ACL_ENTRY_T acl_entry_t + +#define SMB_ACL_FIRST_ENTRY ACL_FIRST_ENTRY +#define SMB_ACL_NEXT_ENTRY ACL_NEXT_ENTRY + +#define SMB_ACL_TYPE_ACCESS ACL_TYPE_ACCESS +#define SMB_ACL_TYPE_DEFAULT ACL_TYPE_DEFAULT + +/* Not yet in Official SGI XFS CVS */ + +#if defined(CONFIG_EXTENDED_PERMISSSION) +#define SMB_ACL_CHOWN ACL_CHOWN +#define SMB_ACL_CHMOD ACL_CHMOD +#define SMB_ACL_DELETE ACL_DELETE +#define EXTENDED_PERM_BITS (ACL_CHOWN|ACL_CHMOD|ACL_DELETE) +#endif /* CONFIG_EXTENDED_PERMISSION */ + #else /* No ACLs. */ /* No ACLS - fake it. */ |