Bug 330971 - /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared ...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kdemultimedia (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-13 17:24 EDT by Rex Dieter
Modified: 2012-04-25 03:10 EDT (History)
2 users (show)

See Also:
Fixed In Version: kde-3.5.9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-04 17:47:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rex Dieter 2007-10-13 17:24:25 EDT
I'm seeing this error trying to build kdemultimedia on rawhide:

/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared
with attribute error: open with O_CREAT in second

I can provide a detailed build log if needed.

I'll try building w/o -Wp,-D_FORTIFY_SOURCE=2 until this is resolved.
Comment 1 Jakub Jelinek 2007-10-13 17:39:31 EDT
Please don't.  I haven't found a recent kdemultimedia build in koji, can you
post a few lines around this error line?  Recent rawhide GCCs should print there
also the context, which function called this open, and that's where most
probably is a bug - open ("...", O_CREAT | O_RDWR) without third argument
is invalid.
Comment 2 Rex Dieter 2007-10-13 17:52:23 EDT
OK.

Full context:

In function 'int open(const char*, int, ...)',
    inlined from 'RawWriter_impl::RawWriter_impl()' at extrastereo_impl.cc:93,
    inlined from 'virtual Arts::Object_skel*
RawWriter_impl_Factory::createInstance()' at extrastereo_impl.cc:150:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared
with attribute error: open with O_CREAT in 
second argument needs 3 arguments
make[4]: *** [libartseffects_la.all_cc.lo] Error 1
make[4]: Leaving directory
`/builddir/build/BUILD/kdemultimedia-3.5.8-patched/noatun/modules/artseffects'

Comment 3 Rex Dieter 2007-10-13 17:54:53 EDT
And on line 93 of extrastero_impl.cc:

mFd=::open(file.c_str(), O_RDWR | O_CREAT | O_TRUNC);
Comment 4 Jakub Jelinek 2007-10-13 18:08:01 EDT
So please fix that bug.
http://www.opengroup.org/onlinepubs/009695399/functions/open.html
for details, open with O_CREAT must have 3 arguments rather than 2.
What exact mode you need depends really on what the file is used for, but
no mode, in addition to being undefined behavior, is often security hazard,
the file can be created with pretty much random mode, including suid or sgid.
Comment 5 Bug Zapper 2008-04-04 10:05:41 EDT
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 6 Ngo Than 2008-04-04 17:47:32 EDT
it's already fixed in 3.5.9.
Comment 7 J. McCann 2012-04-25 03:10:26 EDT
(In reply to comment #3)
> And on line 93 of extrastero_impl.cc:
> 
> mFd=::open(file.c_str(), O_RDWR | O_CREAT | O_TRUNC);
> 

yeah i had this compiling gcc 3.4.6, i did the equivalent of

mFd=::open(file.c_str(), O_RDWR , O_CREAT | O_TRUNC);

Note You need to log in before you can comment on or make changes to this bug.