Bug 12822 - O_NOFOLLOW undeclared in open.c error when building on AIX with gcc
O_NOFOLLOW undeclared in open.c error when building on AIX with gcc
Status: ASSIGNED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.6.4
All AIX
: P5 normal
: ---
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-06 13:38 UTC by Tim Lehman
Modified: 2017-06-07 08:39 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lehman 2017-06-06 13:38:16 UTC
The following error messages occur when building with gcc on AIX v7.1:

./source3/smbd/open.c: In function 'non_widelink_open':
../source3/smbd/open.c:573:11: error: 'O_NOFOLLOW' undeclared (first use in this function)
  flags |= O_NOFOLLOW;
           ^
../source3/smbd/open.c:573:11: note: each undeclared identifier is reported only once for each function it appears in
../source3/smbd/open.c: In function 'fd_open':
../source3/smbd/open.c:647:12: error: 'O_NOFOLLOW' undeclared (first use in this function)
   flags |= O_NOFOLLOW;
            ^
Comment 1 Jeremy Allison 2017-06-06 15:57:58 UTC
Due to inherent race conditions we are no longer supporting systems that don't have O_NOFOLLOW as they are impossible to secure w.r.t. pathname translation.

Does AIX 7.1 have O_NOFOLLOW available ?
Comment 2 Tim Lehman 2017-06-06 16:29:12 UTC
I believe AIX does support O_NOFOLLOW.  I found the following fix for AIX 7.1 that mentions it.

http://www-01.ibm.com/support/docview.wss?uid=isg1IV64988

-----Original Message-----
From: samba-bugs@samba.org [mailto:samba-bugs@samba.org] 
Sent: Tuesday, June 06, 2017 10:58 AM
To: Lehman, Timothy (JSC-CD42)[Leidos Innovations Corporation] <timothy.j.lehman@nasa.gov>
Subject: [Bug 12822] O_NOFOLLOW undeclared in open.c error when building on AIX with gcc

https://bugzilla.samba.org/show_bug.cgi?id=12822

Jeremy Allison <jra@samba.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|samba-qa@samba.org          |jra@samba.org
             Status|NEW                         |ASSIGNED

--- Comment #1 from Jeremy Allison <jra@samba.org> --- Due to inherent race conditions we are no longer supporting systems that don't have O_NOFOLLOW as they are impossible to secure w.r.t. pathname translation.

Does AIX 7.1 have O_NOFOLLOW available ?

--
You are receiving this mail because:
You reported the bug.
You are on the CC list for the bug.
Comment 3 Jeremy Allison 2017-06-06 16:34:37 UTC
So the question is why isn't it being found/used by the configure code ?