Mantis - samba_winbind
Viewing Issue Advanced Details
5020 packaging feature always 2012-11-01 22:05 2013-02-03 15:40
abelletti  
jh  
normal  
closed  
fixed  
none    
none  
0005020: Missing nss_winbind.so library
The CSWsamba_winbind package is missing the library support for nss. It would be very helpful to have this included in the build. Thanks!
Issue History
2012-11-01 22:05 abelletti New Issue
2012-11-02 10:06 jh Status new => assigned
2012-11-02 10:06 jh Assigned To => jh
2012-11-02 10:08 jh Note Added: 0010199
2012-11-02 10:08 jh Status assigned => feedback
2012-11-02 10:47 jh Note Added: 0010200
2012-11-02 18:38 abelletti Note Added: 0010201
2012-11-02 19:07 abelletti Note Added: 0010202
2012-11-05 10:29 jh Note Added: 0010203
2012-11-05 10:32 jh Note Edited: 0010203
2012-11-05 12:35 jh Note Added: 0010204
2012-11-05 19:24 abelletti Note Added: 0010205
2012-11-06 16:04 jh Note Added: 0010207
2012-11-06 16:04 jh Status feedback => resolved
2012-11-06 16:04 jh Resolution open => fixed
2012-11-06 20:56 abelletti Note Added: 0010208
2012-11-06 20:56 abelletti Status resolved => feedback
2012-11-06 20:56 abelletti Resolution fixed => reopened
2012-11-07 18:07 abelletti Note Added: 0010209
2012-11-08 09:29 jh Note Added: 0010211
2013-02-03 15:40 jh Status feedback => closed
2013-02-03 15:40 jh Resolution reopened => fixed

Notes
(0010199)
jh   
2012-11-02 10:08   
Hi,
I did build the samba package with --enable-nss-wrapper so don't know if it's not picked up or anything else is wrong here.


Is this a special lib that it should bind to?
Do have the name or example?
(0010200)
jh   
2012-11-02 10:47   
Configure log does tell me that:

checking how to build idmap_nss... static

but in config.log there is:

HAVE_NSS_WRAPPER='yes'
IDMAP_STATIC=' winbindd/idmap_tdb.o winbindd/idmap_passdb.o winbindd/idmap_nss.o'
NSSSONAMEVERSIONSUFFIX='.1'
NSS_INFO_MODULES=''
NSS_INFO_STATIC=' winbindd/nss_info_template.o'
NSS_MODULES='../nsswitch/libnss_winbind.so ../nsswitch/libnss_wins.so'
NSS_WRAPPER_OBJS='../lib/nss_wrapper/nss_wrapper.o'
WINBIND_NSS='../nsswitch/libnss_winbind.so'
WINBIND_NSS_EXTRA_OBJS='../nsswitch/winbind_nss_solaris.o ../nsswitch/winbind_nss_linux.o'
WINBIND_NSS_LDSHFLAGS='-G'
WINBIND_WINS_NSS='../nsswitch/libnss_wins.so'


so don't know right now if there should be an libnss_wins.so or not :)
(0010201)
abelletti   
2012-11-02 18:38   
Hi JH, thanks for the quick response. For the moment I'm running the Samba 3.5.7 package that comes with OpenIndiana so I can compare files with that. libnss_wins.so is something else; I've never actually used that but it's present in the OI build. I'm seeing both nss_winbind.so (actually a link to nss_winbind.so.1) and nss_wins.so (a link to nss_wins.so.1).

Not sure why yours isn't building the nss_winbind.so library. I tried to build the 3.6.9 source on my OI machine but discovered my build environment is completely screwed up. Will have to deal with that as time permits.

Thanks!
(0010202)
abelletti   
2012-11-02 19:07   
Ok, fixed that problem. When I build 3.6.9 with no configure options at all (ie, ./configure;make -j8) it does produce the desired lib_winbind.so. If I use the --enable-nss-wrapper option, it fails to build on my platform.

I'm not sure what that option is (have never needed to use it), but it may not be related to the lib_winbind issue. Or it might. Have you tried building without the option?
(0010203)
jh   
2012-11-05 10:29   
(edited on: 2012-11-05 10:32)
Hi first of all what do you need this lib for?

I did dig more into the configure script:

case "$host_os" in

      *solaris*)
                # Solaris winbind client is implemented as a wrapper around
                # the Linux version.
                NSSSONAMEVERSIONSUFFIX=".1"
                WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_solaris.o \
                    ../nsswitch/winbind_nss_linux.o"

This seems links the objekts build into winbind and not as a seperate lib on Solaris. You are using opensolaris right. You might want to check $host_os in config.log to see if it matches solaris. (I'm not sure here)

Looking at the oracle samba it does have the lib.
I'm confused now :)

(0010204)
jh   
2012-11-05 12:35   
more light on my side:

After reading:
https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/winbind.html#id2653940 [^]

I now see the problem. We don't deliver libs in /libs where libnss_winbind.so must reside to be used by NSS. I don't know if a symlink would work if I did I could create a package. The symlink must be created by hand though because otherwise it could brake installation in zones etc.

Will look into that on the next release.
(0010205)
abelletti   
2012-11-05 19:24   
Yes, using OpenIndiana so it's in the OpenSolaris family tree. I get "solaris2.11" in host_os.

The library I've got in the 3.5.7 package available via OpenIndiana is very small. 32168 bytes in /usr/lib and 42960 bytes in /usr/lib/amd64. Small enough that it's very likely a wrapper.

Anything you can do in the next release will be most appreciated. Would like to switch over to this packaging as you're much more current.
(0010207)
jh   
2012-11-06 16:04   
new Version with libnss_winbind1-3.6.9,REV=2012.11.06-SunOS5.10 should hit the main mirror in a few hours. Please test.
(0010208)
abelletti   
2012-11-06 20:56   
Appears to work perfectly now. My test setup works with winbind referenced from /etc/nsswitch.conf and fails when I remove it. Thanks for the quick response & fix!
(0010209)
abelletti   
2012-11-07 18:07   
One more piece of feedback. This won't fully work until the system can find the library. In my case, that required the following:

ln -s /opt/csw/lib/libnss_winbind.so.1 /lib/nss_winbind.so.1

(placing the link in /usr/lib should also suffice.)
(0010211)
jh   
2012-11-08 09:29   
This is correct. This is stated here: https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/winbind.html#id2653940 [^]

I can't put a symlink into the package though as this might brake zone usage etc.
I will probably add a note into the next package though to do it by hand if needed.