The Samba-Bugzilla – Bug 3381
Follow glibc convention for nss modules on Linux
Last modified: 2006-02-21 07:49:25 UTC
On Linux, the glibc provided nss modules use the name:
and the soname:
(.2 is hardcoded for "recent" glibcs, meaning glibcs that have existed in the past 5 years. the glibc doesn't export this number)
This also means that ldconfig will create the libnss_<module>-<glibc-version>.so to libnss_<module>.so.2 itself, and remove it when it's gone, avoiding dangling symlinks as can be seen in some packages.
Created attachment 1649 [details]
Thanks Bastien. I've fixed this last week without knowing your patch. :( But the solution is mostly the same. See Samba subversion revision 13417.
For my own benefit:
Unless I'm missing something, this patch only changes the soname, and not the filenames.
The filename needs to be changed from:
Should be enough to add this 2-liner in configure.in:
as the patch I posted did.
The filename change (adding a version number) is not required. I discussed this with two glibc developers.
Lars is correct. IIRC ldconfig will create the symbolic links for
you based on the soname of the file.
Maybe not needed, but the soname change isn't needed for this to work properly (only for the ldconfig symlinks to be cleaned up after removal) as the files are dlopen()'ed...
If you're going to be consistent, be consistent all the way, that includes versioning the files with samba's version.
Feel free to close this if you don't agree, at least I'll be able to do finger-pointing if somebody complains ;)
Consistent compared to what? Compared to glibc or to other libnss providers like libnss_ldap? Versioning the glibc libnss_* files was done to allow multiple installations at the same time.
If you can show me where we are inconsistent, then I'll rethink about this.
Else just finger-point at us. It's good for our pagerank. ;)