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

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

 



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. If you don't then the permissions
are set based on the random values (eg the return address)

--
Fedora-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers

--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux