summaryrefslogtreecommitdiffstats
path: root/lib/libc/posix1e
diff options
context:
space:
mode:
authorchris <chris@FreeBSD.org>2002-11-06 17:34:29 +0000
committerchris <chris@FreeBSD.org>2002-11-06 17:34:29 +0000
commit1b738abdbf4e6de82aba539f298fffaa98958595 (patch)
tree400c9afb472d316401cedb7b0f604cc3961c8958 /lib/libc/posix1e
parent131fe3293a00e11ceabd9867d8d9c613939fc186 (diff)
downloadFreeBSD-src-1b738abdbf4e6de82aba539f298fffaa98958595.zip
FreeBSD-src-1b738abdbf4e6de82aba539f298fffaa98958595.tar.gz
o Update man page to reflect the new prototypes for mac_{to,from}_text.
o Remove a (currently) no-longer-pertinent entry from errors. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Labs
Diffstat (limited to 'lib/libc/posix1e')
-rw-r--r--lib/libc/posix1e/mac_text.358
1 files changed, 15 insertions, 43 deletions
diff --git a/lib/libc/posix1e/mac_text.3 b/lib/libc/posix1e/mac_text.3
index f46e675..f33d8c3 100644
--- a/lib/libc/posix1e/mac_text.3
+++ b/lib/libc/posix1e/mac_text.3
@@ -42,67 +42,39 @@
.Lb libc
.Sh SYNOPSIS
.In sys/mac.h
-.Ft mac_t
-.Fn mac_from_text "const char *text_p"
-.Ft "char *"
-.Fn mac_to_text "mac_t label" "size_t *len_p"
+.Ft int
+.Fn mac_from_text "mac_t *mac" "const char *text"
+.Ft int
+.Fn mac_to_text "mac_t label" "char **text"
.Sh DESCRIPTION
The
.Fn mac_from_text
function converts the text representation of a label
-into a
-.Vt mac_t ,
+into the internal policy label format
+.Vt ( mac_t )
+and places it in
+.Fa *mac ,
which must later be freed with
-.Xr mac_free .
+.Xr mac_free 3 .
+.Pp
The
.Fn mac_to_text
-function returns
-the text representation of
-.Fa label
-and sets
-.Fa *len_p
-to the length of the returned string.
+function allocates storage for
+.Fa *text ,
+which will be set to the text representation of
+.Fa label .
.Pp
Refer to
.Xr maclabel 7
for the MAC label format.
.Sh RETURN VALUES
-The
-.Fn mac_from_text
-function returns a valid
-.Vt mac_t
-equivalent to
-the MAC label described in
-.Fa text_p
-upon success, and
-.Dv NULL
-upon failure, setting
-.Va errno
-to indicate the error.
-.Pp
-The
-.Fn mac_to_text
-function returns a string
-containing the text representation of
-.Fa label
-upon success, and
-.Dv NULL
-upon failure, setting
-.Va errno
-to indicate the error.
+.Rv -std mac_from_text mac_to_text
.Sh COMPATIBILITY
POSIX.1e does not define
a text format for text representations
of MAC labels.
.Sh ERRORS
.Bl -tag -width Er
-.It Bq Er EINVAL
-An invalid policy or qualifier
-was specified in
-.Fa text_p ,
-or an invalid MAC label
-was specified in
-.Fa label .
.It Bq Er ENOMEM
Insufficient memory was available
to allocate internal storage.
OpenPOWER on IntegriCloud