Bug 9299 - nsswitch modules under Linux need a symbolic to their so version library.
Summary: nsswitch modules under Linux need a symbolic to their so version library.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.0.0rc3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on: 9339
Blocks: 10077
  Show dependency treegraph
 
Reported: 2012-10-18 12:09 UTC by Andreas Schneider
Modified: 2015-01-24 20:38 UTC (History)
3 users (show)

See Also:


Attachments
v4-0-test patch (2.56 KB, patch)
2012-10-18 12:12 UTC, Andreas Schneider
ddiss: review+
Details
v4-0-test patch (2.69 KB, patch)
2012-10-29 11:11 UTC, Andreas Schneider
ddiss: review+
metze: review-
Details
Complete backport of nsswitch/ changes from master (38.08 KB, patch)
2012-10-29 12:32 UTC, Stefan Metzmacher
no flags Details
Patches for master (3.89 KB, patch)
2014-12-18 10:44 UTC, Stefan Metzmacher
no flags Details
Patches for v4-2-test (6.21 KB, patch)
2014-12-23 22:23 UTC, Stefan Metzmacher
asn: review+
Details
Patches for v4-1-test (6.16 KB, patch)
2014-12-23 22:23 UTC, Stefan Metzmacher
asn: review+
Details
Patches for v4-0-test (6.17 KB, patch)
2014-12-23 22:24 UTC, Stefan Metzmacher
asn: review+
Details
Patches for v4-1-test (6.13 KB, patch)
2015-01-07 10:29 UTC, Stefan Metzmacher
asn: review+
Details
Patches for v4-0-test (6.14 KB, patch)
2015-01-07 10:29 UTC, Stefan Metzmacher
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2012-10-18 12:09:05 UTC
We install libnss_winbind.so.2 but don't create the needed symlink libnss_winbind.so -> libnss_winbind.so.2 during installation. So all distributions do that in the build file.
Comment 1 Andreas Schneider 2012-10-18 12:12:26 UTC
Created attachment 8086 [details]
v4-0-test patch
Comment 2 David Disseldorp 2012-10-18 12:24:42 UTC
Comment on attachment 8086 [details]
v4-0-test patch

Reviewed-by: David Disseldorp <ddiss@samba.org>
Comment 3 Andreas Schneider 2012-10-18 13:18:57 UTC
Karolin, can you please push to master and v4-0-test. Thanks.
Comment 4 Karolin Seeger 2012-10-22 07:04:15 UTC
Pushed to master, waiting for autobuild.
Please note that I would prefer the reviewer to push the patches to master.
Thanks!
Comment 5 Stefan Metzmacher 2012-10-24 08:03:51 UTC
Karolin, I think you can cherry-pick the patches from master to v4-0-test
Comment 6 Karolin Seeger 2012-10-29 10:50:22 UTC
The second patch does not apply to current v4-0-test branch.
Re-assigning to Andreas to provide a patch for v4-0-test.

Thanks!
Comment 7 Andreas Schneider 2012-10-29 11:11:18 UTC
Created attachment 8112 [details]
v4-0-test patch
Comment 8 Karolin Seeger 2012-10-29 11:26:51 UTC
Pushed to autobuild-v4-0-test.
Closing out bug report.

Thanks!
Comment 9 Stefan Metzmacher 2012-10-29 12:25:04 UTC
Comment on attachment 8112 [details]
v4-0-test patch

This conflicts with some other changes under nsswitch/.
Comment 10 Stefan Metzmacher 2012-10-29 12:32:56 UTC
Created attachment 8113 [details]
Complete backport of nsswitch/ changes from master

I think there's currently no reason why nsswitch/ should differ between v4-0-test and master. So we better backport changes in the same order, so that git cherry-pick -x works without conflicts.
Comment 11 Stefan Metzmacher 2012-11-02 09:44:27 UTC
Comment on attachment 8113 [details]
Complete backport of nsswitch/ changes from master

