1 typedef opaque utf8string<>; 2 typedef utf8string utf8str_mixed; 3 4 const ACE4_ACCESS_ALLOWED_ACE_TYPE = 0x00000000; 5 const ACE4_ACCESS_DENIED_ACE_TYPE = 0x00000001; 6 const ACE4_SYSTEM_AUDIT_ACE_TYPE = 0x00000002; 7 const ACE4_SYSTEM_ALARM_ACE_TYPE = 0x00000003; 8 9 typedef u_int acetype4; 10 11 const ACE4_FILE_INHERIT_ACE = 0x00000001; 12 const ACE4_DIRECTORY_INHERIT_ACE = 0x00000002; 13 const ACE4_NO_PROPAGATE_INHERIT_ACE = 0x00000004; 14 const ACE4_INHERIT_ONLY_ACE = 0x00000008; 15 const ACE4_SUCCESSFUL_ACCESS_ACE_FLAG = 0x00000010; 16 const ACE4_FAILED_ACCESS_ACE_FLAG = 0x00000020; 17 const ACE4_IDENTIFIER_GROUP = 0x00000040; 18 const ACE4_INHERITED_ACE = 0x00000080; 19 20 typedef u_int aceflag4; 21 22 /* 23 * The following aceiflag4 is extensions for RFC 5661 that deals with storing 24 * identifiers as numerical ids instead UTF8 strings in order to avoid wasting 25 * CPU cycles for the costly conversion. 26 * 27 * Placed in a seperate field to avoid ever running into conflicts with newly 28 * defined NFSv4 flags. 29 */ 30 31 const ACEI4_SPECIAL_WHO = 0x00000001; 32 33 typedef u_int aceiflag4; 34 35 /* 36 * Numerical representation of special identifiers from 6.2.1.5. 37 * ACEI4_SPECIAL_WHO MUST be set in nfsace4.aceiflag4. 38 */ 39 const ACE4_SPECIAL_OWNER = 1; 40 const ACE4_SPECIAL_GROUP = 2; 41 const ACE4_SPECIAL_EVERYONE = 3; 42 const ACE4_SPECIAL_INTERACTIVE = 4; 43 const ACE4_SPECIAL_NETWORK = 5; 44 const ACE4_SPECIAL_DIALUP = 6; 45 const ACE4_SPECIAL_BATCH = 7; 46 const ACE4_SPECIAL_ANONYMOUS = 8; 47 const ACE4_SPECIAL_AUTHENTICATED = 9; 48 const ACE4_SPECIAL_SERVICE = 10; 49 50 const ACE4_READ_DATA = 0x00000001; 51 const ACE4_LIST_DIRECTORY = 0x00000001; 52 const ACE4_WRITE_DATA = 0x00000002; 53 const ACE4_ADD_FILE = 0x00000002; 54 const ACE4_APPEND_DATA = 0x00000004; 55 const ACE4_ADD_SUBDIRECTORY = 0x00000004; 56 const ACE4_READ_NAMED_ATTRS = 0x00000008; 57 const ACE4_WRITE_NAMED_ATTRS = 0x00000010; 58 const ACE4_EXECUTE = 0x00000020; 59 const ACE4_DELETE_CHILD = 0x00000040; 60 const ACE4_READ_ATTRIBUTES = 0x00000080; 61 const ACE4_WRITE_ATTRIBUTES = 0x00000100; 62 const ACE4_WRITE_RETENTION = 0x00000200; 63 const ACE4_WRITE_RETENTION_HOLD = 0x00000400; 64 65 const ACE4_DELETE = 0x00010000; 66 const ACE4_READ_ACL = 0x00020000; 67 const ACE4_WRITE_ACL = 0x00040000; 68 const ACE4_WRITE_OWNER = 0x00080000; 69 const ACE4_SYNCHRONIZE = 0x00100000; 70 71 typedef u_int acemask4; 72 73 /* ACL structure definition as per RFC 7530 Section-6.2.1 */ 74 struct nfsace4 { 75 acetype4 type; 76 aceflag4 flag; 77 acemask4 access_mask; 78 utf8str_mixed who; 79 }; 80 81 struct nfsace4i { 82 acetype4 type; 83 aceflag4 flag; 84 aceiflag4 iflag; 85 acemask4 access_mask; 86 u_int who; 87 }; 88 89 const ACL4_XATTR_VERSION_40 = 0; 90 const ACL4_XATTR_VERSION_41 = 1; 91 const ACL4_XATTR_VERSION_DEFAULT = ACL4_XATTR_VERSION_40; 92 93 const ACL4_AUTO_INHERIT = 0x00000001; 94 const ACL4_PROTECTED = 0x00000002; 95 const ACL4_DEFAULTED = 0x00000004; 96 97 typedef u_int aclflag4; 98 99 struct nfsacl40 { 100 nfsace4 na40_aces<>; 101 }; 102 103 struct nfsacl41 { 104 aclflag4 na41_flag; 105 nfsace4 na41_aces<>; 106 }; 107 108 struct nfsacl41i { 109 aclflag4 na41_flag; 110 nfsace4i na41_aces<>; 111 }; 112