summaryrefslogtreecommitdiffstats
path: root/source3/include/trans2.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-11-12 23:42:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:16 -0500
commitf995b164b98221e224661e370d61ad08dadb2986 (patch)
treeab48f2b1ec70e8ee0aadacb6adc5934db8a7addc /source3/include/trans2.h
parenta13b603b79e170683b6b5b339d3494d32a9eaf39 (diff)
downloadsamba-f995b164b98221e224661e370d61ad08dadb2986.tar.gz
samba-f995b164b98221e224661e370d61ad08dadb2986.tar.xz
samba-f995b164b98221e224661e370d61ad08dadb2986.zip
r3713: Implementation of get posix acls in UNIX extensions. Passes valgrind.
Need to add printout functions in client and set posix acl in server. SteveF - take a look at this for the cifsfs client ! Once this is working and tested the next step is to write this up for the UNIX extensions spec. documents. Jeremy. (This used to be commit 1bd3f133442a472b4718b94a636f2fec89a2e0dc)
Diffstat (limited to 'source3/include/trans2.h')
-rw-r--r--source3/include/trans2.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/source3/include/trans2.h b/source3/include/trans2.h
index 37b3cb24b14..55b28ae9376 100644
--- a/source3/include/trans2.h
+++ b/source3/include/trans2.h
@@ -459,4 +459,75 @@ Offset Size Name
/* ... more as we think of them :-). */
+/* SMB POSIX ACL definitions. */
+/* Wire format is (all little endian) :
+
+[2 bytes] - Version number.
+[2 bytes] - Number of ACE entries to follow.
+[2 bytes] - Number of default ACE entries to follow.
+-------------------------------------
+^
+|
+ACE entries
+|
+v
+-------------------------------------
+^
+|
+Default ACE entries
+|
+v
+-------------------------------------
+
+Where an ACE entry looks like :
+
+[1 byte] - Entry type.
+
+Entry types are :
+
+ACL_USER_OBJ 0x01
+ACL_USER 0x02
+ACL_GROUP_OBJ 0x04
+ACL_GROUP 0x08
+ACL_MASK 0x10
+ACL_OTHER 0x20
+
+[1 byte] - permissions (perm_t)
+
+perm_t types are :
+
+ACL_READ 0x04
+ACL_WRITE 0x02
+ACL_EXECUTE 0x01
+
+[8 bytes] - uid/gid to apply this permission to.
+
+In the same format as the uid/gid fields in the other
+UNIX extensions definitions. Use 0xFFFFFFFFFFFFFFFF for
+the MASK and OTHER entry types.
+
+*/
+
+/* The query/set info levels for POSIX ACLs. */
+#define SMB_QUERY_POSIX_ACL 0x204
+#define SMB_SET_POSIX_ACL 0x204
+
+/* Current on the wire ACL version. */
+#define SMB_POSIX_ACL_VERSION 1
+
+/* ACE entry type. */
+#define SMB_POSIX_ACL_USER_OBJ 0x01
+#define SMB_POSIX_ACL_USER 0x02
+#define SMB_POSIX_ACL_GROUP_OBJ 0x04
+#define SMB_POSIX_ACL_GROUP 0x08
+#define SMB_POSIX_ACL_MASK 0x10
+#define SMB_POSIX_ACL_OTHER 0x20
+
+/* perm_t types. */
+#define SMB_POSIX_ACL_READ 0x04
+#define SMB_POSIX_ACL_WRITE 0x02
+#define SMB_POSIX_ACL_EXECUTE 0x01
+
+#define SMB_POSIX_ACL_HEADER_SIZE 6
+#define SMB_POSIX_ACL_ENTRY_SIZE 10
#endif