summaryrefslogtreecommitdiff
path: root/usr/src/man/man3c/getutent.3c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-06-22 12:55:10 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-06-22 12:55:10 +0000
commit8bae72dc3f645da905eab5fe960867037f57bae0 (patch)
tree24dce03bc58aa36ef080558a440d351c2237d4db /usr/src/man/man3c/getutent.3c
parent766f41d1d95d047e65ac4942d66037ce7f924027 (diff)
parent01aaaf328842760a1002109b299908a027e94cf8 (diff)
downloadillumos-joyent-release-20160625.tar.gz
[illumos-gate merge]release-20160625
commit 01aaaf328842760a1002109b299908a027e94cf8 7051 want id_space(9F) docs commit c1de7575521deda5ee777b8054a9c5b12f15b1ee 7120 mDNS resync was not wsdiff safe commit 9c05409f2b9301e686735887a9573454cceb0331 7069 i386_XARCH should include -m32 commit 406fc5100dac8d225a315a6def6be8d628f34e24 6602 lofi should support labeled devices commit f3a07f941f1be263a48a040c059edbcb722cf436 4712 Prefer 'parsable' over 'parseable' in the manual pages commit 1b2031a95889aea96be6af55dcf31a0d5ffdfed9 7050 Prefer 'subcommand' over 'sub-command' in the manual pages commit 831b40b1c811223fd0b1131791a38e3ae5143377 7049 Prefer 'writable' over 'writeable' in the manual pages commit a716f1a92056bc2e231e57ae2a20725ce606ea73 7047 Fix spelling mistakes in sections 9E, 9F and 9S commit 95e15299a2c42b8014fa27631a6f3be2a93febc2 7048 Fix spelling mistakes in sections 7D, 7I, 7IPP, and 7P commit df23565fe1d0b225f9f898c50dfafea6749b0b7f 7046 Fix spelling mistakes in section 5 commit c855112f85cf71e42f6381a66f3f86f98e2ed24e 7045 Fix spelling mistakes in section 4 commit 843c398e8904ed9d833d2af3103894f909fb4b52 7042 Fix spelling mistakes in library sections commit 0db8de19c0e494758b68b702523a2b0eaffe3b2e 7044 Fix spelling mistakes in sections 1HAS and 2 commit df23d905b96680e56379c5a5ecb4b363f36b9e74 7041 Fix spelling mistakes in sections 1 and 1M commit 71af3be340c57171837478555e2eb0d496318cfc 7040 Detect common spelling errors in manual pages Conflicts: usr/src/uts/common/fs/vfs.c usr/src/man/man7d/cpuid.7d usr/src/man/man5/privileges.5 usr/src/man/man3c/signalfd.3c usr/src/cmd/lofiadm/main.c
Diffstat (limited to 'usr/src/man/man3c/getutent.3c')
-rw-r--r--usr/src/man/man3c/getutent.3c17
1 files changed, 2 insertions, 15 deletions
diff --git a/usr/src/man/man3c/getutent.3c b/usr/src/man/man3c/getutent.3c
index 7ca4d19939..76b25cec9c 100644
--- a/usr/src/man/man3c/getutent.3c
+++ b/usr/src/man/man3c/getutent.3c
@@ -3,7 +3,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH GETUTENT 3C "Oct 27, 1998"
+.TH GETUTENT 3C "April 9, 2016"
.SH NAME
getutent, getutid, getutline, pututline, setutent, endutent, utmpname \- user
accounting database functions
@@ -46,7 +46,6 @@ accounting database functions
.fi
.SH DESCRIPTION
-.sp
.LP
These functions provide access to the user accounting database, \fButmp\fR.
Entries in the database are described by the definitions and data structures in
@@ -81,13 +80,11 @@ short e_exit; /* exit status */
.in -2
.SS "\fBgetutent()\fR"
-.sp
.LP
The \fBgetutent()\fR function reads in the next entry from a \fButmp\fR
database. If the database is not already open, it opens it. If it reaches the
end of the database, it fails.
.SS "\fBgetutid()\fR"
-.sp
.LP
The \fBgetutid()\fR function searches forward from the current point in the
\fButmp\fR database until it finds an entry with a \fBut_type\fR matching
@@ -99,20 +96,18 @@ pointer to the first entry whose type is one of these four and whose
\fBut_id\fR member matches \fIid\fR->\fBut_id\fR. If the end of database is
reached without a match, it fails.
.SS "\fBgetutline()\fR"
-.sp
.LP
The \fBgetutline()\fR function searches forward from the current point in the
\fButmp\fR database until it finds an entry of the type \fBLOGIN_PROCESS\fR or
\fBut_line\fR string matching the \fIline\fR->\fBut_line\fR string. If the end
of database is reached without a match, it fails.
.SS "\fBpututline()\fR"
-.sp
.LP
The \fBpututline()\fR function writes the supplied \fButmp\fR structure into
the \fButmp\fR database. It uses \fBgetutid()\fR to search forward for the
proper place if it finds that it is not already at the proper place. It is
expected that normally the user of \fBpututline()\fR will have searched for the
-proper entry using one of the these functions. If so, \fBpututline()\fR will
+proper entry using one of these functions. If so, \fBpututline()\fR will
not search. If \fBpututline()\fR does not find a matching slot for the new
entry, it will add a new entry to the end of the database. It returns a
pointer to the \fButmp\fR structure. When called by a non-root user,
@@ -123,17 +118,14 @@ associated with the process; the \fBut_type\fR member must be either
\fBUSER_PROCESS\fR or \fBDEAD_PROCESS\fR; and the \fBut_line\fR member must be
a device special file and be writable by the user.
.SS "\fBsetutent()\fR"
-.sp
.LP
The \fBsetutent()\fR function resets the input stream to the beginning. This
reset should be done before each search for a new entry if it is desired that
the entire database be examined.
.SS "\fBendutent()\fR"
-.sp
.LP
The \fBendutent()\fR function closes the currently open database.
.SS "\fButmpname()\fR"
-.sp
.LP
The \fButmpname()\fR function allows the user to change the name of the
database file examined to another file. If the file does not exist, this will
@@ -141,14 +133,12 @@ not be apparent until the first attempt to reference the file is made. The
\fButmpname()\fR function does not open the file but closes the old file if it
is currently open and saves the new file name.
.SH RETURN VALUES
-.sp
.LP
A null pointer is returned upon failure to read, whether for permissions or
having reached the end of file, or upon failure to write. If the file name
given is longer than 79 characters, \fButmpname()\fR returns \fB0\fR.
Otherwise, it returns \fB1\fR.
.SH USAGE
-.sp
.LP
These functions use buffered standard I/O for input, but \fBpututline()\fR uses
an unbuffered non-standard write to avoid race conditions between processes
@@ -162,7 +152,6 @@ to fail if user accounting data cannot be represented properly in the
\fButmp\fR structure (for example, on a system where PIDs can exceed 32767).
Use the functions described on the \fBgetutxent\fR(3C) manual page instead.
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -178,11 +167,9 @@ MT-Level Unsafe
.TE
.SH SEE ALSO
-.sp
.LP
\fBgetutxent\fR(3C), \fBttyslot\fR(3C), \fButmpx\fR(4), \fBattributes\fR(5)
.SH NOTES
-.sp
.LP
The most current entry is saved in a static structure. Multiple accesses
require that it be copied before further accesses are made. On each call to