summaryrefslogtreecommitdiffstats
path: root/lib/libc/posix1e/acl_to_text.3
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-06-25 12:46:59 +0000
committertrasz <trasz@FreeBSD.org>2009-06-25 12:46:59 +0000
commitff2751123334f5d80faa47567304d59aed236eba (patch)
tree2ef84b1a3d387c8edf2b81194552ad8337bd003b /lib/libc/posix1e/acl_to_text.3
parent9a27798fa1cde67ed249d166ee358fee1a684179 (diff)
downloadFreeBSD-src-ff2751123334f5d80faa47567304d59aed236eba.zip
FreeBSD-src-ff2751123334f5d80faa47567304d59aed236eba.tar.gz
Add NFSv4 ACL support to libc.
This adds the following functions to the acl(3) API: acl_add_flag_np, acl_clear_flags_np, acl_create_entry_np, acl_delete_entry_np, acl_delete_flag_np, acl_get_extended_np, acl_get_flag_np, acl_get_flagset_np, acl_set_extended_np, acl_set_flagset_np, acl_to_text_np, acl_is_trivial_np, acl_strip_np, acl_get_brand_np. Most of them are similar to what Darwin does. There are no backward-incompatible changes. Approved by: rwatson@
Diffstat (limited to 'lib/libc/posix1e/acl_to_text.3')
-rw-r--r--lib/libc/posix1e/acl_to_text.326
1 files changed, 22 insertions, 4 deletions
diff --git a/lib/libc/posix1e/acl_to_text.3 b/lib/libc/posix1e/acl_to_text.3
index 833a6d2..38c588b 100644
--- a/lib/libc/posix1e/acl_to_text.3
+++ b/lib/libc/posix1e/acl_to_text.3
@@ -31,7 +31,8 @@
.Dt ACL_TO_TEXT 3
.Os
.Sh NAME
-.Nm acl_to_text
+.Nm acl_to_text ,
+.Nm acl_to_text_np
.Nd convert an ACL to text
.Sh LIBRARY
.Lb libc
@@ -40,10 +41,14 @@
.In sys/acl.h
.Ft char *
.Fn acl_to_text "acl_t acl" "ssize_t *len_p"
+.Ft char *
+.Fn acl_to_text_np "acl_t acl" "ssize_t *len_p" "int flags"
.Sh DESCRIPTION
The
.Fn acl_to_text
-function translates the ACL pointed to by argument
+and
+.Fn acl_to_text_np
+functions translate the ACL pointed to by argument
.Va acl
into a NULL terminated character string.
If the pointer
@@ -51,9 +56,22 @@ If the pointer
is not NULL, then the function shall return the length of the string (not
including the NULL terminator) in the location pointed to by
.Va len_p .
-The format of the text string returned by
+If the ACL is POSIX.1e, the format of the text string returned by
.Fn acl_to_text
-shall be the POSIX.1e long ACL form.
+shall be the POSIX.1e long ACL form. If the ACL is NFSv4, the format
+of the text string shall be the compact form, unless the
+.Va ACL_TEXT_VERBOSE
+flag is given.
+.Pp
+The flags specified are formed by
+.Em or Ns 'ing
+the following values
+.Pp
+.Bl -column -offset 3n "ACL_TEXT_NUMERIC_IDS"
+.It ACL_TEXT_VERBOSE Format ACL using verbose form
+.It ACL_TEXT_NUMERIC_IDS Do not resolve IDs into user or group names
+.It ACL_TEXT_APPEND_ID In addition to user and group names, append numeric IDs
+.El
.Pp
This function allocates any memory necessary to contain the string and
returns a pointer to the string.
OpenPOWER on IntegriCloud