Date: Mon, 14 Jan 2002 15:44:48 -0800 (PST) From: "D. McCullough" <freebsd@jovi.net> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/33904: secure mode bug Message-ID: <200201142344.g0ENimK91227@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 33904
>Category: kern
>Synopsis: secure mode bug
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 14 15:50:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: D. McCullough
>Release: FreeBSD 4.4-RELEASE
>Organization:
Jovi.Net, Inc.
>Environment:
FreeBSD diazepam.ai.mit.edu 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 20\
01 murray@builder.FreeBSD.org:/usr/src/sys/compile/GENERIC i386
>Description:
settimeofday silently fails in secure mode.
I wasted a lot of time baffled --
this makes all the various date
apps and clients silently fail.
>How-To-Repeat:
/* Here's C code to demo the bug,
settimeofday will report success
yet the time remains unchanged.*/
#include <stdio.h>
#include <sys/time.h>
static struct timeval t;
static struct timezone tz;
main ()
{
int r = gettimeofday(&t, &tz);
printf ("gettimeofday = %d; t = %ld.%06ld\n",
r, t.tv_sec, t.tv_usec);
r && exit (r);
t.tv_sec -= 3600;
r = settimeofday(&t, &tz);
printf ("settimeofday = %d; t = %ld.%06ld\n",
r, t.tv_sec, t.tv_usec);
r && exit (r);
r = gettimeofday(&t, &tz);
printf ("gettimeofday = %d; t = %ld.%06ld\n",
r, t.tv_sec, t.tv_usec);
return r;
}
>Fix:
When an operation prohibited by secure mode fails,
this failure must be accurately reported by the API.
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201142344.g0ENimK91227>
