Discussion:
OPEN glitch?
(too old to reply)
Everett M. Greene
2007-05-06 14:42:05 UTC
Permalink
Has anyone encountered the glitch where using DOS Open()
with mode MODE_NEWFILE causes random protection bits to
be set if a new file is created? Most of the time, one
gets the expected "rwed" but sometimes seemingly random
values are assigned.
Thomas Richter
2007-05-09 16:56:04 UTC
Permalink
Post by Everett M. Greene
Has anyone encountered the glitch where using DOS Open()
with mode MODE_NEWFILE causes random protection bits to
be set if a new file is created? Most of the time, one
gets the expected "rwed" but sometimes seemingly random
values are assigned.
If so, then the filing system you are using is defunct. It is not
the matter of the dos.library Open() function to set them, but
of the underlying filing system. Unfortunately, it is not precisely
defined what should happen if an already existing file gets
overwritten with MODE_NEWFILE, some filing systems preserve
the old protection bits, others install the default. But no
matter what, the result should clearly not be random.

FFS 34.xxx had a bug on directory protection bits IIRC.

So long,
Thomas
Everett M. Greene
2007-05-11 02:29:17 UTC
Permalink
Post by Thomas Richter
Post by Everett M. Greene
Has anyone encountered the glitch where using DOS Open()
with mode MODE_NEWFILE causes random protection bits to
be set if a new file is created? Most of the time, one
gets the expected "rwed" but sometimes seemingly random
values are assigned.
If so, then the filing system you are using is defunct. It is not
the matter of the dos.library Open() function to set them, but
of the underlying filing system. Unfortunately, it is not precisely
defined what should happen if an already existing file gets
overwritten with MODE_NEWFILE, some filing systems preserve
the old protection bits, others install the default. But no
matter what, the result should clearly not be random.
FFS 34.xxx had a bug on directory protection bits IIRC.
Thanks for the info. I believe I may have found the
problem in the application programming -- setting the
file protection bits with a variable that has never been
assigned a value in some cases. The jury's still out
though in that it seems the protection bits should be
all zeroes if nothing else has been prescribed anywhere.
Etienne Vogt
2007-05-20 15:14:39 UTC
Permalink
Post by Thomas Richter
FFS 34.xxx had a bug on directory protection bits IIRC.
Not really a problem though as the Amiga FFS has always ignored protection
bits other than delete on directories.
--
Etienne Vogt.
Continue reading on narkive:
Loading...