Hi,
this patch contains the libwbclient implementation for SSSD to allow
Samba file-servers and utilities to use SSSD instead of winbind to map
SIDs, names and POSIX IDs. The related ticket is
https://fedorahosted.org/sssd/ticket/1588.
The SSSD specific calls can be found in files with '_sssd' as part of
the name, the other files are mainly taken from the original Samba
sources because they contain API calls which are independent of the
backend. I have made some minor modification to meet the SSSD coding
style but tried to avoid major changes to make a diff to the original
version more easy. If major issue are found during review I think it
would be a good idea to try to bring the changes back to samba as well.
In wbc_pwd_sssd.c instead of linking in the related sources of the NSS
client I dlopen-ed libnss_sss.so.2 to have more flexibility about where
and how to build the library. I you think this is too much overhead I'd
be happy to change the code to use the NSS client call directly.
The patch does not contain unit test because the Samba source code
already contains some basic tests. I'll try to work with the samba
package maintainer to make this code in a samba-devel or samba-test
package available so that it can be used by SSSD as well.
Basic functional test can be run manually with wbinfo, e.g.:
$ /usr/bin/wbinfo -n 'AD18\Administrator'
S-1-5-21-3090815309-2627318493-3395719201-500 SID_USER (1)
$ /usr/bin/wbinfo -S S-1-5-21-3090815309-2627318493-3395719201-500
1670800500
bye,
Sumit