Bug 10276 - Samba 4.1.1 waf build error on AIX with IBM XL C/C++
Summary: Samba 4.1.1 waf build error on AIX with IBM XL C/C++
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.1.1
Hardware: PPC AIX
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-18 12:55 UTC by Yannick Bergeron (mail address dead)
Modified: 2013-12-10 15:18 UTC (History)
2 users (show)

See Also:


Attachments
proposed patch (1020 bytes, patch)
2013-11-18 21:08 UTC, Christian Ambach
no flags Details
Patch for 4.1.x (cherry-picked from master) (1.23 KB, patch)
2013-11-26 19:52 UTC, Christian Ambach
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yannick Bergeron (mail address dead) 2013-11-18 12:55:16 UTC
Hi,

trying to help someone else to compile Samba 4.1.x on AIX (7.1 TL2 SP3) with IBM XL C/C++ v12.1 (latest FP), I've got this error while trying to build 4.1.1 with waf.

[ 515/3709] Compiling lib/util/util_net.c
"../lib/util/util.c", line 128.15: 1506-343 (S) Redeclaration of
file_check_permissions differs from previous declaration on line 631 of
"../source4/../lib/util/samba_util.h".
"../lib/util/util.c", line 128.15: 1506-377 (I) The type "struct stat64*" of
parameter 4 differs from the previous type "struct stat*".
Waf: Leaving directory `/usr/src/samba-4.1.1/bin'
Build failed:  -> task failed (err #1): 
        {task: cc util.c -> util_1.o}


My last successful attempt was with 4.0.7
Christian Ambach mentioned on Bugzilla 9911 that it may be related to the security fix provided in 4.1.1.
I'll try an attempt on 4.1.0 (and maybe with latest 4.0.x) and let you know the result in the upcoming days.


Best regards,

Yannick Bergeron
Comment 1 Christian Ambach 2013-11-18 21:08:06 UTC
I am pretty sure this came in via

commit 8eae8d28bce2c3f6a323d3dc48ed10c2e6bb1ba5
Author: Björn Baumbach <bb@sernet.de>
Date:   Tue Oct 29 17:43:17 2013 +0100

    CVE-2013-4476: lib-util: add file_check_permissions()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234
    
    Signed-off-by: Björn Baumbach <bb@sernet.de>
    Reviewed-by: Stefan Metzmacher <metze@samba.org>

as this adds a forward declaration of struct stat in lib/util/samba_util.h instead of including the appropriate headers
Comment 2 Christian Ambach 2013-11-18 21:08:42 UTC
Created attachment 9437 [details]
proposed patch

Can you give this one a try?
Comment 3 Yannick Bergeron (mail address dead) 2013-11-19 13:00:57 UTC
Working like a charm!
'build' finished successfully (17m48.569s)




Best regards,

Yannick Bergeron
Comment 4 Christian Ambach 2013-11-19 21:06:21 UTC
Ok, thanks for the quick feedback.

Will get the fix into master and then back into 4.1.1
Comment 5 Christian Ambach 2013-11-26 19:52:40 UTC
Created attachment 9480 [details]
Patch for 4.1.x (cherry-picked from master)
Comment 6 Andreas Schneider 2013-11-27 18:00:14 UTC
There was already a mail that this is incorrect and <system/filesystem.h> should be included instead. Could you please fix it in master and then we can fix it for 4.1?

Thanks.
Comment 7 Christian Ambach 2013-12-05 09:46:26 UTC
Comment on attachment 9480 [details]
Patch for 4.1.x (cherry-picked from master)

please reconsider based on Jelmer's reply on samba-technical
Comment 8 Christian Ambach 2013-12-05 09:47:20 UTC
Comment on attachment 9480 [details]
Patch for 4.1.x (cherry-picked from master)

Please reconsider the review based on Jelmer's reply on samba-technical
Comment 9 Christian Ambach 2013-12-07 10:23:14 UTC
Hi Karolin,

please pick for 4.1.next
Comment 10 Karolin Seeger 2013-12-10 11:54:30 UTC
Pushed to autobuild-v4-1-test.
Comment 11 Karolin Seeger 2013-12-10 15:18:50 UTC
Pushed to v4-1-test.
Closing out bug report.

Thanks!