|
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 23, 2002
|
|
rpm-build |
0a0c83 |
.Dt ACL_CHECK 3
|
|
rpm-build |
0a0c83 |
.Os "Linux ACL"
|
|
rpm-build |
0a0c83 |
.Sh NAME
|
|
rpm-build |
0a0c83 |
.Nm acl_check
|
|
rpm-build |
0a0c83 |
.Nd check an ACL for validity
|
|
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 int
|
|
rpm-build |
0a0c83 |
.Fn acl_check "acl_t acl" "int *last"
|
|
rpm-build |
0a0c83 |
.Sh DESCRIPTION
|
|
rpm-build |
0a0c83 |
The
|
|
rpm-build |
0a0c83 |
.Fn acl_check
|
|
rpm-build |
0a0c83 |
function checks the ACL referred to by the argument
|
|
rpm-build |
0a0c83 |
.Va acl
|
|
rpm-build |
0a0c83 |
for validity.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The three required entries ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER
|
|
rpm-build |
0a0c83 |
must exist exactly once in the ACL. If the ACL contains any ACL_USER or
|
|
rpm-build |
0a0c83 |
ACL_GROUP entries, then an ACL_MASK entry is also required. The ACL
|
|
rpm-build |
0a0c83 |
may contain at most one ACL_MASK entry.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The user identifiers must be unique among all entries of type ACL_USER.
|
|
rpm-build |
0a0c83 |
The group identifiers must be unique among all entries of type ACL_GROUP.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
If the ACL referred to by
|
|
rpm-build |
0a0c83 |
.Va acl
|
|
rpm-build |
0a0c83 |
is invalid,
|
|
rpm-build |
0a0c83 |
.Fn acl_check
|
|
rpm-build |
0a0c83 |
returns a positive error code that indicates which type of error was detected.
|
|
rpm-build |
0a0c83 |
The following symbolic error codes are defined:
|
|
rpm-build |
0a0c83 |
.Bl -tag -width ACL_DUPLICATE_ERROR.
|
|
rpm-build |
0a0c83 |
.It ACL_MULTI_ERROR
|
|
rpm-build |
0a0c83 |
The ACL contains multiple entries that have a tag type
|
|
rpm-build |
0a0c83 |
that may occur at most once.
|
|
rpm-build |
0a0c83 |
.It ACL_DUPLICATE_ERROR
|
|
rpm-build |
0a0c83 |
The ACL contains multiple ACL_USER entries with the same user ID, or
|
|
rpm-build |
0a0c83 |
multiple ACL_GROUP entries with the same group ID.
|
|
rpm-build |
0a0c83 |
.It ACL_MISS_ERROR
|
|
rpm-build |
0a0c83 |
A required entry is missing.
|
|
rpm-build |
0a0c83 |
.It ACL_ENTRY_ERROR
|
|
rpm-build |
0a0c83 |
The ACL contains an invalid entry tag type.
|
|
rpm-build |
0a0c83 |
.El
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
The
|
|
rpm-build |
0a0c83 |
.Fn acl_error
|
|
rpm-build |
0a0c83 |
function can be used to translate error codes to text messages.
|
|
rpm-build |
0a0c83 |
.Pp
|
|
rpm-build |
0a0c83 |
In addition, if the pointer
|
|
rpm-build |
0a0c83 |
.Va last
|
|
rpm-build |
0a0c83 |
is not
|
|
rpm-build |
0a0c83 |
.Li NULL ,
|
|
rpm-build |
0a0c83 |
.Fn acl_check
|
|
rpm-build |
0a0c83 |
assigns the number of the ACL entry at which the error was detected to
|
|
rpm-build |
0a0c83 |
the value pointed to by
|
|
rpm-build |
0a0c83 |
.Va last .
|
|
rpm-build |
0a0c83 |
Entries are numbered starting with zero, in the order in which they would be
|
|
rpm-build |
0a0c83 |
returned by the
|
|
rpm-build |
0a0c83 |
.Fn acl_get_entry
|
|
rpm-build |
0a0c83 |
function.
|
|
rpm-build |
0a0c83 |
.Sh RETURN VALUE
|
|
rpm-build |
0a0c83 |
If successful, the
|
|
rpm-build |
0a0c83 |
.Fn acl_check
|
|
rpm-build |
0a0c83 |
function returns
|
|
rpm-build |
0a0c83 |
.Li 0
|
|
rpm-build |
0a0c83 |
if the ACL referred to by
|
|
rpm-build |
0a0c83 |
.Va acl
|
|
rpm-build |
0a0c83 |
is valid, and a positive error code if the ACL is invalid. Otherwise, a
|
|
rpm-build |
0a0c83 |
value of
|
|
rpm-build |
0a0c83 |
.Li -1
|
|
rpm-build |
0a0c83 |
is returned and the global variable
|
|
rpm-build |
0a0c83 |
.Va errno
|
|
rpm-build |
0a0c83 |
is set to indicate the error.
|
|
rpm-build |
0a0c83 |
.Sh ERRORS
|
|
rpm-build |
0a0c83 |
If any of the following conditions occur, the
|
|
rpm-build |
0a0c83 |
.Fn acl_check
|
|
rpm-build |
0a0c83 |
function returns
|
|
rpm-build |
0a0c83 |
.Li -1
|
|
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 |
.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_valid 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 .
|