Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!convex!ndm20!tp From: tp@ndm20 Newsgroups: net.sources.bugs Subject: Re: What happens during an unlink(2 Message-ID: <900001@ndm20> Date: Sat, 24-May-86 09:17:00 EDT Article-I.D.: ndm20.900001 Posted: Sat May 24 09:17:00 1986 Date-Received: Tue, 27-May-86 07:24:49 EDT References: <341@adiron.UUCP> Lines: 14 Nf-ID: #R:adiron.UUCP:341:ndm20:900001:37777777600:896 Nf-From: ndm20!tp May 24 08:17:00 1986 The problem of zeroing a file no longer in use is tricky in unix because the user has no way to delete a file. rm simply unlinks it, i.e. removes it from a directory. Others have mentioned that this does not imply that there are no other links, and indeed in order to rm a file, you do not need any permission to read or write it, since an rm is a function applied to the containing directory and not the file itself. What is needed is code in the kernel to zero a file after the last link is removed. The kernel implicitly deletes a file with no links. This is the only time the zeroing could take place. Of course systems not worried about security wouldn't want the overhead. Maybe this should be a configuration parameter. Of course it would be nice if it were filesystem dependent, then you wouldn't have to have the overhead on "non-secure" file systems.