Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 1999 22:14:52 +1000
From:      Greg Black <gjb-freebsd@gba.oz.au>
To:        Wes Peters <wes@softweyr.com>
Cc:        FreeBSD Security <freebsd-security@FreeBSD.ORG>
Subject:   Re: Secure Deletion 
Message-ID:  <19990713121453.5557.qmail@alice.gba.oz.au>
In-Reply-To: <378A58EA.ACF1412F@softweyr.com>  of Mon, 12 Jul 1999 15:06:50 CST
References:  <199906250212.WAA07810@cc942873-a.ewndsr1.nj.home.com>  <3773F67A.CC9B6215@softweyr.com>  <19990629131529.A61249@bitbox.follo.net>  <378A58EA.ACF1412F@softweyr.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Wes Peters writes:

> Here's the source for the new, improved
> version if anyone wants to test it themselves.
> 
> Unless anyone has strenuous objections, I'll make this into a port and
> commit it (as soon as I learn how to make a port).

There are two things that would be good to change:

Throughout, -1 is used as an error return value and that is
eventually used as the program's exit value if any error
occurs.  Those -1 values should be changed to +1, at least for
the final exit value.  This is required for many reasons which I
won't rehash here.

If the open() fails, it might be due to read-only permissions.
It would be good to attempt a chmod() to make it writeable and
retry the open() before bailing out, perhaps controlled by a -f
flag as used by programs like rm(1).  It's possible to check the
reason for the open() failure and to look at the mode of the
file to verify its permissions before attempting the chmod(),
although that seems superfluous here.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990713121453.5557.qmail>