#: 10158 S12/OS9/68000 (OSK)
07-Apr-91 21:02:41
Sb: #file security help
Fm: Bob van der Poel 76510,2203
To: all
Help!!! I've run into a possible problem with a program I'm writing. The
program has a help function which uses a special ASCII file for displaying the
various screens. The first time the user access the help function the file is
opened for read and scanned. The locations of the various menus and their names
is stored in an in-memory buffer. Once this scan is complete the displays of
the various screens is very fast. The file is left open and the pointers are
retained for future accesses.
This works very well. As a matter of fact, other processes can also access the
file, and since everyone opens for READ-only there is no record locking to
worry about. The problem comes if someone (like me!) decides to make changes to
the file (like adding an additional screen) when the file is in use. Making
changes really fouls the pointers up for the other guy.
So: Can my program sense somehow that the file has been modified? Or, can I
flag the file someway so that it can't be opened for WRITE when it being used.
The only easy method I can see is to set the attributes to read only, forcing
the superuser to do some deliberate fiddling before making changes. Anyone got
any other ideas? What I need is something like the 'shareable' premission which
will let others read, but not write....
There is 1 Reply.
|