summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_rpc.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-29s3:winbindd: Remove unused rpc_sequence_number()Andreas Schneider1-59/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-06winbindd: Remove unused codeVolker Lendecke1-214/+0
Those calls were only used in winbindd_samr which now does direct and simpler samr calls. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-16s3:winbind: Don't abort when receiving a NULL SIDAmit Kumar1-9/+7
Source code in winbind_rpc.c states that if the trusted domain has no SID, winbindd just aborts the session. This happens with MIT Kerberos realm added as trust to AD and winbindd just returns without processing further as there is no SID returned for the Linux system having kerberos support. This fix makes winbindd to skip the domain having NULL SID instead of aborting the request completely. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13913 Signed-off-by: Amit Kumar <amitkuma@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2019-04-18winbind: Return queried domain name from name_to_sidChristof Schmitt1-0/+12
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>
2019-04-18winbind: Query domain from winbind rpc name_to_sidChristof Schmitt1-1/+2
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>
2018-11-01s3: winbind: Remove fstring from wb_acct_info structSamuel Cabrero1-4/+12
The group enumeration backend functions try to allocate an array of wb_acct_info structs with a number of elements equal to the number of groups. In domains with a large number of groups this allocation may fail due to the size of the chunk. Found while trying to enumerate the groups in a domain with more than 700k groups. Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-11-29winbindd: let normalize_name_map() call find_domain_from_name_noinit()Ralph Boehme1-2/+2
Let normalize_name_map fetch the domain itself with find_domain_from_name_noinit(). This removes two calls to find_domain_from_name_noinit() in the default configuration of "winbind normalize names = no". The domain is only need in normalize_name_map if "winbind normalize names" is enabled. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-05-16s3:winbind: Use a talloc stackframe for rpc_query_user_listAndreas Schneider1-16/+24
CID #1401581 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2017-04-07winbindd: error handling in rpc_lookup_sids()Ralph Boehme1-4/+5
NT_STATUS_NONE_MAPPED and NT_STATUS_SOME_NOT_MAPPED should not be treated as fatal error. We should continue processing the results and not bail out. In case we got NT_STATUS_NONE_MAPPED we must have to ensure all lsa_TranslatedName are of type SID_NAME_UNKNOWN. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12728 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-03-06Revert "winbind: Remove rpc_lookup_usergroups"Volker Lendecke1-0/+74
This reverts commit 91b73b1e93bb8fb38e2f1cea6c1cbd012c952542. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12612 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2017-02-23winbind: Use EnumDomainUsers in rpc_query_user_listVolker Lendecke1-37/+24
We changed the parent->child enumusers call so that we only return the users' RIDs. QueryDisplayInfo tends to return a lot more info which we throw away. This also aligns the code with the other rpc enumerating functions. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Feb 23 03:17:41 CET 2017 on sn-devel-144
2017-01-11winbind: Fix CID 1398533 Resource leakVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-01-04winbind: Simplify query_user_list to only return ridsVolker Lendecke1-51/+11
Unfortunately this is a pretty large patch, because many functions implement this API. The alternative would have been to create a new backend function, add the new one piece by piece and then remove the original function. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-04winbind: Remove rpc_lookup_usergroupsVolker Lendecke1-74/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-04winbind: Remove rpc_query_userVolker Lendecke1-76/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-02winbind: Initialize user list info to 0Volker Lendecke1-0/+2
Further down wbint_userinfo will be extended. Make sure we don't have uninitialized memory hanging around Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-03s3-winbind: Do not return NO_MEMORY if we have an empty user listAndreas Schneider1-0/+4
The domain child for the MACHINE ACCOUNT might fail with NT_STATUS_NO_MEMORY because an emtpy user list is returned. *pnum_info is already set to 0 at the beginngin so we should just declare victory here! BUG: https://bugzilla.samba.org/show_bug.cgi?id=12405 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 3 05:36:17 CET 2016 on sn-devel-144
2015-07-17s3:winbindd: initialize dst->primary_gid with (gid_t)-1Stefan Metzmacher1-1/+1
We should not leave this uninitialized. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jul 17 19:06:08 CEST 2015 on sn-devel-104
2015-07-17s3:winbindd: initialize acct_desc fields in rpc_enum_{dom,local}_groups()Stefan Metzmacher1-5/+10
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-07-17s3:winbindd: initialize an [in,out] variable in rpc_try_lookup_sids3()Stefan Metzmacher1-1/+1
The input value of count is ignored by the server, but we should not send an uninitialized value. Found by valgrind. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2014-11-25s3:winbindd: avoid invalid pointer type warningsStefan Metzmacher1-1/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-01winbindd: Do not segfault if the trusted domain has no SIDAndrew Bartlett1-1/+9
Currently we abort, as skipping the domain would make the loop much more complex for a situation not yet seen in the real world. Andrew Bartlett Change-Id: Ie1e269eb25047d662d8fd0f771ee20de1d48706b Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
2014-04-02winbindd: Ensure we do not look at rid_array before checking if it was returnedAndrew Bartlett1-3/+3
We no longer return early if there are no members, we just return an empty array. Change-Id: I7b0949e0c0b9277426a8007514a8658615f6c709 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-02-25rpc: fix name-normalization in rpc_sid_to_name()Michael Adam1-1/+1
Hand the *input* name as input into the normalize call, not the (potentially uninitialized...) *output* name... Bug: https://bugzilla.samba.org/show_bug.cgi?id=10463 Change-Id: I4f3fc25882c22d96329e252d0a53bbe13d533472 Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-25rpc: correctly tread domain-only requests in rpc_sid_to_name()Michael Adam1-1/+1
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10463 Change-Id: I6a8a8c272b9cf7dbce4f9a99012209c29c31e839 Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-12-09CVE-2013-4408:s3:Ensure LookupRids() replies arrays are range checked.Jeremy Allison1-2/+8
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Dec 9 09:00:41 CET 2013 on sn-devel-104
2013-12-09CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.Jeremy Allison1-12/+2
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
2013-12-09CVE-2013-4408:s3:Ensure LookupSids replies arrays are range checked.Jeremy Allison1-0/+32
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
2013-01-29s3:winbindd: check the correct variable for talloc success in rpc_query_user()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-11-30s3-winbind: use new reconnect logic in rpc_lookup_sids() also.Günther Deschner1-16/+7
Volker, please check. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2012-09-29s3-winbindd: Adjust error code loop logic in rpc_trusted_domains().Günther Deschner1-1/+1
Guenther Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Sat Sep 29 00:34:04 CEST 2012 on sn-devel-104
2012-09-28s3-winbindd: Allow DNS resolution of trusted domains if DNS name is avaliableSumit Bose1-21/+47
Signed-off-by: Günther Deschner <gd@samba.org>
2012-02-18Fix a bunch of "unused variable" warnings.Jeremy Allison1-2/+0
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
2011-06-09s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett1-4/+4
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett1-3/+3
Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
2011-05-02s3-winbindd: remove unused headers.Günther Deschner1-3/+0
Guenther
2011-04-13s3: Add wbint_LookupSidsVolker Lendecke1-0/+98
This will be called from wb_lookupsids to query remote DCs via lsa Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13s3-rpc_client: add and use rpc_client/rpc_client.h.Günther Deschner1-0/+1
Guenther
2011-03-30s3-winbindd: copy acct_info to wb_acct_info so we dont need passdb for it.Günther Deschner1-6/+6
Guenther
2011-02-02s3-winbind: prefer dcerpc_lsa_X functions in winbindd/winbindd_rpc.c.Günther Deschner1-7/+12
Guenther
2011-02-02s3-winbind: prefer dcerpc_samr_X functions in winbindd/winbindd_rpc.c.Günther Deschner1-58/+134
Guenther
2011-01-21s3-rpc_client: Rename get_query_dispinfo_params.Andreas Schneider1-3/+3
2010-11-01s3:winbindd: fix query_user for users with NULL full name.Michael Adam1-1/+3
Not sure whether query_user ever sends a NULL full name. Query Display Info does, and it does not harm to add the check here, too. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon Nov 1 13:03:33 UTC 2010 on sn-devel-104
2010-11-01s3:winbindd: fix query_user_list for users with NULL full_nameMichael Adam1-1/+3
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-1/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-07samr: for correctness, rename samr_RidTypeArray to samr_RidAttrArray.Günther Deschner1-1/+1
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Oct 7 12:04:32 UTC 2010 on sn-devel-104
2010-09-20s3-util: use shared dom_sid_dup.Günther Deschner1-2/+3
Guenther
2010-07-06s3-winbind: Handle aliases in rpc_lookup_groupmem().Andreas Schneider1-29/+74