[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: The open() system call in f8 really broken...

Alan Cox wrote:
On Wed, Aug 15, 2007 at 08:56:10PM -0400, Steve Dickson wrote:
and the following change stops the error:

- if ((fd = open(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT))) < 0) {
+ if ((fd = (open)(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT))) < 0) {
          xlog(L_WARNING, "could not open %s for locking", fname);
          return -1;

Which does not change the fact I'm using O_CREAT w/out a mode
So what is the point of killing the process???

Now If I'm not mistaken, its been legal since the 70s to use
O_CREAT without a mode because (depending on the OS) the mode
of parent directory will be used (or something similar)...

Sorry ignore the previous email I misunderstood what was going on.

You can open a file O_CREAT with neither read or write, you can open a file
with O_CREAT|O_WRONLY but not give permissions in the file mode. You must
provide the third argument so the abort is right.
This is were I disagree because a presidents has been set (for
a large number of years) that this is *not* an abort-able offense.

Now if we want to change the rules to make things like this
an abort-able offense... that's fine... I'm all for cleaning
up dangerous code... But lets change these rules in a less
disruptive way...

Bring down servers, costing people time and money because apps
that have run for years suddenly abort is just not the right
way to handle this.. imho..

Give people a chance to correct their code, with stern warnings,
and then, in the next release, have the applications abort...
Why is this such a bad idea?

Also how is the going to fly in the RHEL world? Alan, your
a master word smith, I truly do enjoy the way you use your
words (as long as you don't use them against me of course ;-) ),
but even you I think would have a hard time selling the reason
why 90% of Disney's rendering applications just abort
because we changed the rules (or presidents)...

Personally I think is going to be major pr nightmare and
it does not have to be if handled correctly... because
in the end we are doing the right thing, but we just
have to do it the right way...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]