Blame man/man3/acl_to_any_text.3

rpm-build 0a0c83
.\" Access Control Lists manual pages
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" This is free documentation; you can redistribute it and/or
rpm-build 0a0c83
.\" modify it under the terms of the GNU General Public License as
rpm-build 0a0c83
.\" published by the Free Software Foundation; either version 2 of
rpm-build 0a0c83
.\" the License, or (at your option) any later version.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" The GNU General Public License's references to "object code"
rpm-build 0a0c83
.\" and "executables" are to be interpreted as the output of any
rpm-build 0a0c83
.\" document formatting or typesetting system, including
rpm-build 0a0c83
.\" intermediate and printed output.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" This manual is distributed in the hope that it will be useful,
rpm-build 0a0c83
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 0a0c83
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rpm-build 0a0c83
.\" GNU General Public License for more details.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.\" You should have received a copy of the GNU General Public
rpm-build 0a0c83
.\" License along with this manual.  If not, see
rpm-build 0a0c83
.\" <http://www.gnu.org/licenses/>.
rpm-build 0a0c83
.\"
rpm-build 0a0c83
.Dd March 25, 2002
rpm-build 0a0c83
.Dt ACL_TO_ANY_TEXT 3
rpm-build 0a0c83
.Os "Linux ACL"
rpm-build 0a0c83
.Sh NAME
rpm-build 0a0c83
.Nm acl_to_any_text
rpm-build 0a0c83
.Nd convert an ACL to text
rpm-build 0a0c83
.Sh LIBRARY
rpm-build 0a0c83
Linux Access Control Lists library (libacl, \-lacl).
rpm-build 0a0c83
.Sh SYNOPSIS
rpm-build 0a0c83
.In sys/types.h
rpm-build 0a0c83
.In acl/libacl.h
rpm-build 0a0c83
.Ft char *
rpm-build 0a0c83
.Fo acl_to_any_text
rpm-build 0a0c83
.Fa "acl_t acl"
rpm-build 0a0c83
.Fa "const char *prefix"
rpm-build 0a0c83
.Fa "char separator"
rpm-build 0a0c83
.Fa "int options"
rpm-build 0a0c83
.Fc
rpm-build 0a0c83
.Sh DESCRIPTION
rpm-build 0a0c83
The
rpm-build 0a0c83
.Fn acl_to_any_text
rpm-build 0a0c83
function translates the ACL pointed to by the argument
rpm-build 0a0c83
.Va acl
rpm-build 0a0c83
into a
rpm-build 0a0c83
.Li NULL
rpm-build 0a0c83
terminated character string. This character string
rpm-build 0a0c83
is composed of the ACL entries contained in
rpm-build 0a0c83
.Va acl ,
rpm-build 0a0c83
in the entry text format described on
rpm-build 0a0c83
.Xr acl 5 .
rpm-build 0a0c83
Entries are separated from each other by the
rpm-build 0a0c83
.Va separator
rpm-build 0a0c83
character. If the argument
rpm-build 0a0c83
.Va prefix
rpm-build 0a0c83
is not
rpm-build 0a0c83
.Li (const char *)NULL ,
rpm-build 0a0c83
each entry is prefixed by this character string.
rpm-build 0a0c83
.Pp
rpm-build 0a0c83
If the argument
rpm-build 0a0c83
.Va options
rpm-build 0a0c83
is
rpm-build 0a0c83
.Li 0 ,
rpm-build 0a0c83
ACL entries are converted using the entry tag type keywords
rpm-build 0a0c83
.Li user , group , mask ,
rpm-build 0a0c83
and
rpm-build 0a0c83
.Li other .
rpm-build 0a0c83
User IDs and group IDs of ACL entries that contain such
rpm-build 0a0c83
qualifiers are converted to their corresponding names; if an identifier
rpm-build 0a0c83
has no corresponding name, a decimal number string is produced. The
rpm-build 0a0c83
ACL text representation contains no additional comments.
rpm-build 0a0c83
A bitwise combinations of the following
rpm-build 0a0c83
.Va options
rpm-build 0a0c83
can be used to modify the result:
rpm-build 0a0c83
.Bl -tag
rpm-build 0a0c83
.It TEXT_ABBREVIATE
rpm-build 0a0c83
Instead of the full tag type keywords, single letter abbreviations are used.
rpm-build 0a0c83
The abbreviation for
rpm-build 0a0c83
.Li user
rpm-build 0a0c83
is
rpm-build 0a0c83
.Li u ,
rpm-build 0a0c83
the abbreviation for
rpm-build 0a0c83
.Li group
rpm-build 0a0c83
is
rpm-build 0a0c83
.Li g ,
rpm-build 0a0c83
the abbreviation for
rpm-build 0a0c83
.Li mask
rpm-build 0a0c83
is
rpm-build 0a0c83
.Li m ,
rpm-build 0a0c83
and the abbreviation for
rpm-build 0a0c83
.Li other
rpm-build 0a0c83
is
rpm-build 0a0c83
.Li o .
rpm-build 0a0c83
.It TEXT_NUMERIC_IDS
rpm-build 0a0c83
User IDs and group IDs are included as decimal numbers instead of names.
rpm-build 0a0c83
.It TEXT_SOME_EFFECTIVE
rpm-build 0a0c83
A comment containing the effective permissions of the ACL entry is
rpm-build 0a0c83
included after ACL entries that contain permissions which are ineffective
rpm-build 0a0c83
because they are masked by an ACL_MASK entry. The ACL entry and the comment
rpm-build 0a0c83
are separated by a tab character.
rpm-build 0a0c83
.It TEXT_ALL_EFFECTIVE
rpm-build 0a0c83
A comment containing the effective permissions of the ACL entry is
rpm-build 0a0c83
included after all ACL entries that are affected by an ACL_MASK entry.
rpm-build 0a0c83
The comment is included even if the permissions contained in the ACL
rpm-build 0a0c83
entry equal the effective permissions. The ACL entry and the comment are
rpm-build 0a0c83
separated by a tab character.
rpm-build 0a0c83
.It TEXT_SMART_INDENT
rpm-build 0a0c83
This option is used in combination with the TEXT_SOME_EFFECTIVE or
rpm-build 0a0c83
TEXT_ALL_EFFECTIVE option. The number of tab characters inserted between
rpm-build 0a0c83
the ACL entry and the comment is increased so that the comment is
rpm-build 0a0c83
aligned to the fourth tab stop position.
rpm-build 0a0c83
A tab width of 8 characters is assumed.
rpm-build 0a0c83
.El
rpm-build 0a0c83
.Pp
rpm-build 0a0c83
The ACL referred to by
rpm-build 0a0c83
.Va acl
rpm-build 0a0c83
is not changed.
rpm-build 0a0c83
.Pp
rpm-build 0a0c83
This function allocates any memory necessary to contain the string and
rpm-build 0a0c83
returns a pointer to the string.  The caller should free any releasable
rpm-build 0a0c83
memory, when the new string is no longer required, by calling
rpm-build 0a0c83
.Fn acl_free
rpm-build 0a0c83
with the
rpm-build 0a0c83
.Va (void*)char
rpm-build 0a0c83
returned by
rpm-build 0a0c83
.Fn acl_to_any_text
rpm-build 0a0c83
as an argument.
rpm-build 0a0c83
.Sh RETURN VALUE
rpm-build 0a0c83
On success, this function returns a pointer to the text
rpm-build 0a0c83
representation of the ACL.  On error, a value of
rpm-build 0a0c83
.Li (char *)NULL
rpm-build 0a0c83
is returned, and
rpm-build 0a0c83
.Va errno
rpm-build 0a0c83
is set appropriately.
rpm-build 0a0c83
.Sh ERRORS
rpm-build 0a0c83
If any of the following conditions occur, the
rpm-build 0a0c83
.Fn acl_to_any_text
rpm-build 0a0c83
function returns a value of
rpm-build 0a0c83
.Li (char *)NULL
rpm-build 0a0c83
and sets
rpm-build 0a0c83
.Va errno
rpm-build 0a0c83
to the corresponding value:
rpm-build 0a0c83
.Bl -tag -width Er
rpm-build 0a0c83
.It Bq Er EINVAL
rpm-build 0a0c83
The argument
rpm-build 0a0c83
.Va acl
rpm-build 0a0c83
is not a valid pointer to an ACL.
rpm-build 0a0c83
.Pp
rpm-build 0a0c83
The ACL referenced by
rpm-build 0a0c83
.Va acl
rpm-build 0a0c83
contains one or more improperly formed ACL entries, or for some other
rpm-build 0a0c83
reason cannot be translated into the text form of an ACL.
rpm-build 0a0c83
.It Bq Er ENOMEM
rpm-build 0a0c83
The character string to be returned requires more memory than is allowed
rpm-build 0a0c83
by the hardware or system-imposed memory management constraints.
rpm-build 0a0c83
.El
rpm-build 0a0c83
.Sh STANDARDS
rpm-build 0a0c83
This is a non-portable, Linux specific extension to the ACL manipulation
rpm-build 0a0c83
functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned).
rpm-build 0a0c83
.Sh SEE ALSO
rpm-build 0a0c83
.Xr acl_from_text 3 ,
rpm-build 0a0c83
.Xr acl_to_text 3 ,
rpm-build 0a0c83
.Xr acl_free 3 ,
rpm-build 0a0c83
.Xr acl 5
rpm-build 0a0c83
.Sh AUTHOR
rpm-build 0a0c83
Written by
rpm-build 0a0c83
.An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .