Subject: lib/34218: settimeofday(2) causes date(1) command to han
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <mattjfleming@googlemail.com>
List: netbsd-bugs
Date: 08/16/2006 19:15:01
>Number: 34218
>Category: lib
>Synopsis: settimeofday(2) causes date(1) command to han
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 16 19:15:00 +0000 2006
>Originator: Matt Fleming
>Release: NetBSD 4.99.1
>Organization:
>Environment:
NetBSD arkanian.console-pimps.org 4.99.1 NetBSD 4.99.1 (DEBUG) #3: Fri Aug 11 15:19:50 GMT 2006 matt@arkanian.console-pimps.org:/src/netbsd-current/src/sys/arch/amd64/compile/DEBUG amd64
>Description:
Whilst writing a regression test-suite for further kauth(9) work I
stumbled across this bug.
When the securelevel is set to 2 and the superuser tries to set the
time backwards (which should fail: Operation not permitted) the 'date'
program hangs.
The revisions where this bug appeared are:
src/lib/libc/sys/settimeofday.c rev 1.3
src/sys/kern/kern_time.c rev 1.29
If there's any more information you think I should include, please let me know.
>How-To-Repeat:
sysctl -w kern.securelevel=2
date <a date in the past>
The program will hang
>Fix: