Bug 13174 - libaesni-intel-samba4.so needs to be linked with -z noexecstack
Summary: libaesni-intel-samba4.so needs to be linked with -z noexecstack
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.7.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-04 09:53 UTC by Andreas Schneider
Modified: 2017-12-15 10:14 UTC (History)
5 users (show)

See Also:


Attachments
patch for master (1.42 KB, patch)
2017-12-04 09:53 UTC, Andreas Schneider
no flags Details
patch for master (2.87 KB, patch)
2017-12-04 10:01 UTC, Andreas Schneider
bbaumbach: review-
Details
patch v2 for master (2.88 KB, patch)
2017-12-04 11:07 UTC, Andreas Schneider
asn: review? (jra)
bbaumbach: review+
asn: review? (metze)
ab: review+
Details
patch for 4.7 (3.16 KB, patch)
2017-12-07 12:23 UTC, Andreas Schneider
ab: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2017-12-04 09:53:16 UTC
Executables linked with Samba libraries needing libaesni-intel-samba4.so cannot start:

journalctl -u nmb -b:
Dec 03 11:08:35 roxie.blkdiamonds.lan systemd[1]: Starting Samba NMB Daemon...
Dec 03 11:08:40 roxie.blkdiamonds.lan nmbd[1591]: /usr/sbin/nmbd: error while loading shared libraries: libaesni-intel-samba4.so: cannot enable executable
Dec 03 11:08:46 roxie.blkdiamonds.lan systemd[1]: nmb.service: Main process exited, code=exited, status=127/n/a
Dec 03 11:08:46 roxie.blkdiamonds.lan systemd[1]: Failed to start Samba NMB Daemon.
Dec 03 11:08:46 roxie.blkdiamonds.lan systemd[1]: nmb.service: Unit entered failed state.
Dec 03 11:08:46 roxie.blkdiamonds.lan systemd[1]: nmb.service: Failed with result 'exit-code'.
Comment 1 Andreas Schneider 2017-12-04 09:53:58 UTC
Created attachment 13837 [details]
patch for master
Comment 2 Andreas Schneider 2017-12-04 10:01:21 UTC
Created attachment 13838 [details]
patch for master
Comment 3 Björn Baumbach 2017-12-04 10:47:37 UTC
Comment on attachment 13838 [details]
patch for master

This patch breaks the build when using the ADDITIONAL_LDFLAGS option. If I
specify for example ADDITIONAL_LDFLAGS="-z textoff", gcc is called with
a 'textoff' argument, without the '-z'. This produces the following error:

[3457/4105] Linking default/third_party/aesni-intel/libaesni-intel-samba4.so
gcc: error: textoff: No such file or directory

Björn
Comment 4 Andreas Schneider 2017-12-04 11:07:39 UTC
Created attachment 13839 [details]
patch v2 for master
Comment 5 Alexander Bokovoy 2017-12-06 07:21:39 UTC
Comment on attachment 13839 [details]
patch v2 for master

Ok.
Comment 6 Andreas Schneider 2017-12-07 12:23:40 UTC
Created attachment 13850 [details]
patch for 4.7
Comment 7 Andreas Schneider 2017-12-07 12:39:05 UTC
Karolin, please add the patch to 4.7. Thanks!
Comment 8 Karolin Seeger 2017-12-14 11:17:37 UTC
(In reply to Andreas Schneider from comment #7)
Pushed to autobuild-v4-7-test.
Comment 9 Karolin Seeger 2017-12-15 10:14:25 UTC
(In reply to Karolin Seeger from comment #8)
Pushed to v4-7-test.
Closing out bug report.

Thanks!