]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/acl_mappings.h
Merge master
[netatalk.git] / etc / afpd / acl_mappings.h
index d1ddbc13344bc45cd8d1fe4c54685b1dbbcd5601..87ff5decefdc75d9c09feab9af8c8d971fa54b14 100644 (file)
@@ -1,5 +1,4 @@
 /*
-   $Id: acl_mappings.h,v 1.1 2009-02-02 11:55:00 franklahm Exp $
    Copyright (c) 2008,2009 Frank Lahm <franklahm@gmail.com>
 
    This program is free software; you can redistribute it and/or modify
 #ifndef ACL_MAPPINGS
 #define ACL_MAPPINGS
 
+#ifdef HAVE_SOLARIS_ACLS
 #include <sys/acl.h>
+#endif
+
 #include "acls.h"
 
 /* 
  * Stuff for mapping between ACL implementations
  */
 
+/* Solaris 10u8 still hasn't got ACE_INHERITED_ACE */
+#ifndef ACE_INHERITED_ACE
+#define ACE_INHERITED_ACE 0x0080
+#endif
+
 struct ace_rights_map {
-    u_int32_t from;
-    u_int32_t to;
+    uint32_t from;
+    uint32_t to;
 };
 
+#ifdef HAVE_SOLARIS_ACLS
 struct ace_rights_map nfsv4_to_darwin_rights[] = {
     {ACE_READ_DATA,         DARWIN_ACE_READ_DATA},
     {ACE_WRITE_DATA,        DARWIN_ACE_WRITE_DATA},
@@ -63,8 +71,8 @@ struct ace_rights_map darwin_to_nfsv4_rights[] = {
 };
 
 struct nfsv4_to_darwin_flags_map {
-    u_int16_t from;
-    u_int32_t to;
+    uint16_t from;
+    uint32_t to;
 };
 
 struct nfsv4_to_darwin_flags_map nfsv4_to_darwin_flags[] = {
@@ -77,8 +85,8 @@ struct nfsv4_to_darwin_flags_map nfsv4_to_darwin_flags[] = {
 };
 
 struct darwin_to_nfsv4_flags_map {
-    u_int32_t from;
-    u_int16_t to;
+    uint32_t from;
+    uint16_t to;
 };
 
 struct darwin_to_nfsv4_flags_map darwin_to_nfsv4_flags[] = {
@@ -89,5 +97,6 @@ struct darwin_to_nfsv4_flags_map darwin_to_nfsv4_flags[] = {
     {DARWIN_ACE_FLAGS_INHERITED,         ACE_INHERITED_ACE},
     {0,0}
 };
+#endif /* HAVE_SOLARIS_ACLS */
 
 #endif /* ACL_MAPPINGS */