summaryrefslogtreecommitdiff
path: root/nsswitch
Commit message (Collapse)AuthorAgeFilesLines
* nsswitch: Link stress-nss-libwbclient against pthreadIsaac Boukris2019-10-161-1/+1
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14140 Signed-off-by: Isaac Boukris <iboukris@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* selftest: Test ID_TYPE_BOTH with idmap_rid moduleChristof Schmitt2019-09-271-0/+132
| | | | | | | | | | | | | ID_TYPE_BOTH means that each user and group has two mappings, a uid and gid. In addition the calls to getpwent, getpwuid, getgrent and getgrgid always return some information, so that uid and gid can be mapped to a name. Establish a test to verify that the expected information is returned. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14141 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nsswitch: add logging to wbc_auth_error_to_pam_error() for non auth errorsStefan Metzmacher2019-09-241-0/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* nsswitch/libwbclient: clang: Fix Value stored to 'wbc_status' is never readNoel Power2019-07-111-1/+0
| | | | | | | | | | | | Fixes: nsswitch/libwbclient/wbc_util.c:123:3: warning: Value stored to 'wbc_status' is never read <--[clang] wbc_status = WBC_ERR_SUCCESS; ^ ~~~~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* nsswitch/libwbclient: clang Fix Potential leak of memoryNoel Power2019-07-111-2/+4
| | | | | | | | | | | Fixes: nsswitch/libwbclient/wbc_sid.c:848:2: warning: Potential leak of memory pointed to by 'extra_data' free(extra_data); ^ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* nsswitch: Update all consumers of strtoul_err(), strtoull_err() to new APISwen Schillig2019-06-303-16/+35
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* nsswitch: Use GnuTLS RC4 in wbclient testAndreas Schneider2019-06-271-3/+28
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* nsswitch: cppcheck: Fix ctunullpointer errorNoel Power2019-06-041-4/+6
| | | | | | | | | Fixes nsswitch/pam_winbind.c:1379: error: ctunullpointer: Null pointer dereference: info <--[cppcheck] Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* nsswitch: cppcheck: Fix memleakOnRealloc errorsNoel Power2019-06-041-0/+6
| | | | | | | | | | | Fixes the following errors nsswitch/nsstest.c:192: error: memleakOnRealloc: Common realloc mistake: 'buf' nulled but not freed upon failure <--[cppcheck] nsswitch/nsstest.c:230: error: memleakOnRealloc: Common realloc mistake: 'buf' nulled but not freed upon failure <--[cppcheck] nsswitch/nsstest.c:269: error: memleakOnRealloc: Common realloc mistake: 'buf' nulled but not freed upon failure <--[cppcheck] Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* nsswitch pam_winbind: Fix Asan use after freeGary Lockyer2019-05-061-0/+5
| | | | | | | | | | | | | | | Fix use after free condition detected by Address Sanitizer triggered by wbcLogonUserInfoDestructor, wbcFreeMemory has code to detect and prevent a double free. This patch prevents the Address Sanitizer error, allowing tests to be run with Address Sanitizer enabled. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13927 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon May 6 08:55:22 UTC 2019 on sn-devel-184
* selftest: Add trusted domain tests for idmap_adChristof Schmitt2019-04-241-0/+106
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13903 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Pass trusted domain information to idmap_ad testChristof Schmitt2019-04-241-2/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13903 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Add gid-to-sid lookup to idmap_ad testChristof Schmitt2019-04-241-0/+24
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13903 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: Fix usage information of test_wbinfo_name_lookup.shChristof Schmitt2019-04-181-2/+2
| | | | | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Thu Apr 18 18:20:26 UTC 2019 on sn-devel-144
* nsswitch: Add testcase for checking output of wbinfo --sid-to-nameChristof Schmitt2019-04-181-0/+15
| | | | | | | | | | The username should always be returned in the DOMAISHORTNAME/USERNAME format. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* wbinfo: Use wrapper for string to integer conversionSwen Schillig2019-03-011-3/+11
| | | | | | | | | | | | In order to detect an value overflow error during the string to integer conversion with strtoul/strtoull, the errno variable must be set to zero before the execution and checked after the conversion is performed. This is achieved by using the wrapper function strtoul_err and strtoull_err. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libwbclient: Use wrapper for string to integer conversionSwen Schillig2019-03-013-21/+27
| | | | | | | | | | | | In order to detect an value overflow error during the string to integer conversion with strtoul/strtoull, the errno variable must be set to zero before the execution and checked after the conversion is performed. This is achieved by using the wrapper function strtoul_err and strtoull_err. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libwbclient: Protect wbcCtxUnixIdsToSids against integer-wrapVolker Lendecke2019-02-281-1/+11
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* wbinfo: fix --ntlmv1 optionGary Lockyer2019-02-201-0/+1
| | | | | | | | Currently using the --ntlmv1 option fails with an unknown option error. This patch ensures that the option is correctly supported. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* nssswitch: Log user access to kerberosAndreas Schneider2019-02-181-5/+16
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Feb 18 13:01:12 CET 2019 on sn-devel-144
* nsswitch: Use C99 initializer for poptOption in wbinfoAndreas Schneider2019-01-281-81/+484
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* selftest: Test sids-to-xids with one failing sidVolker Lendecke2019-01-081-0/+32
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* nss/waf: check for secmethod_table.method_{attrlist,version} for aix >= 5.2Bjoern Jacke2018-12-221-0/+9
| | | | | | | | | | The original commit 02c9b46fab46ab401a3cf6bb74c8260801c41032 was not ported to waf yet. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Sat Dec 22 06:22:22 CET 2018 on sn-devel-144
* winbind_nss_aix: add incomplete attr_flag initializationsBjörn Jacke2018-12-221-6/+11
| | | | | | | Found by Jürgen Starek, see https://bugzilla.samba.org/show_bug.cgi?id=5157 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de>
* winbind_nss_aix: use WBFLAG_FROM_NSSBjörn Jacke2018-12-221-45/+55
| | | | | Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* winbind_nss_solaris: use WBFLAG_FROM_NSSBjörn Jacke2018-12-221-15/+18
| | | | | Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* winbind_nss_netbsd: use WBFLAG_FROM_NSSBjörn Jacke2018-12-221-4/+6
| | | | | Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nsswitch/winbind_nss_linux.c use WBFLAG_FROM_NSSBjoern Jacke2018-12-221-10/+28
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de>
* winbind introduce WBFLAG_FROM_NSSBjoern Jacke2018-12-221-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de>
* nsswitch/winbind_nss_aix: reimplement fetching the SID of a userStefan Metzmacher2018-12-221-21/+26
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de>
* winbind_nss_aix: support also S_GROUPSIDSBjörn Jacke2018-12-221-0/+3
| | | | | | | which is used by lsuser up to AIX 5.2, see also https://bugzilla.samba.org/show_bug.cgi?id=5157 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nsswitch: Fix checking for config.h #define in winbind_nss.hAndreas Schneider2018-12-161-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* nsswitch: Fix checking for config.h #define in nsstest.hAndreas Schneider2018-12-161-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* nsswitch/tests: PY3 samba_tool call correct pythonNoel Power2018-12-101-4/+4
| | | | | | | fix samba4.blackbox.rfc2307_mapping Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test wbinfo -n and --gid-info with "NT Authority"Ralph Boehme2018-12-051-0/+18
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12164 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* nss_winbind: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-26/+26
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* wins: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-4/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* wbclient: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-281-5/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* krb5_plugin: Use #ifdef instead of #if for config.h definitionsAndreas Schneider2018-11-282-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* nsswitch: Handle possible NULL return value of getprogname()Andreas Schneider2018-11-131-2/+7
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* pam_winbind: Set the request type as client nameAndreas Schneider2018-11-121-0/+8
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Nov 12 13:44:09 CET 2018 on sn-devel-144
* nss_wins: Set client process nameAndreas Schneider2018-11-121-0/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nss_winbind: Set the client process nameAndreas Schneider2018-11-121-0/+11
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* krb5_plugin: Set the wbclient process nameAndreas Schneider2018-11-121-0/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wbclient: Add wbcSetClientProcessName()Andreas Schneider2018-11-126-2/+165
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wbclient: Send the client process name talking to winbindAndreas Schneider2018-11-122-1/+26
| | | | | | | This is for better debugging messages. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: Fix CID 1441070 Error handling issues (CHECKED_RETURN)Ralph Wuerthner2018-11-091-1/+8
| | | | | | Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: Fix CID 1441072 Error handling issues (CHECKED_RETURN)Ralph Wuerthner2018-11-091-1/+7
| | | | | | Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch:tests: Pass the envname to the scriptAndreas Schneider2018-11-081-2/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: add test for parallel NSS & libwbclient callsRalph Wuerthner2018-11-012-0/+163
| | | | | | Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>