diff options
author | 2019-01-18 05:03:42 +0000 | |
---|---|---|
committer | 2019-01-18 05:03:42 +0000 | |
commit | edff7b91a8e4c3ea7f21631f8dbea716ab1185a8 (patch) | |
tree | 4acfcfedfc27cd81b6781c3ff356a944c52b53a8 /lib/libc | |
parent | Add the -iter and -pbkdf2 argumenst to enc (diff) | |
download | wireguard-openbsd-edff7b91a8e4c3ea7f21631f8dbea716ab1185a8.tar.xz wireguard-openbsd-edff7b91a8e4c3ea7f21631f8dbea716ab1185a8.zip |
adjtime(2), settimeofday(2), clock_settime(2): validate input
Add documentation for the new EINVAL cases for adjtime(2) and
settimeofday(2).
adjtime.2 docs ok schwarze@,
settimeofday(2)/clock_settime(2) stuff ok tedu@,
"stop waiting" deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/adjtime.2 | 11 | ||||
-rw-r--r-- | lib/libc/sys/gettimeofday.2 | 10 |
2 files changed, 15 insertions, 6 deletions
diff --git a/lib/libc/sys/adjtime.2 b/lib/libc/sys/adjtime.2 index ce638760c5b..91d0370025c 100644 --- a/lib/libc/sys/adjtime.2 +++ b/lib/libc/sys/adjtime.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: adjtime.2,v 1.22 2015/09/10 17:55:21 schwarze Exp $ +.\" $OpenBSD: adjtime.2,v 1.23 2019/01/18 05:03:42 cheloha Exp $ .\" $NetBSD: adjtime.2,v 1.5 1995/10/12 15:40:44 jtc Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)adjtime.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: September 10 2015 $ +.Dd $Mdocdate: January 18 2019 $ .Dt ADJTIME 2 .Os .Sh NAME @@ -87,9 +87,14 @@ will fail if: .Bl -tag -width Er .It Bq Er EFAULT Either of the arguments point outside the process's allocated address space. +.It Bq Er EINVAL +The +.Fa delta +argument is non-null and specifies a microsecond value less than zero or +greater than or equal to 1 million. .It Bq Er EPERM The -.Fn delta +.Fa delta argument is non-null and the process's effective user ID is not that of the superuser. .El diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2 index 81b27561e23..3f32e7b6fbf 100644 --- a/lib/libc/sys/gettimeofday.2 +++ b/lib/libc/sys/gettimeofday.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gettimeofday.2,v 1.29 2015/09/10 17:55:21 schwarze Exp $ +.\" $OpenBSD: gettimeofday.2,v 1.30 2019/01/18 05:03:42 cheloha Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)gettimeofday.2 8.2 (Berkeley) 5/26/95 .\" -.Dd $Mdocdate: September 10 2015 $ +.Dd $Mdocdate: January 18 2019 $ .Dt GETTIMEOFDAY 2 .Os .Sh NAME @@ -118,8 +118,12 @@ An argument address referenced invalid memory. .Pp In addition, .Fn settimeofday -may return the following error: +may return the following errors: .Bl -tag -width Er +.It Bq Er EINVAL +.Fa tp +specified a microsecond value less than zero or greater than or equal to +1 million. .It Bq Er EPERM A user other than the superuser attempted to set the time. .El |