New sentence, new line. From Robert Elz.
This commit is contained in:
parent
bb7657559b
commit
27adb020b8
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: fparseln.3,v 1.9 2002/02/07 07:00:52 ross Exp $
|
||||
.\" $NetBSD: fparseln.3,v 1.10 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997 Christos Zoulas. All rights reserved.
|
||||
.\"
|
||||
@ -50,8 +50,8 @@ returns a pointer to the next logical line from the stream referenced by
|
||||
.Fa stream .
|
||||
This string is
|
||||
.Dv NUL
|
||||
terminated and it is dynamicaly allocated on each invocation. It is the
|
||||
responsibility of the caller to free the pointer.
|
||||
terminated and it is dynamicaly allocated on each invocation.
|
||||
It is the responsibility of the caller to free the pointer.
|
||||
.Pp
|
||||
By default, if a character is escaped, both it and the preceding escape
|
||||
character will be present in the returned string.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getbootfile.3,v 1.3 2002/02/07 07:00:52 ross Exp $
|
||||
.\" $NetBSD: getbootfile.3,v 1.4 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -49,8 +49,8 @@
|
||||
.Sh DESCRIPTION
|
||||
.Fn getbootfile
|
||||
returns a static pointer to the full path name of the file from which
|
||||
the current kernel was loaded. If it can not be determined, or the
|
||||
file is not ``secure'' (see
|
||||
the current kernel was loaded.
|
||||
If it can not be determined, or the file is not ``secure'' (see
|
||||
.Xr secure_path 3 ) ,
|
||||
.Dv _PATH_UNIX
|
||||
from
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: login_cap.3,v 1.11 2002/07/10 14:37:17 yamt Exp $
|
||||
.\" $NetBSD: login_cap.3,v 1.12 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996,1997 Berkeley Software Design, Inc. All rights reserved.
|
||||
.\"
|
||||
@ -109,8 +109,8 @@ and
|
||||
.Fn login_getcaptime
|
||||
functions all query the database entry for a field named
|
||||
.Ar cap .
|
||||
If the field is found, its value is returned. If the field is not
|
||||
found, the value specified by
|
||||
If the field is found, its value is returned.
|
||||
If the field is not found, the value specified by
|
||||
.Ar def
|
||||
is returned.
|
||||
If an error is encountered while trying to find the field,
|
||||
@ -121,7 +121,8 @@ See
|
||||
for a discussion of the various textual forms the value may take.
|
||||
The
|
||||
.Fn login_getcapbool
|
||||
function is slightly different. It returns
|
||||
function is slightly different.
|
||||
It returns
|
||||
.Ar def
|
||||
if no capabilities were found for this class (typically meaning that
|
||||
the default class was used and the
|
||||
@ -145,7 +146,8 @@ Only the
|
||||
.Dv LOGIN_SETRESOURCES ,
|
||||
and
|
||||
.Dv LOGIN_SETUMASK
|
||||
bits are used. (See
|
||||
bits are used.
|
||||
(See
|
||||
.Fn setusercontext
|
||||
below).
|
||||
It returns 0 on success and -1 on failure.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: openpty.3,v 1.8 2002/05/30 01:42:58 simonb Exp $
|
||||
.\" $NetBSD: openpty.3,v 1.9 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -104,12 +104,13 @@ function combines
|
||||
.Fn fork ,
|
||||
and
|
||||
.Fn login_tty
|
||||
to creates a new process operating in a pseudo-tty. The file
|
||||
descriptor of the master side of the pseudo-tty is returned in
|
||||
to creates a new process operating in a pseudo-tty.
|
||||
The file descriptor of the master side of the pseudo-tty is returned in
|
||||
.Fa amaster ,
|
||||
and the filename of the slave in
|
||||
.Fa name
|
||||
if it is non-null. The
|
||||
if it is non-null.
|
||||
The
|
||||
.Fa termp
|
||||
and
|
||||
.Fa winp
|
||||
@ -123,7 +124,8 @@ or
|
||||
.Fn forkpty
|
||||
is not successful, -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error. Otherwise,
|
||||
is set to indicate the error.
|
||||
Otherwise,
|
||||
.Fn openpty ,
|
||||
.Fn login_tty ,
|
||||
and the child process of
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pidfile.3,v 1.7 2002/05/22 10:22:41 wiz Exp $
|
||||
.\" $NetBSD: pidfile.3,v 1.8 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -50,7 +50,8 @@
|
||||
.Fn pidfile
|
||||
writes a file containing the process ID of the program to the
|
||||
.Pa /var/run
|
||||
directory. The file name has the form
|
||||
directory.
|
||||
The file name has the form
|
||||
.Pa /var/run/basename.pid .
|
||||
If the
|
||||
.Ar basename
|
||||
@ -59,9 +60,9 @@ argument is NULL,
|
||||
will determine the program name and use that instead.
|
||||
.Pp
|
||||
The pid file can be used as a quick reference if
|
||||
the process needs to be sent a signal. When the program exits,
|
||||
the pid file will be removed automatically, unless the program
|
||||
receives a fatal signal.
|
||||
the process needs to be sent a signal.
|
||||
When the program exits, the pid file will be removed automatically, unless
|
||||
the program receives a fatal signal.
|
||||
.Pp
|
||||
Note that only the first invocation of
|
||||
.Nm
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pidlock.3,v 1.4 2002/02/07 07:00:52 ross Exp $
|
||||
.\" $NetBSD: pidlock.3,v 1.5 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright 1996, 1997 by Curt Sampson <cjs@netbsd.org>
|
||||
.\"
|
||||
@ -45,36 +45,41 @@ The
|
||||
and
|
||||
.Fn ttyunlock
|
||||
functions attempt to create a lockfile for an arbitrary resource that
|
||||
only one program may hold at a time. (In the case of
|
||||
only one program may hold at a time.
|
||||
(In the case of
|
||||
.Fn ttylock ,
|
||||
this is access to a tty device.) If the
|
||||
this is access to a tty device.)
|
||||
If the
|
||||
function succeeds in creating the lockfile, it will succeed for
|
||||
no other program calling it with the same lockfile until the original
|
||||
calling program has removed the lockfile or exited. The
|
||||
calling program has removed the lockfile or exited.
|
||||
The
|
||||
.Fn ttyunlock
|
||||
function will remove the lockfile created by
|
||||
.Fn ttylock .
|
||||
.Pp
|
||||
These functions use the method of creating a lockfile traditionally
|
||||
used by UUCP software. This is described as follows in the
|
||||
documentation for Taylor UUCP:
|
||||
used by UUCP software.
|
||||
This is described as follows in the documentation for Taylor UUCP:
|
||||
.Bd -filled -offset indent
|
||||
The lock file normally contains the process ID of the locking
|
||||
process. This makes it easy to determine whether a lock is still
|
||||
valid. The algorithm is to create a temporary file and then link
|
||||
it to the name that must be locked. If the link fails because a
|
||||
file with that name already exists, the existing file is read to
|
||||
get the process ID. If the process still exists, the lock attempt
|
||||
fails. Otherwise the lock file is deleted and the locking algorithm
|
||||
The lock file normally contains the process ID of the locking process.
|
||||
This makes it easy to determine whether a lock is still valid.
|
||||
The algorithm is to create a temporary file and then link
|
||||
it to the name that must be locked.
|
||||
If the link fails because a file with that name already exists,
|
||||
the existing file is read to get the process ID.
|
||||
If the process still exists, the lock attempt fails.
|
||||
Otherwise the lock file is deleted and the locking algorithm
|
||||
is retried.
|
||||
.Ed
|
||||
.Pp
|
||||
The PID is stored in ASCII format, with leading spaces to pad it
|
||||
out to ten characters, and a terminating newline. This
|
||||
implementation has been extended to put the hostname
|
||||
out to ten characters, and a terminating newline.
|
||||
This implementation has been extended to put the hostname
|
||||
on the second line of the file, terminated with a newline, and
|
||||
optionally an arbitrary comment on the third line of the file, also
|
||||
terminated with a newline. If a comment is given, but
|
||||
terminated with a newline.
|
||||
If a comment is given, but
|
||||
.Dv PIDLOCK_NONBLOCK
|
||||
is not, a blank line will be written as the second line of the file.
|
||||
.Pp
|
||||
@ -82,7 +87,8 @@ The
|
||||
.Fn pidlock
|
||||
function will attempt to create the file
|
||||
.Fa lockfile
|
||||
and put the current process's pid in it. The
|
||||
and put the current process's pid in it.
|
||||
The
|
||||
.Fn ttylock
|
||||
function will do the same, but should be passed only the base name
|
||||
(with no leading directory prefix) of the tty to be locked; it will
|
||||
@ -102,14 +108,16 @@ The following flags may be passed in
|
||||
.Bl -tag -width Dv -offset indent
|
||||
.It Dv PIDLOCK_NONBLOCK
|
||||
The function should return immediately when a lock is held by another
|
||||
active process. Otherwise the function will wait (forever, if necessary)
|
||||
active process.
|
||||
Otherwise the function will wait (forever, if necessary)
|
||||
for the lock to be freed.
|
||||
.It Dv PIDLOCK_USEHOSTNAME
|
||||
The hostname should be compared against the hostname in the second
|
||||
line of the file (if present), and if they differ, no attempt at
|
||||
checking for a living process holding the lock will be made, and
|
||||
the lockfile will never be deleted. (The process is assumed to be
|
||||
alive.) This is used for locking on NFS or other remote filesystems.
|
||||
the lockfile will never be deleted.
|
||||
(The process is assumed to be alive.)
|
||||
This is used for locking on NFS or other remote filesystems.
|
||||
(The function will never create a lock if
|
||||
.Dv PIDLOCK_USEHOSTNAME
|
||||
is specified and no hostname is present.)
|
||||
@ -138,7 +146,8 @@ returns a failure:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EPERM
|
||||
The current process does not have some of the privileges necessary
|
||||
to perform the lock. These include read and write access to the lock
|
||||
to perform the lock.
|
||||
These include read and write access to the lock
|
||||
directory, and read access to the current lockfile, if it exists.
|
||||
.It Bq Er ENOENT
|
||||
A component of a specified pathname did not exist, or the pathname
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pw_getconf.3,v 1.5 2002/02/07 07:00:52 ross Exp $
|
||||
.\" $NetBSD: pw_getconf.3,v 1.6 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
|
||||
.\" All rights reserved.
|
||||
@ -59,11 +59,13 @@ an empty string will be returned in data.
|
||||
.Pp
|
||||
To retrieve default values the key
|
||||
.Pa default
|
||||
can be used. In this case, if
|
||||
can be used.
|
||||
In this case, if
|
||||
.Pa /etc/passwd.conf
|
||||
does not exist or does not contain a
|
||||
.Pa default
|
||||
section, the built-in defaults will be returned. They are as follows:
|
||||
section, the built-in defaults will be returned.
|
||||
They are as follows:
|
||||
.Bl -column localcipher data -offset indent
|
||||
.It Sy option data
|
||||
.It ypcipher old
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pw_init.3,v 1.9 2002/09/26 11:47:35 wennmach Exp $
|
||||
.\" $NetBSD: pw_init.3,v 1.10 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -65,9 +65,9 @@
|
||||
.Fn pw_error "const char *name" "int err" "int eval"
|
||||
.Sh DESCRIPTION
|
||||
These functions are designed as conveniences for interactive programs
|
||||
which update the passwd file and do nothing else. They generally
|
||||
handle errors by printing out a message to the standard error stream
|
||||
and possibly aborting the process.
|
||||
which update the passwd file and do nothing else.
|
||||
They generally handle errors by printing out a message to the standard error
|
||||
stream and possibly aborting the process.
|
||||
.Pp
|
||||
The
|
||||
.Fn pw_init
|
||||
@ -86,7 +86,8 @@ if EDITOR is not set) on the file
|
||||
.Pa /etc/ptmp
|
||||
if
|
||||
.Fa filename
|
||||
is NULL). If
|
||||
is NULL).
|
||||
If
|
||||
.Fa notsetuid
|
||||
is nonzero,
|
||||
.Fn pw_edit
|
||||
@ -114,7 +115,8 @@ If
|
||||
is not NULL, it checks to make sure the old entry is the same as
|
||||
the one described in
|
||||
.Fa old_pw
|
||||
or the process is aborted. If an entry is not found to match
|
||||
or the process is aborted.
|
||||
If an entry is not found to match
|
||||
.Fa pw ,
|
||||
a new entry is appended to the passwd file only if the real user
|
||||
ID is 0.
|
||||
@ -173,7 +175,8 @@ is empty.
|
||||
The
|
||||
.Fn pw_error
|
||||
function displays an error message, aborts the current passwd update,
|
||||
and exits the current process. If
|
||||
and exits the current process.
|
||||
If
|
||||
.Fa err
|
||||
is non-zero, a warning message beginning with
|
||||
.Fa name
|
||||
@ -186,7 +189,8 @@ The
|
||||
.Fn pw_scan
|
||||
function prints a warning message and returns 0 if the string in the
|
||||
.Fa bp
|
||||
argument is not a valid passwd string. Otherwise,
|
||||
argument is not a valid passwd string.
|
||||
Otherwise,
|
||||
.Fn pw_scan
|
||||
returns 1.
|
||||
.Sh FILES
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pw_lock.3,v 1.9 2002/08/06 12:58:45 wiz Exp $
|
||||
.\" $NetBSD: pw_lock.3,v 1.10 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -73,13 +73,15 @@ The
|
||||
.Fn pw_lock
|
||||
function attempts to lock the passwd database by creating the file
|
||||
.Pa /etc/ptmp ,
|
||||
and returns the file descriptor of that file. If
|
||||
and returns the file descriptor of that file.
|
||||
If
|
||||
.Fa retries
|
||||
is greater than zero,
|
||||
.Fn pw_lock
|
||||
will try multiple times to open
|
||||
.Pa /etc/ptmp ,
|
||||
waiting one second between tries. In addition to being a lock file,
|
||||
waiting one second between tries.
|
||||
In addition to being a lock file,
|
||||
.Pa /etc/ptmp
|
||||
will also hold the contents of the new passwd file.
|
||||
.Pp
|
||||
@ -95,10 +97,12 @@ If
|
||||
.Fn pw_mkdb
|
||||
fails and you do not wish to retry, you should make sure to call
|
||||
.Fn pw_abort
|
||||
to clean up the lock file. If the
|
||||
to clean up the lock file.
|
||||
If the
|
||||
.Ar username
|
||||
argument is not NULL, only database entries pertaining to the specified user
|
||||
will be modified. If the
|
||||
will be modified.
|
||||
If the
|
||||
.Ar secureonly
|
||||
argument is non-zero, only the secure database will be updated.
|
||||
.Pp
|
||||
@ -110,13 +114,14 @@ The passwd database remains unchanged.
|
||||
.Pp
|
||||
The
|
||||
.Fn pw_setprefix
|
||||
function defines the root directory used for passwd file updates. If
|
||||
the prefix is set to
|
||||
function defines the root directory used for passwd file updates.
|
||||
If the prefix is set to
|
||||
.Pa /newroot
|
||||
.Fn pw_lock
|
||||
will operate on
|
||||
.Pa /newroot/etc/ptmp
|
||||
afterwards. The default prefix is an empty string.
|
||||
afterwards.
|
||||
The default prefix is an empty string.
|
||||
.Pp
|
||||
The
|
||||
.Fn pw_getprefix
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: secure_path.3,v 1.7 2002/02/07 07:00:52 ross Exp $
|
||||
.\" $NetBSD: secure_path.3,v 1.8 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996,1997 Berkeley Software Design, Inc. All rights reserved.
|
||||
.\"
|
||||
@ -49,7 +49,8 @@ The
|
||||
.Fn secure_path
|
||||
function takes a path name and returns zero if the referenced file is
|
||||
.Dq secure ,
|
||||
non-zero if not. Any
|
||||
non-zero if not.
|
||||
Any
|
||||
.Dq insecurity ,
|
||||
other than failure to access
|
||||
the referenced file, will be logged to the system log.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: snprintb.3,v 1.1 2002/09/20 21:10:10 christos Exp $
|
||||
.\" $NetBSD: snprintb.3,v 1.2 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -98,7 +98,7 @@ The
|
||||
.Fn snprintb
|
||||
function returns the number of characters that are required to format the
|
||||
value
|
||||
.Fa val
|
||||
.Fa val
|
||||
given the format string
|
||||
.Fa fmt
|
||||
excluding the terminating NUL.
|
||||
@ -135,7 +135,8 @@ format string for the kernel
|
||||
.Fn printf
|
||||
function in
|
||||
.Nx 1.5
|
||||
and earlier releases. It got implemented as
|
||||
and earlier releases.
|
||||
It got implemented as
|
||||
.Fn bitmap_snprintf
|
||||
for
|
||||
.Nx 1.6
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ttyaction.3,v 1.9 2002/02/07 07:00:52 ross Exp $
|
||||
.\" $NetBSD: ttyaction.3,v 1.10 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -66,14 +66,16 @@ file for any records that match the current
|
||||
.Fa ttyname
|
||||
and
|
||||
.Fa action
|
||||
parameters, and for each matching record, runs the shell command
|
||||
shown in that record. The record format is described in
|
||||
parameters, and for each matching record,
|
||||
runs the shell command shown in that record.
|
||||
The record format is described in
|
||||
.Xr ttyaction 5 .
|
||||
The parameter
|
||||
.Fa username
|
||||
is the name of the new owner of the
|
||||
.Fa ttyname
|
||||
device. Note that the
|
||||
device.
|
||||
Note that the
|
||||
.Fa ttyname
|
||||
parameter may be passed as a fully qualified pathname, and the
|
||||
.Fn ttyaction
|
||||
@ -101,7 +103,8 @@ Ty Sarna \*[Lt]tsarna@endicor.com\*[Gt]
|
||||
There should be some
|
||||
.Em other
|
||||
mechanism to allow selection of different access control policies
|
||||
on a per-line basis. It has been suggested that the same
|
||||
on a per-line basis.
|
||||
It has been suggested that the same
|
||||
.Nm ttyaction
|
||||
mechanism should also be used for determining access control, but
|
||||
it was decided (after much discussion) that
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ttymsg.3,v 1.8 2002/02/20 11:34:42 wiz Exp $
|
||||
.\" $NetBSD: ttymsg.3,v 1.9 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -60,7 +60,8 @@ seconds.
|
||||
.Sh RETURN VALUES
|
||||
.Fn ttymsg
|
||||
returns a pointer to an error string on unexpected
|
||||
error; the string is not newline-terminated. Various "normal" errors are
|
||||
error; the string is not newline-terminated.
|
||||
Various "normal" errors are
|
||||
ignored (exclusive-use, lack of permission, etc.).
|
||||
.Sh SEE ALSO
|
||||
.Xr writev 2
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: util.3,v 1.9 2002/08/22 17:24:11 abs Exp $
|
||||
.\" $NetBSD: util.3,v 1.10 2002/10/01 19:36:30 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -46,12 +46,14 @@
|
||||
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
|
||||
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
|
||||
and are not portable.
|
||||
Their use should be restricted.
|
||||
Declarations for these functions may be obtained from the include file
|
||||
.Pa \*[Lt]util.h\*[Gt] .
|
||||
.Sh LIST OF FUNCTIONS
|
||||
.sp 2
|
||||
|
Loading…
Reference in New Issue
Block a user