xref: /freebsd/share/man/man9/uidinfo.9 (revision f16b3c0de48d0b845357e7cca843f645bc3117e3)
14772483cSRuslan Ermilov.\"
24772483cSRuslan Ermilov.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
34772483cSRuslan Ermilov.\"
44772483cSRuslan Ermilov.\" Redistribution and use in source and binary forms, with or without
54772483cSRuslan Ermilov.\" modification, are permitted provided that the following conditions
64772483cSRuslan Ermilov.\" are met:
74772483cSRuslan Ermilov.\" 1. Redistributions of source code must retain the above copyright
84772483cSRuslan Ermilov.\"    notice(s), this list of conditions and the following disclaimer as
94772483cSRuslan Ermilov.\"    the first lines of this file unmodified other than the possible
104772483cSRuslan Ermilov.\"    addition of one or more copyright notices.
114772483cSRuslan Ermilov.\" 2. Redistributions in binary form must reproduce the above copyright
124772483cSRuslan Ermilov.\"    notice(s), this list of conditions and the following disclaimer in the
134772483cSRuslan Ermilov.\"    documentation and/or other materials provided with the distribution.
144772483cSRuslan Ermilov.\"
154772483cSRuslan Ermilov.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
164772483cSRuslan Ermilov.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
174772483cSRuslan Ermilov.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
184772483cSRuslan Ermilov.\" DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
194772483cSRuslan Ermilov.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
204772483cSRuslan Ermilov.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
214772483cSRuslan Ermilov.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
224772483cSRuslan Ermilov.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
234772483cSRuslan Ermilov.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
244772483cSRuslan Ermilov.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
254772483cSRuslan Ermilov.\" DAMAGE.
264772483cSRuslan Ermilov.\"
274772483cSRuslan Ermilov.\" $FreeBSD$
284772483cSRuslan Ermilov.\"
294772483cSRuslan Ermilov.Dd July 10, 2001
304772483cSRuslan Ermilov.Dt UIDINFO 9
314772483cSRuslan Ermilov.Os
324772483cSRuslan Ermilov.Sh NAME
334772483cSRuslan Ermilov.Nm uidinfo ,
344772483cSRuslan Ermilov.Nm uihashinit ,
354772483cSRuslan Ermilov.Nm uifind ,
364772483cSRuslan Ermilov.Nm uihold ,
374772483cSRuslan Ermilov.Nm uifree
384772483cSRuslan Ermilov.Nd "functions for managing UID information"
394772483cSRuslan Ermilov.Sh SYNOPSIS
404772483cSRuslan Ermilov.In sys/param.h
41f16b3c0dSChad David.In sys/proc.h
424772483cSRuslan Ermilov.In sys/resourcevar.h
434772483cSRuslan Ermilov.Ft void
444772483cSRuslan Ermilov.Fn uihashinit void
454772483cSRuslan Ermilov.Ft "struct uidinfo *"
464772483cSRuslan Ermilov.Fn uifind "uid_t uid"
474772483cSRuslan Ermilov.Ft void
484772483cSRuslan Ermilov.Fn uihold "struct uidinfo *uip"
494772483cSRuslan Ermilov.Ft void
504772483cSRuslan Ermilov.Fn uifree "struct uidinfo *uip"
514772483cSRuslan Ermilov.Sh DESCRIPTION
524772483cSRuslan ErmilovThe
534772483cSRuslan Ermilov.Nm
544772483cSRuslan Ermilovfamily of functions
554772483cSRuslan Ermilovis used to manage
564772483cSRuslan Ermilov.Vt uidinfo
574772483cSRuslan Ermilovstructures.
584772483cSRuslan ErmilovThe
594772483cSRuslan Ermilov.Vt uidinfo
604772483cSRuslan Ermilovstructure maintains the process count and socket buffer space usage
614772483cSRuslan Ermilovfor a given UID.
624772483cSRuslan Ermilov.Pp
634772483cSRuslan ErmilovThe
644772483cSRuslan Ermilov.Fn uihashinit
654772483cSRuslan Ermilovfunction initializes the
664772483cSRuslan Ermilov.Vt uidinfo
674772483cSRuslan Ermilovhash table.
684772483cSRuslan ErmilovThis function should only be called during system initialization.
694772483cSRuslan Ermilov.Pp
704772483cSRuslan ErmilovThe
714772483cSRuslan Ermilov.Fn uifind
724772483cSRuslan Ermilovfunction looks up and returns the
734772483cSRuslan Ermilov.Vt uidinfo
744772483cSRuslan Ermilovstructure for the
754772483cSRuslan Ermilov.Fa uid .
764772483cSRuslan ErmilovIf the
774772483cSRuslan Ermilov.Vt uidinfo
784772483cSRuslan Ermilovis not found, a new structure is allocated.
794772483cSRuslan Ermilov.Pp
804772483cSRuslan ErmilovThe
814772483cSRuslan Ermilov.Fn uihold
824772483cSRuslan Ermilovfunction increases the reference count on the
834772483cSRuslan Ermilov.Vt uidinfo
844772483cSRuslan Ermilovstructure.
854772483cSRuslan Ermilov.Pp
864772483cSRuslan ErmilovThe
874772483cSRuslan Ermilov.Fn uifree
884772483cSRuslan Ermilovfunction decreases the reference count on the
894772483cSRuslan Ermilov.Vt uidinfo
904772483cSRuslan Ermilovstructure.
914772483cSRuslan ErmilovIf the count reaches 0, the storage for the structure is freed.
924772483cSRuslan Ermilov.Sh RETURN VALUES
934772483cSRuslan ErmilovThe functions that return values all return a pointer to a
944772483cSRuslan Ermilov.Vt uidinfo
954772483cSRuslan Ermilovstructure.
964772483cSRuslan Ermilov.Sh AUTHORS
974772483cSRuslan ErmilovThis man page was written by
984772483cSRuslan Ermilov.An Chad David Aq davidc@acns.ab.ca .
99