summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-02-22 08:32:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-02-22 08:32:53 +0000
commit5ca266fedb6fc7e30c563dbafff344ad0e153653 (patch)
tree2e1cd25f4441915ebc721853d2a5d9f3a569e2fe
parent2a807645a9d44cb3baa44a97284232c4621f80a0 (diff)
update to lite2 -- note restriction when securelevel > 0
-rw-r--r--lib/libc/sys/gettimeofday.216
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2
index b7a6936cbd2..b8348fa1b3f 100644
--- a/lib/libc/sys/gettimeofday.2
+++ b/lib/libc/sys/gettimeofday.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: gettimeofday.2,v 1.3 1997/01/15 05:27:55 millert Exp $
+.\" $OpenBSD: gettimeofday.2,v 1.4 1997/02/22 08:32:52 millert Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)gettimeofday.2 8.1 (Berkeley) 6/4/93
+.\" @(#)gettimeofday.2 8.2 (Berkeley) 5/26/95
.\"
-.Dd June 4, 1993
+.Dd May 26, 1995
.Dt GETTIMEOFDAY 2
.Os BSD 4
.Sh NAME
@@ -96,6 +96,14 @@ Daylight Saving time applies locally during
the appropriate part of the year.
.Pp
Only the super-user may set the time of day or time zone.
+If the system is running in secure mode (see
+.Xr init 8 ),
+the time may only be advanced.
+This limitation is imposed to prevent a malicious super-user
+from setting arbitrary time stamps on files.
+The system time can still be adjusted backwards using the
+.Xr adjtime 2
+system call even when the system is secure.
.Sh RETURN
A 0 return value indicates that the call succeeded.
A -1 return value indicates an error occurred, and in this
@@ -104,7 +112,7 @@ case an error code is stored into the global variable
.Sh ERRORS
The following error codes may be set in
.Va errno :
-.Bl -tag -width Er
+.Bl -tag -width [EFAULT]
.It Bq Er EFAULT
An argument address referenced invalid memory.
.It Bq Er EPERM