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

Oliver Falk oliver at linux-kernel.at
Thu Aug 16 19:47:35 UTC 2007


Jon Ciesla schrieb:
>> On Wed, 15 Aug 2007 20:56:10 -0400, Steve Dickson <SteveD at redhat.com>
>> wrote:
>>
>>> *** invalid open64 call: O_CREAT without mode ***:
>>> /home/src/fc/nfs-utils/devel/nfs-utils-1.1.0/utils/exportfs/exportfs
>>> terminated
>> Enabling such checks in Rawhide is the way we do things. For example,
>> I saw applications failing with:
>>
>> ***MEMORY-WARNING***: [3894]: GSlice: g_thread_init() must be called
>> before all other GLib functions; memory corruption due to late invocation
>> of g_thread_init()
>>
>> There is simply nothing unusual or unexpected about it.
>>
>>> - if ((fd = open(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT))) < 0) {
>>> + if ((fd = (open)(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT))) < 0) {
>> Now you're just being unfriendly about it by finding ways to defeat
>> a helpful check instead of adding the missing mode. What point are
>> you trying to prove by doing this?
> 
> What would the preferred fix look like?  I'd like to get this sorted out,
> as I'd like to send a patch for one of my affected packages upstream.

Preferred? Simply pass a mode - see man 2 open:

       int open(const char *pathname, int flags, mode_t mode);

if ((fd = open(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT), 0022)) < 0) {

For example...

-of




More information about the Fedora-maintainers mailing list