2008-04-30 17:10:46 +04:00
|
|
|
.\" $NetBSD: util.3,v 1.15 2008/04/30 13:10:52 martin Exp $
|
2001-11-23 09:20:37 +03:00
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
2002-12-22 05:19:15 +03:00
|
|
|
.Dd December 22, 2002
|
2001-11-23 09:20:37 +03:00
|
|
|
.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
|
2002-10-01 23:36:30 +04:00
|
|
|
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
|
2001-11-23 11:18:41 +03:00
|
|
|
.Nx Ns -specific
|
2002-10-01 23:36:30 +04:00
|
|
|
and are not portable.
|
|
|
|
Their use should be restricted.
|
|
|
|
Declarations for these functions may be obtained from the include file
|
2002-02-07 10:00:09 +03:00
|
|
|
.Pa \*[Lt]util.h\*[Gt] .
|
2001-11-23 09:20:37 +03:00
|
|
|
.Sh LIST OF FUNCTIONS
|
|
|
|
.sp 2
|
|
|
|
.nf
|
|
|
|
.ta \w'getmaxpartitions.3'u+2n +\w'get the maximum number of partitions allowed per disk'u
|
|
|
|
\fIName/Page\fP \fIDescription\fP
|
|
|
|
.ta \w'getmaxpartitions.3'u+2n +\w'get the maximum number of partitions allowed per disk'u+6nC
|
|
|
|
.sp 5p
|
2002-12-22 05:19:15 +03:00
|
|
|
disklabel_dkcksum.3 compute the checksum for a disklabel
|
2002-10-13 00:53:15 +04:00
|
|
|
disklabel_scan.3 scan a buffer for a valid disklabel
|
2001-11-23 09:20:37 +03:00
|
|
|
forkpty.3 tty utility function
|
|
|
|
getbootfile.3 get the name of the booted kernel file
|
2002-12-22 05:19:15 +03:00
|
|
|
getlabeloffset.3 get the sector number and offset of the disklabel
|
|
|
|
getlabelsector.3 get the sector number and offset of the disklabel
|
2001-11-23 09:20:37 +03:00
|
|
|
getmaxpartitions.3 get the maximum number of partitions allowed per disk
|
|
|
|
getrawpartition.3 get the system ``raw'' partition
|
|
|
|
login.3 login utility function
|
2002-12-22 05:19:15 +03:00
|
|
|
login_cap.3 query login.conf database about a user class
|
2001-11-23 09:20:37 +03:00
|
|
|
login_close.3 query login.conf database about a user class
|
|
|
|
login_getcapbool.3 query login.conf database about a user class
|
|
|
|
login_getcapnum.3 query login.conf database about a user class
|
|
|
|
login_getcapsize.3 query login.conf database about a user class
|
|
|
|
login_getcapstr.3 query login.conf database about a user class
|
|
|
|
login_getcaptime.3 query login.conf database about a user class
|
|
|
|
login_getclass.3 query login.conf database about a user class
|
|
|
|
login_tty.3 tty utility function
|
2002-12-22 05:19:15 +03:00
|
|
|
loginx.3 login utility function
|
2001-11-23 09:20:37 +03:00
|
|
|
logout.3 login utility function
|
2002-12-22 05:19:15 +03:00
|
|
|
logoutx.3 login utility function
|
2001-11-23 09:20:37 +03:00
|
|
|
logwtmp.3 login utility function
|
2002-12-22 05:19:15 +03:00
|
|
|
logwtmpx.3 login utility function
|
|
|
|
opendisk.3 open a disk partition
|
2001-11-23 09:20:37 +03:00
|
|
|
openpty.3 tty utility function
|
|
|
|
pidfile.3 write a daemon pid file
|
|
|
|
pidlock.3 locks based on files containing PIDs
|
|
|
|
pw_abort.3 passwd file update function
|
|
|
|
pw_copy.3 utility function for interactive passwd file updates
|
2001-12-07 08:24:28 +03:00
|
|
|
pw_edit.3 utility function for interactive passwd file updates
|
|
|
|
pw_error.3 utility function for interactive passwd file updates
|
2001-12-07 12:31:34 +03:00
|
|
|
pw_getconf.3 password encryption configuration access function
|
2001-11-23 09:20:37 +03:00
|
|
|
pw_getprefix.3 passwd file update function
|
2001-12-07 08:24:28 +03:00
|
|
|
pw_init.3 utility function for interactive passwd file updates
|
2001-11-23 09:20:37 +03:00
|
|
|
pw_lock.3 passwd file update function
|
|
|
|
pw_mkdb.3 passwd file update function
|
2001-12-07 08:24:28 +03:00
|
|
|
pw_prompt.3 utility function for interactive passwd file updates
|
|
|
|
pw_scan.3 utility function for interactive passwd file updates
|
2001-11-23 09:20:37 +03:00
|
|
|
pw_setprefix.3 passwd file update function
|
|
|
|
secure_path.3 determine if a file appears to be ``secure''
|
|
|
|
setclasscontext.3 query login.conf database about a user class
|
|
|
|
setusercontext.3 query login.conf database about a user class
|
2002-12-22 05:19:15 +03:00
|
|
|
snprintb.3 bitmask output conversion
|
2004-11-20 06:06:09 +03:00
|
|
|
sockaddr_snprintf.3 socket address formatting function
|
2001-11-23 09:20:37 +03:00
|
|
|
ttyaction.3 ttyaction utility function
|
|
|
|
ttylock.3 locks based on files containing PIDs
|
|
|
|
ttymsg.3 ttymsg utility function
|
|
|
|
ttyunlock.3 locks based on files containing PIDs
|
|
|
|
.fi
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /usr/lib/libutil_p.a -compact
|
|
|
|
.It Pa /usr/lib/libutil.a
|
|
|
|
static util library
|
|
|
|
.It Pa /usr/lib/libutil.so
|
|
|
|
dynamic util library
|
|
|
|
.It Pa /usr/lib/libutil_p.a
|
|
|
|
static util library compiled for profiling
|
|
|
|
.El
|