From owner-freebsd-bugs Mon Jan 14 15:50: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 455C537B41A for ; Mon, 14 Jan 2002 15:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0ENo1Y91730; Mon, 14 Jan 2002 15:50:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8D3EB37B41E for ; Mon, 14 Jan 2002 15:44:48 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0ENimK91227; Mon, 14 Jan 2002 15:44:48 -0800 (PST) (envelope-from nobody) Message-Id: <200201142344.g0ENimK91227@freefall.freebsd.org> Date: Mon, 14 Jan 2002 15:44:48 -0800 (PST) From: "D. McCullough" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/33904: secure mode bug Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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 #include 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