summaryrefslogtreecommitdiff
path: root/nsswitch
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* nsswitch/wscript_build: update to handle waf 2.0.4Alexander Bokovoy2018-09-051-1/+1
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wbinfo: Free memory when we leave wbinfo_dsgetdcname()Andreas Schneider2018-08-111-0/+3
| | | | | | | | | | | | Found by covscan. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13567 Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Justin Stephenson <jstephen@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: Correct users of "ctx->is_privileged"Volker Lendecke2018-07-241-5/+5
| | | | | | | winbindd_context->is_privileged is a bool Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: Make two functions staticVolker Lendecke2018-07-242-10/+7
| | | | | | | nss_irix was the only external user Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: Remove IRIX supportVolker Lendecke2018-07-243-681/+0
| | | | | | | | | According to wikipedia, IRIX has seen the last patch update in August 2006. As of now, www.sgi.com is unreachable. Probably this code has not been built in years. If someone wants to revive it, it can be found in the git history. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind_krb5_localauth: Fix a compiler warningAndreas Schneider2018-07-071-2/+2
| | | | | | | | | | This can't used uninitialized but some compiler complains about it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Jul 7 16:24:30 CEST 2018 on sn-devel-144
* nsswitch: Use a swtich in the wbinfo test to lookup usersAndreas Schneider2018-07-061-8/+11
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13503 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jul 6 17:14:44 CEST 2018 on sn-devel-144
* nsswitch: Add tests to lookup user via getpwnamAndreas Schneider2018-07-041-9/+62
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13503 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>