Most of this will be fixed as part of bug 9339
Comment 12 Jelmer Vernooij 2012-11-13 14:51:36 UTC
Andreas Schneider wrote:
> We install libnss_winbind.so.2 but don't create the needed symlink
> libnss_winbind.so -> libnss_winbind.so.2 during installation. So all
> distributions do that in the build file.
In Debian/Ubuntu we don't, so this change means those distributions now need to start removing these .so files in the packaging.
Comment 13 Andrew Bartlett 2012-11-14 22:00:48 UTC
So, where are we at with this?  Do we need to sort out anything more for 4.0 (and add a blocker?)
Comment 14 Andreas Schneider 2012-11-15 09:10:28 UTC
Why do you have to remove them. Does it hurt packaging them?
Comment 15 Björn Jacke 2012-11-15 10:03:32 UTC
does anybody know why Debian does look for the .so.2 lib while other distributions look for the .so lib only? We should also clarify why the dists use the 2 version and when this number changes so that we can adopt our symlinking to that. It wouldn't make much sense to make a dumb .2 symlink while this might change to .3 with future glibc versions.
Comment 16 Björn Jacke 2012-11-15 10:05:54 UTC
(In reply to comment #15)
> does anybody know why Debian does look for the .so.2 lib while other
> distributions look for the .so lib only?

I mean the other way round...
Comment 17 Stefan Metzmacher 2014-12-18 10:14:13 UTC
The fix (commit 1f017efeedffed84b872bd17ebefee7dfff0d11a) for this bug,
introduces a regression, it changes the soname of the library,
this should be libnss_winbind.so.2 and is just libnss_winbind.so now.
Comment 18 Stefan Metzmacher 2014-12-18 10:44:12 UTC
Created attachment 10548 [details]
Patches for master
Comment 19 Stefan Metzmacher 2014-12-23 22:23:23 UTC
Created attachment 10560 [details]
Patches for v4-2-test
Comment 20 Stefan Metzmacher 2014-12-23 22:23:54 UTC
Created attachment 10561 [details]
Patches for v4-1-test
Comment 21 Stefan Metzmacher 2014-12-23 22:24:24 UTC
Created attachment 10562 [details]
Patches for v4-0-test
Comment 22 Andreas Schneider 2015-01-05 08:00:58 UTC
Comment on attachment 10562 [details]
Patches for v4-0-test

LGTM
Comment 23 Andreas Schneider 2015-01-05 08:01:24 UTC
Karolin, please add the patches to the relevant branches. Thanks!
Comment 24 Karolin Seeger 2015-01-06 20:33:41 UTC
(In reply to Andreas Schneider from comment #23)
Pushed to autobuild-v4-[0|1|2]-test.
Comment 25 Stefan Metzmacher 2015-01-07 10:29:03 UTC
Created attachment 10588 [details]
Patches for v4-1-test

Fixed patch without adding abs_path().
Comment 26 Stefan Metzmacher 2015-01-07 10:29:42 UTC
Created attachment 10589 [details]
Patches for v4-0-test

Fixed patch without adding abs_path().
Comment 27 Stefan Metzmacher 2015-01-07 10:35:34 UTC
Karolin, please take the new 4.0 and 4.1 patches, they should pass autobuild now...
Comment 28 Karolin Seeger 2015-01-11 13:04:37 UTC
(In reply to Stefan (metze) Metzmacher from comment #27)
Pushed to autobuild-v4-[0|1|2]-test.
Comment 29 Karolin Seeger 2015-01-11 20:10:18 UTC
(In reply to Karolin Seeger from comment #28)
autobuild-v4-2-test still fails, re-trying without these patches.

Pushed to v4-0-test and v4-1-test.
Comment 30 Karolin Seeger 2015-01-12 19:08:08 UTC
(In reply to Karolin Seeger from comment #29)
Still failing without these patches. Starting further investigation now.
Comment 31 Andreas Schneider 2015-01-13 17:11:51 UTC
Sorry, I have to withdraw my patch review.


commit 575b093dac3c509b1bfaab0b4ad29b9b4214e487
Author:     Stefan Metzmacher <metze@samba.org>
AuthorDate: Thu Dec 18 10:33:34 2014 +0100
Commit:     Stefan Metzmacher <metze@samba.org>
CommitDate: Fri Dec 19 13:15:12 2014 +0100

    nsswitch: fix soname of linux nss_*.so.2 modules
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299
    
    Signed-off-by: Stefan Metzmacher <metze@samba.org>
    Reviewed-by: Andreas Schneider <asn@samba.org>


Looks like this patch breaks linking Samba. In master try to build Samba with the following options:


./configure.developer --libdir=/usr/lib64    --enable-fhs   --prefix=/usr   --sbindir=/usr/sbin   --localstatedir=/var   --sysconfdir=/etc/samba   --with-statedir=/var/lib/samba   --with-configdir=/etc/samba   --with-lockdir=/var/lib/samba   --with-logfilebase=/var/log/samba   --with-piddir=/run   --with-privatedir=/etc/samba   --with-pammodulesdir=/lib64/security   --disable-rpath-install   --enable-cups   --disable-gnutls   --bundled-libraries=heimdal,!zlib,!popt   --with-shared-modules=vfs_cacheprime,vfs_readahead,idmap_ad,idmap_ldap,idmap_rid,pdb_tdbsam,pdb_ldapsam,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4,auth_netlogond,auth_samba4   --with-pam   --without-pam_smbpass   --without-fam   --with-profiling-data   --with-systemd

make -j


[4065/4316] Linking default/source3/winbindd/winbindd
../source3/rpc_server/rpc_ncacn_np.c:138: error: undefined reference to 'copy_session_info'
../source3/rpc_server/rpc_ncacn_np.c:219: error: undefined reference to 'copy_session_info'
../source3/rpc_server/rpc_ncacn_np.c:704: error: undefined reference to 'copy_session_info'
../source3/rpc_server/rpc_ncacn_np.c:845: error: undefined reference to 'copy_session_info'
../source3/rpc_server/srv_pipe.c:537: error: undefined reference to 'session_info_set_session_key'
../source3/rpc_server/rpc_server.c:1080: error: undefined reference to 'make_session_info_guest'
../source3/winbindd/winbindd.c:1268: error: undefined reference to 'netsamlogon_cache_init'
../source3/winbindd/winbindd.c:1654: error: undefined reference to 'init_system_session_info'
../source3/winbindd/winbindd_util.c:1058: error: undefined reference to 'netsamlogon_cache_get'
../source3/winbindd/winbindd_cache.c:2289: error: undefined reference to 'netsamlogon_cache_have'
../source3/winbindd/winbindd_cache.c:2429: error: undefined reference to 'netsamlogon_cache_have'
../source3/winbindd/winbindd_cache.c:3129: error: undefined reference to 'netsamlogon_clear_cached_user'
../source3/winbindd/winbindd_pam.c:323: error: undefined reference to 'add_aliases'
../source3/winbindd/winbindd_pam.c:325: error: undefined reference to 'add_aliases'
../source3/winbindd/winbindd_pam.c:338: error: undefined reference to 'nt_token_check_sid'
../source3/winbindd/winbindd_pam.c:1246: error: undefined reference to 'make_user_info'
../source3/winbindd/winbindd_pam.c:1263: error: undefined reference to 'make_auth_context_fixed'
../source3/winbindd/winbindd_pam.c:1271: error: undefined reference to 'auth_check_ntlm_password'
../source3/winbindd/winbindd_pam.c:1287: error: undefined reference to 'serverinfo_to_SamInfo3'
../source3/winbindd/winbindd_pam.c:1823: error: undefined reference to 'netsamlogon_cache_get'
../source3/winbindd/winbindd_pam.c:1842: error: undefined reference to 'netsamlogon_cache_store'
../source3/winbindd/winbindd_pam.c:1985: error: undefined reference to 'netsamlogon_cache_get'
../source3/winbindd/winbindd_pam.c:2004: error: undefined reference to 'netsamlogon_cache_store'
../source3/winbindd/winbindd_pam.c:2552: error: undefined reference to 'create_info3_from_pac_logon_info'
../source3/winbindd/winbindd_pam.c:2558: error: undefined reference to 'netsamlogon_cache_store'
../source3/winbindd/winbindd_pam.c:2577: error: undefined reference to 'copy_netr_SamInfo3'
...
Comment 32 Karolin Seeger 2015-01-14 20:09:15 UTC
Hmm, patch is already included in 4.1.15. :-(
Should I revert the patch in v4-0-test?
Comment 33 Andreas Schneider 2015-01-15 17:01:52 UTC
It is probably a combination of these patches which break it. I haven't had time to look for a fix yet. Better revert it if possible.
Comment 34 Stefan Metzmacher 2015-01-18 14:47:02 UTC
(In reply to Andreas Schneider from comment #31)

commit 76fdcf5c15bd904c3686f0c2dd93d27486c61ca4
Author:     Stefan Metzmacher <metze@samba.org>
AuthorDate: Thu Dec 18 15:05:12 2014 +0100
Commit:     Stefan Metzmacher <metze@samba.org>
CommitDate: Fri Dec 19 13:15:12 2014 +0100

    wafsamba: fill PRIVATE_NAME() logic again
    
    We append bld.env.PRIVATE_EXTENSION to the name of private libraries
    again, but only unless they have a abi_directory, vnum or soname defined.
    
    This avoids naming conflicts with system libraries, e.g. libidmap.so
    on Solaris
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112
    
    Signed-off-by: Stefan Metzmacher <metze@samba.org>
    Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Is the problem for Andreas, so this is not related to the patches in
this bug report.

The problem is that bin/default/source3/auth/libauth-samba4.so is being created
two times. Once by SAMBA3_LIBRARY('auth',...) and once again by SAMBA3_MODULE('auth_samba4', ...).

As a result bin/default/source3/auth/libauth-samba4.so gets randomly
overwritten.

I'll post fixes for this problem to samba-technical.

Andreas please readd your review+ here, thanks!
Comment 35 Andreas Schneider 2015-01-19 12:05:17 UTC
Metze, Karolin reports in comment #30 that it fails for 4.2-test branch. This is pobably due to the PRIVATE_NAME patch revealing the library-with-the-same-name-issue.
Comment 36 Stefan Metzmacher 2015-01-19 12:17:15 UTC
Karolin, please pick the v4-2-test patch.
Comment 37 Stefan Metzmacher 2015-01-23 07:33:38 UTC
Pushed to autobuild-v4-2-test...
Comment 38 Karolin Seeger 2015-01-24 20:38:54 UTC
Pushed to v4-0-test, v4-1-test and v4-2-test.
Closing out bug report.

Thanks1