diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2020-02-05 12:35:20 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2020-02-05 12:35:20 +0000 |
commit | 7ee8a86ef2c29b32fa3ee164c0ea48e6eee7075d (patch) | |
tree | 692f24c270b98b4aef52e4096bfe880e78f8ba4c | |
parent | 482177a92f1b8f15e54d5a7286ecf9b1af433149 (diff) |
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.
-rw-r--r-- | lib/libc/gen/syslog.3 | 82 |
1 files changed, 61 insertions, 21 deletions
diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3 index 11203bf1553..a6d48715dc9 100644 --- a/lib/libc/gen/syslog.3 +++ b/lib/libc/gen/syslog.3 @@ -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 |