nsswitch: Fix code spelling Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
nsswitch: remove winbind_nss_mutex We're now thread-safe by using TLS, so the global lock isn't needed anymore. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Jan 5 12:34:35 UTC 2023 on sn-devel-184
nsswitch: prepare for removing global locking by using TLS Switch to using TLS for all global variables. No change in behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Fix memleak in _nss_winbind_initgroups_dyn Free the response at the end of _nss_winbind_initgroups_dyn Signed-off-by: Sushmita Bhattacharya <sushmita.bhattacharya@oracle.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
nsswitch: explicitly mark NSS_STATUS _nss_winbind_* symbols as _PUBLIC_ on Linux The symbols which are used via dlopen()/dlsym() need to be exported, in future we'll do hide all other symbols. On other platforms, which are implemented as wrappers above the Linux implementation, we mark the symbols as _PRIVATE_ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14780 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
nsswitch/winbind_nss_linux.c use WBFLAG_FROM_NSS Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de>
nss_winbind: Use #ifdef instead of #if for config.h definitions Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
nss_winbind: Set the client process name Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
nsswitch: add some const to _nss_winbind_initgroups_dyn() prototype BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org>
nsswitch: maintain prototypes for the linux based functions only once BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org>
nsswitch: linux: Remove use of strcpy(). The previous use was safe, but having *any* use of strcpy inside our code sets off security flags. Replace with an explicit length calculation and memcpy. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
nss_linux: Remove non-nss functions These functions were meant as a standard interface before libwbclient was developed. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Use global context for winbindd_request_response Updating API call in libwbclient, wbinfo, ntlm_auth and winbind_nss_* as per previous commit to wb_common.c. Signed-off-by: Matthew Newton <matthew-git@newtoncomputing.co.uk> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
nsswitch: avoid some compiler warnings Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
nsswitch: Skip groups we were not able to map. If we have configured the idmap_ad backend it is possible that the user is in a group without a gid set. This will result in (uid_t)-1 as the gid. We return this invalid gid to NSS which is wrong. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10824 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Sep 19 17:57:14 CEST 2014 on sn-devel-104
nsswitch: Remove a pointless if-clause gr->num_gr_mem is a uint32, so it can never be < 0
nsswitch: Move nss_err_str to its only caller
nsswitch: fix compiler warnings in winbind_nss_linux.c metze
nsswitch: Move source3 files to top level dir. Don't move source4 files yet to not confuse git's rename tracking too much.