From: millert Date: Sat, 22 Feb 1997 08:32:52 +0000 (+0000) Subject: update to lite2 -- note restriction when securelevel > 0 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=784af091ae47544393ddbdd703189f8e2bee5430;p=openbsd update to lite2 -- note restriction when securelevel > 0 --- 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