-.\" $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.
.\" 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
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
.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