mirror of
https://github.com/openbsd/src.git
synced 2026-04-27 07:36:50 +00:00
More precision regarding the openlog(3) *ident argument;
direction suggested by Laurence Tratt <laurie at tratt dot net>, part of the wording from deraadt@. While here, add the missing STANDARDS section, correct HISTORY, drop redundant verbiage from RETURN VALUES, and garbage collect .Tn. OK sthen@ jmc@ millert@ and Laurence Tratt, and deraadt@ likes one line of the patch in particular.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: syslog.3,v 1.35 2019/08/30 20:27:25 jmc Exp $
|
||||
.\" $OpenBSD: syslog.3,v 1.36 2020/02/05 12:35:19 schwarze Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1985, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@@ -27,7 +27,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd $Mdocdate: August 30 2019 $
|
||||
.Dd $Mdocdate: February 5 2020 $
|
||||
.Dt SYSLOG 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -216,12 +216,17 @@ and
|
||||
.Fn vsyslog .
|
||||
The parameter
|
||||
.Fa ident
|
||||
is a string that will be prepended to every message.
|
||||
points to a string that will be prepended to every message;
|
||||
its storage must persist until
|
||||
.Fn closelog
|
||||
or the corresponding
|
||||
.Fn closelog_r .
|
||||
If the content of the string is changed, behaviour is unspecified.
|
||||
.Pp
|
||||
The
|
||||
.Fa logopt
|
||||
argument
|
||||
is a bit field specifying logging options, which is formed by
|
||||
.Tn OR Ns 'ing
|
||||
is a bit field specifying logging options, which is formed by OR'ing
|
||||
one or more of the following values:
|
||||
.Bl -tag -width LOG_AUTHPRIV
|
||||
.It Dv LOG_CONS
|
||||
@@ -310,18 +315,6 @@ It takes an additional pointer to a
|
||||
.Fa syslog_data
|
||||
structure.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn closelog ,
|
||||
.Fn closelog_r ,
|
||||
.Fn openlog ,
|
||||
.Fn openlog_r ,
|
||||
.Fn syslog ,
|
||||
.Fn syslog_r ,
|
||||
.Fn vsyslog ,
|
||||
and
|
||||
.Fn vsyslog_r
|
||||
functions return no value.
|
||||
.Pp
|
||||
The routines
|
||||
.Fn setlogmask
|
||||
and
|
||||
@@ -349,11 +342,58 @@ syslog_r(LOG_INFO|LOG_LOCAL2, &sdata, "foobar error: %m");
|
||||
.Sh SEE ALSO
|
||||
.Xr logger 1 ,
|
||||
.Xr syslogd 8
|
||||
.Sh STANDARDS
|
||||
The functions
|
||||
.Fn syslog ,
|
||||
.Fn openlog ,
|
||||
.Fn closelog ,
|
||||
and
|
||||
.Fn setlogmask
|
||||
conform to the X/Open Systems Interfaces option of
|
||||
.St -p1003.1-2008 .
|
||||
.Pp
|
||||
The facilities
|
||||
.Dv LOG_AUTHPRIV ,
|
||||
.Dv LOG_FTP ,
|
||||
and
|
||||
.Dv LOG_SYSLOG ,
|
||||
the option
|
||||
.Dv LOG_PERROR ,
|
||||
and the macro
|
||||
.Fn LOG_UPTO
|
||||
are extensions to that standard.
|
||||
.Pp
|
||||
The standard option
|
||||
.Dv LOG_NOWAIT
|
||||
is deprecated in
|
||||
.Ox
|
||||
and has no effect.
|
||||
.Sh HISTORY
|
||||
These
|
||||
functions appeared in
|
||||
.Bx 4.2 .
|
||||
The reentrant functions appeared in
|
||||
The functions
|
||||
.Fn syslog ,
|
||||
.Fn openlog ,
|
||||
and
|
||||
.Fn closelog
|
||||
appeared in
|
||||
.Bx 4.2 ,
|
||||
.Fn setlogmask
|
||||
in
|
||||
.Bx 4.3 ,
|
||||
and
|
||||
.Fn vsyslog
|
||||
in
|
||||
.Bx 4.3 Net/1 .
|
||||
.Pp
|
||||
The functions
|
||||
.Fn syslog_r ,
|
||||
.Fn vsyslog_r ,
|
||||
.Fn openlog_r ,
|
||||
.Fn closelog_r ,
|
||||
and
|
||||
.Fn setlogmask_r
|
||||
appeared in
|
||||
.Bx 386 0.1
|
||||
and have been available since
|
||||
.Ox 3.1 .
|
||||
.Sh CAVEATS
|
||||
It is important never to pass a string with user-supplied data as a
|
||||
|
||||
Reference in New Issue
Block a user