summaryrefslogtreecommitdiff
path: root/nsswitch
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* nsswitch: protect access to wb_global_ctx by a mutexRalph Wuerthner2018-11-011-1/+14
| | | | | | | | | | This change will make libwbclient thread safe for all API calls not using a context. Especially there are no more conflicts with threads using nsswitch and libwbclient in parallel. 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: make wb_global_ctx private add add get/put functions to access ↵Ralph Wuerthner2018-11-011-8/+33
| | | | | | | | global context 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: use goto to have only one function returnRalph Wuerthner2018-11-011-4/+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: Add try_authtok option to pam_winbindMathieu Parent2018-10-022-0/+6
| | | | | | | | | | | | Same as the use_authtok option, except that if the new password is not valid, PAM will prompt for a password. Bug-Debian: https://bugs.debian.org/858923 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/570944 Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* nsswitch/libwbclient/wscript: import from waflibAlexander Bokovoy2018-09-051-1/+1
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>