Date: Tue, 13 Jul 1999 16:48:33 -0600 From: Wes Peters <wes@softweyr.com> To: Greg Black <gjb-freebsd@gba.oz.au> Cc: FreeBSD Security <freebsd-security@FreeBSD.ORG> Subject: Re: Secure Deletion Message-ID: <378BC241.B73DB51@softweyr.com> References: <199906250212.WAA07810@cc942873-a.ewndsr1.nj.home.com> <3773F67A.CC9B6215@softweyr.com> <19990629131529.A61249@bitbox.follo.net> <378A58EA.ACF1412F@softweyr.com> <19990713121453.5557.qmail@alice.gba.oz.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Greg Black wrote: > > 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. Excellent suggestions. Roger Wilco. When I get it done, I'll stick it on my ftp server and post a message here, rather than emailing the source all over the planet. ;^0 -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC http://softweyr.com/ wes@softweyr.com 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?378BC241.B73DB51>