Subject: Re: time stamps on dump time to complete estimates?
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 08/26/2001 13:36:50
[ On Sunday, August 26, 2001 at 21:53:10 (+0930), Brett Lymn wrote: ]
> Subject: Re: time stamps on dump time to complete estimates?
>
> One thing that strikes me now is why is it necessary for me to mandate
> the timestamp format at all?  I should just have an environment
> variable that you can set the strftime format in and that will be used
> for the logging (default it to "%T %Z" or whatever) - using an env
> variable gives the user control over the log output which would be
> nice IMHO.

Dump does privileged operations (reading raw disk) and as such is
usually run by somewhat priviledged users, and even has privileges of
its own (set-gid 'tty').  Use of environment variables in unexpected
places can make it easier to trick said users into doing things they
don't intend to do when they execute such privileged programs,
especially if there's any possibility of there being bugs in the library
code that such programs might use to implement features controlled by
environment variables....

In other words don't make the operation of system programs depend
unnecessarily on the contents of any environment variables.

In this case I'd say just use ctime() and be done with it.  Even with
that there's the possibility of adverse external influence through
locales....

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>     <woods@robohack.ca>
Planix, Inc. <woods@planix.com>;   Secrets of the Weird <woods@weird.com>