Home | History | Annotate | Line # | Download | only in libutil
util.3 revision 1.18.4.1
 $NetBSD: util.3,v 1.18.4.1 2009/05/13 19:18:37 jym Exp $

Copyright (c) 2001 The NetBSD Foundation, Inc.
All rights reserved.

This code is derived from software contributed to The NetBSD Foundation
by Gregory McGarry.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

.Dd November 17, 2008 .Dt UTIL 3 .Os .Sh NAME .Nm util .Nd system utilities library .Sh LIBRARY .Lb libutil .Sh DESCRIPTION The .Nm library is the system utilities library and contains various system-dependent utility routines used in a wide variety of system daemons. The abstracted functions are mostly related to pseudo-terminals and login accounting. These routines are .Nx Ns -specific and are not portable. Their use should be restricted. Declarations for these functions may be obtained from the include file

a \*[Lt]util.h\*[Gt] . .Sh LIST OF FUNCTIONS l -column ".Xr sockaddr_snprintf 3" -compact t Sy Name Description t Xr disklabel_dkcksum 3 Ta compute the checksum for a disklabel t Xr disklabel_scan 3 Ta scan a buffer for a valid disklabel t Xr forkpty 3 Ta tty utility function t Xr getbootfile 3 Ta get the name of the booted kernel file t Xr getlabeloffset 3 Ta get the sector number and offset of the disklabel t Xr getlabelsector 3 Ta get the sector number and offset of the disklabel t Xr getmaxpartitions 3 Ta get the maximum number of partitions allowed per disk t Xr getrawpartition 3 Ta get the system ``raw'' partition t Xr login 3 Ta login utility function t Xr login_cap 3 Ta query login.conf database about a user class t Xr login_close 3 Ta query login.conf database about a user class t Xr login_getcapbool 3 Ta query login.conf database about a user class t Xr login_getcapnum 3 Ta query login.conf database about a user class t Xr login_getcapsize 3 Ta query login.conf database about a user class t Xr login_getcapstr 3 Ta query login.conf database about a user class t Xr login_getcaptime 3 Ta query login.conf database about a user class t Xr login_getclass 3 Ta query login.conf database about a user class t Xr login_tty 3 Ta tty utility function t Xr loginx 3 Ta login utility function t Xr logout 3 Ta login utility function t Xr logoutx 3 Ta login utility function t Xr logwtmp 3 Ta login utility function t Xr logwtmpx 3 Ta login utility function t Xr opendisk 3 Ta open a disk partition t Xr openpty 3 Ta tty utility function t Xr pidfile 3 Ta write a daemon pid file t Xr pidlock 3 Ta locks based on files containing PIDs t Xr pw_abort 3 Ta passwd file update function t Xr pw_copy 3 Ta utility function for interactive passwd file updates t Xr pw_edit 3 Ta utility function for interactive passwd file updates t Xr pw_error 3 Ta utility function for interactive passwd file updates t Xr pw_getconf 3 Ta password encryption configuration access function t Xr pw_getprefix 3 Ta passwd file update function t Xr pw_init 3 Ta utility function for interactive passwd file updates t Xr pw_lock 3 Ta passwd file update function t Xr pw_mkdb 3 Ta passwd file update function t Xr pw_prompt 3 Ta utility function for interactive passwd file updates t Xr pw_scan 3 Ta utility function for interactive passwd file updates t Xr pw_setprefix 3 Ta passwd file update function t Xr secure_path 3 Ta determine if a file appears to be ``secure'' t Xr setclasscontext 3 Ta query login.conf database about a user class t Xr setusercontext 3 Ta query login.conf database about a user class t Xr snprintb 3 Ta bitmask output conversion t Xr sockaddr_snprintf 3 Ta socket address formatting function t Xr ttyaction 3 Ta ttyaction utility function t Xr ttylock 3 Ta locks based on files containing PIDs t Xr ttymsg 3 Ta ttymsg utility function t Xr ttyunlock 3 Ta locks based on files containing PIDs .El .Sh FILES l -tag -width /usr/lib/libutil_p.a -compact t Pa /usr/lib/libutil.a static util library t Pa /usr/lib/libutil.so dynamic util library t Pa /usr/lib/libutil_p.a static util library compiled for profiling .El .Sh SEE ALSO .Xr efun 3