xref: /freebsd/lib/libc/posix1e/acl_get_qualifier.3 (revision 4bf60dfaf85eb5bcbf5c08ad39ff3e4328e55807)
14bf60dfaSChris D. Faulhaber.\"-
24bf60dfaSChris D. Faulhaber.\" Copyright (c) 2001 Chris D. Faulhaber
34bf60dfaSChris D. Faulhaber.\" All rights reserved.
44bf60dfaSChris D. Faulhaber.\"
54bf60dfaSChris D. Faulhaber.\" Redistribution and use in source and binary forms, with or without
64bf60dfaSChris D. Faulhaber.\" modification, are permitted provided that the following conditions
74bf60dfaSChris D. Faulhaber.\" are met:
84bf60dfaSChris D. Faulhaber.\" 1. Redistributions of source code must retain the above copyright
94bf60dfaSChris D. Faulhaber.\"    notice, this list of conditions and the following disclaimer.
104bf60dfaSChris D. Faulhaber.\" 2. Redistributions in binary form must reproduce the above copyright
114bf60dfaSChris D. Faulhaber.\"    notice, this list of conditions and the following disclaimer in the
124bf60dfaSChris D. Faulhaber.\"    documentation and/or other materials provided with the distribution.
134bf60dfaSChris D. Faulhaber.\"
144bf60dfaSChris D. Faulhaber.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
154bf60dfaSChris D. Faulhaber.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
164bf60dfaSChris D. Faulhaber.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
174bf60dfaSChris D. Faulhaber.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
184bf60dfaSChris D. Faulhaber.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
194bf60dfaSChris D. Faulhaber.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
204bf60dfaSChris D. Faulhaber.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
214bf60dfaSChris D. Faulhaber.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
224bf60dfaSChris D. Faulhaber.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
234bf60dfaSChris D. Faulhaber.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
244bf60dfaSChris D. Faulhaber.\" POSSIBILITY OF SUCH DAMAGE.
254bf60dfaSChris D. Faulhaber.\"
264bf60dfaSChris D. Faulhaber.\" $FreeBSD$
274bf60dfaSChris D. Faulhaber.\"
284bf60dfaSChris D. Faulhaber.Dd March 13, 2001
294bf60dfaSChris D. Faulhaber.Dt ACL_GET_QUALIFIER 3
304bf60dfaSChris D. Faulhaber.Os
314bf60dfaSChris D. Faulhaber.Sh NAME
324bf60dfaSChris D. Faulhaber.Nm acl_get_qualifier
334bf60dfaSChris D. Faulhaber.Nd Retrieve the qualifier from an ACL entry
344bf60dfaSChris D. Faulhaber.Sh LIBRARY
354bf60dfaSChris D. Faulhaber.Lb libposix1e
364bf60dfaSChris D. Faulhaber.Sh SYNOPSIS
374bf60dfaSChris D. Faulhaber.Fd #include <sys/types.h>
384bf60dfaSChris D. Faulhaber.Fd #include <sys/acl.h>
394bf60dfaSChris D. Faulhaber.Ft int
404bf60dfaSChris D. Faulhaber.Fn acl_get_qualifier "acl_entry_t entry_d"
414bf60dfaSChris D. Faulhaber.Sh DESCRIPTION
424bf60dfaSChris D. Faulhaber.Fn acl_get_qualifier
434bf60dfaSChris D. Faulhaberis a POSIX.1e call that retrieves the qualifier of the tag for
444bf60dfaSChris D. Faulhaberthe ACL entry indicated by the argument
454bf60dfaSChris D. Faulhaber.Ar entry_d
464bf60dfaSChris D. Faulhaberinto working storage and returns a pointer to that storage.
474bf60dfaSChris D. Faulhaber.Pp
484bf60dfaSChris D. FaulhaberIf the value of the tag type in the ACL entry referred to by
494bf60dfaSChris D. Faulhaber.Ar entry_d
504bf60dfaSChris D. Faulhaberis ACL_USER, then the value returned by
514bf60dfaSChris D. Faulhaber.Fn acl_get_qualifier
524bf60dfaSChris D. Faulhaberwill be a pointer to type uid_t.
534bf60dfaSChris D. Faulhaber.Pp
544bf60dfaSChris D. FaulhaberIf the value of the tag type in
554bf60dfaSChris D. Faulhaberthe ACL entry referred to by
564bf60dfaSChris D. Faulhaber.Ar entry_d
574bf60dfaSChris D. Faulhaberis ACL_GROUP, then the value returned by
584bf60dfaSChris D. Faulhaber.Fn acl_get_qualifier
594bf60dfaSChris D. Faulhaberwill be a pointer to type gid_t.
604bf60dfaSChris D. Faulhaber.Pp
614bf60dfaSChris D. FaulhaberIf the value of the tag type in the ACL enty referred to by
624bf60dfaSChris D. Faulhaber.Ar entry_d
634bf60dfaSChris D. Faulhaberis ACL_UNDEFINED_TAG, ACL_USER_OBJ, ACL_GROUP_OBJ, ACL_OTHER,
644bf60dfaSChris D. FaulhaberACL_MASK, or an implementation-defined value for which a qualifier
654bf60dfaSChris D. Faulhaberis not supported, then
664bf60dfaSChris D. Faulhaber.Fn acl_get_qualifier
674bf60dfaSChris D. Faulhaberwill return a valid of (void *)NULL and the function will fail.
684bf60dfaSChris D. Faulhaber.Pp
694bf60dfaSChris D. FaulhaberThis function may cause memory to be allocated.  The caller should
704bf60dfaSChris D. Faulhaberfree any releasable memory, when the new qualifier is no longer
714bf60dfaSChris D. Faulhaberrequired, by calling
724bf60dfaSChris D. Faulhaber.Fn acl_free
734bf60dfaSChris D. Faulhaberwith void* as the argument.
744bf60dfaSChris D. Faulhaber.Sh RETURN VALUES
754bf60dfaSChris D. FaulhaberUpon successful completion, the function will return a value of
764bf60dfaSChris D. Faulhaber.Va 0 .
774bf60dfaSChris D. FaulhaberOtherwise, a value of
784bf60dfaSChris D. Faulhaber.Va -1
794bf60dfaSChris D. Faulhaberwill be returned, and
804bf60dfaSChris D. Faulhaber.Va errno
814bf60dfaSChris D. Faulhaberwill be set to indicate the error.
824bf60dfaSChris D. Faulhaber.Sh ERRORS
834bf60dfaSChris D. FaulhaberIf any of the following conditions occur, the
844bf60dfaSChris D. Faulhaber.Fn acl_get_qualifier
854bf60dfaSChris D. Faulhaberfunction will return a value of
864bf60dfaSChris D. Faulhaber.Va (void *)NULL
874bf60dfaSChris D. Faulhaberand set
884bf60dfaSChris D. Faulhaber.Va errno
894bf60dfaSChris D. Faulhaberto the corresponding value:
904bf60dfaSChris D. Faulhaber.Bl -tag -width Er
914bf60dfaSChris D. Faulhaber.It Bq Er EINVAL
924bf60dfaSChris D. FaulhaberArgument
934bf60dfaSChris D. Faulhaber.Ar entry_d
944bf60dfaSChris D. Faulhaberdoes not point to a valid descriptor for an ACL entry.  The
954bf60dfaSChris D. Faulhabervalue of the tag type in the ACL entry referenced by argument
964bf60dfaSChris D. Faulhaber.Ar entry_d
974bf60dfaSChris D. Faulhaberis not ACL_USER or ACL_GROUP.
984bf60dfaSChris D. Faulhaber.It Bq Er ENOMEM
994bf60dfaSChris D. FaulhaberThe value to be returned requires more memory than is allowed
1004bf60dfaSChris D. Faulhaberby the hardware or system-imposed memory management constraints.
1014bf60dfaSChris D. Faulhaber.El
1024bf60dfaSChris D. Faulhaber.Sh SEE ALSO
1034bf60dfaSChris D. Faulhaber.Xr acl 3 ,
1044bf60dfaSChris D. Faulhaber.Xr acl_create_entry 3 ,
1054bf60dfaSChris D. Faulhaber.Xr acl_free 3 ,
1064bf60dfaSChris D. Faulhaber.Xr acl_get_entry 3 ,
1074bf60dfaSChris D. Faulhaber.Xr acl_get_tag_type 3 ,
1084bf60dfaSChris D. Faulhaber.Xr acl_set_qualifier 3 ,
1094bf60dfaSChris D. Faulhaber.Xr acl_set_tag_type 3 ,
1104bf60dfaSChris D. Faulhaber.Xr posix1e 3
1114bf60dfaSChris D. Faulhaber.Sh STANDARDS
1124bf60dfaSChris D. FaulhaberPOSIX.1e is described in IEEE POSIX.1e draft 17.
1134bf60dfaSChris D. Faulhaber.Sh HISTORY
1144bf60dfaSChris D. FaulhaberPOSIX.1e support was introduced in
1154bf60dfaSChris D. Faulhaber.Fx 4.0 .
1164bf60dfaSChris D. FaulhaberThe
1174bf60dfaSChris D. Faulhaber.Fn acl_get_qualifier
1184bf60dfaSChris D. Faulhaberfunction was added in
1194bf60dfaSChris D. Faulhaber.Fx 5.0 .
1204bf60dfaSChris D. Faulhaber.Sh AUTHORS
1214bf60dfaSChris D. FaulhaberThe
1224bf60dfaSChris D. Faulhaber.Fn acl_get_qualifier
1234bf60dfaSChris D. Faulhaberfunction was written by
1244bf60dfaSChris D. Faulhaber.An Chris D. Faulhaber Aq jedgar@fxp.org .
125