5 .Nm acl_copy_ext_native ,
7 .Nm acl_copy_int_native,
9 .Nd convert an ACL to and from an external representation
20 .Fo acl_copy_ext_native
30 .Fo acl_copy_int_native
41 .Fn acl_copy_ext_native
42 functions convert the ACL given by the argument
44 into a binary external representation that can be saved to a file,
45 passed to another program, etc.
46 This external representation is written to the buffer pointed to by the argument
48 which is assumed to have at least the number of contiguous bytes passed in the
51 The number of bytes actually written is returned.
55 function writes data in big-endian byte-order, and so is portable across
56 machines with different byte-order.
58 .Fn acl_copy_ext_native
59 function uses the machine's native byte-order, and so is only portable to
60 machines of like byte-order.
65 .Fn acl_copy_int_native
66 functions do the reverse conversion; the ACL represented by the external
67 representation passed in the argument
72 function expects an external representation in big-endian byte-order (as
76 .Fn acl_copy_int_native
77 expects an external representation in native byte-order (as returned by
78 .Fn acl_copy_ext_native ) .
82 function returns the corresponding external representation size, in bytes, for
83 the given ACL passed in the argument
85 This size can be used to allocate sufficient memory for the buffer in
89 .Fn acl_copy_ext_native .
91 Upon successful completion, the
94 .Fn acl_copy_ext_native
95 functions shall return the number of bytes actually written to the buffer.
100 shall be set to indicate the error.
102 Upon successful completion, the
105 .Fn acl_copy_int_native
106 functions shall return the ACL represented by the external representation
107 passed in the buffer.
108 Otherwise, a value of
110 shall be returned and
112 shall be set to indicate the error.
114 Upon successful completion, the
116 function shall return the size of the external representation.
117 Otherwise, a value of
119 shall be returned and
121 shall be set to indicate the error.
126 .Fn acl_copy_ext_native
132 does not point to a valid ACL.
134 The given buffer is too small to contain the converted external representation.
140 .Fn acl_copy_int_native
144 The buffer does not contain a valid external representation.
154 does not point to a valid ACL.
157 While the external representation may use pre-existing data structures,
158 no assumptions on the internal structure should be made.
164 functions also convert to and from a different external representation,
165 a human-readable string.
166 Neither of these representations are cross-platform, lacking a cross-platform
170 .Xr acl_from_text 3 ,
174 .An Robert N M Watson