Re: close(status=delete) on a missing file
From: Dr Chaos (mbkennelSPAMBEGONE_at_NOSPAMyahoo.com)
Date: 07/17/04
- Next message: Gary L. Scott: "Re: close(status=delete) on a missing file"
- Previous message: James Giles: "Re: close(status=delete) on a missing file"
- In reply to: James Giles: "Re: close(status=delete) on a missing file"
- Next in thread: Gary L. Scott: "Re: close(status=delete) on a missing file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 17 Jul 2004 00:30:45 +0000 (UTC)
James Giles <jamesgiles@worldnet.att.net> wrote:
> Gary L. Scott wrote:
>> James Giles wrote:
> ...
>>> Not quite. There are reasons that you might want to really
>>> delete the file (remove it with extreme prejudice). If you
>>> discover that there's sensitive material in a file that you
>>> inadvertently made publically available, for example.
>>> Is it your position that, having beat your delete attempt
>>> with an open statement by a few milliseconds, an intruder
>>> now deserves the few minutes undisturbed to actually
>>> read all the data?
>>>
>>
>> This depends on operating system ownership settings. Some OS' allow a
>> particular user to "modify" content but not delete, change attributes,
>> etc. While I'd like to have full control, I think that is unlikely to
>> ever be part of Fortran. A particular Fortran application is normally
>> likely to assume the security attributes of the user that initiated it
>> and so would not be able to override those settings. An error
>> indication should be sufficient. There may truly be a security issue,
>> but the application that caused the security issue might not be the
>> "owner" of the file and may not have the right to delete it per
>> operating system file attribute settings.
>
>
> That's a completely different issue and not at all what was being
> discussed. If the program containing close with status="delete"
> doesn't have the appropriate privilege, the attempt should fail
> whether there's another program using the file or not, whether
> the file system uses inodes or not, whether the moon's over his
> left shoulder or not, etc. In this case, the attempt to delete the
> file should fail, the file should continue to exist, and the program
> should receive (or be able to receive) some indication of that
> fact.
>
> The point I was making is that any attempt to delete a file that
> *does* have the appropriate privilege should not appear to
> work and yet leave the file in existence. The file *should* be
> gone afterwards.
On Unix, from the point of view of the Fortran I/O and computational
model, OPEN(unit=?), CLOSE(unit=?), etc won't it be true
that the file is no longer in existence?
>From Fortran's point of view, anything IT put in there is now gone.
Dealing further with more operating-system specific semantics,
e.g. "look for all processes which have any of these inodes open
to files with no directory entry" should probably be done with
OS-specific programs, and under Unix that usually means C.
> If not, there should be some indication of why.
> There should also be a more aggressive form of delete that can't
> be blocked no matter who else is using the file.
OK. What would happen to the other processes, would they then
get some kind of I/O error (just as if you popped out a floppy
disc)?
> If you genuinely
> have privilege to delete (or modify, or anything else) you ought
> to have the ability to do so.
> --
> J. Giles
- Next message: Gary L. Scott: "Re: close(status=delete) on a missing file"
- Previous message: James Giles: "Re: close(status=delete) on a missing file"
- In reply to: James Giles: "Re: close(status=delete) on a missing file"
- Next in thread: Gary L. Scott: "Re: close(status=delete) on a missing file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|