Bug 12822 - O_NOFOLLOW undeclared in open.c error when building on AIX with gcc
Summary: O_NOFOLLOW undeclared in open.c error when building on AIX with gcc
Status: ASSIGNED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.6.4
Hardware: All AIX
: P5 normal (vote)
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-06 13:38 UTC by Tim Lehman
Modified: 2018-11-13 13:17 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 ?
Comment 4 Björn Jacke 2018-11-13 13:17:38 UTC
O_NOFOLLOW is available with _XOPEN_SOURCE >= 700