1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

109 Commits

Author SHA1 Message Date
Volker Lendecke
0f2ffb545e winbind: Use EnumDomainUsers in rpc_query_user_list
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-02-23 03:17:40 +01:00
Volker Lendecke
5f024a0079 winbind: Fix CID 1398533 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-01-11 00:49:22 +01:00
Volker Lendecke
480c9581a1 winbind: Simplify query_user_list to only return rids
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-04 12:22:13 +01:00
Volker Lendecke
91b73b1e93 winbind: Remove rpc_lookup_usergroups
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-04 12:22:12 +01:00
Volker Lendecke
a8ab48ee19 winbind: Remove rpc_query_user
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-04 12:22:12 +01:00
Volker Lendecke
2481584b8b winbind: Initialize user list info to 0
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>
2017-01-02 18:04:13 +01:00
Andreas Schneider
e714dc03e0 s3-winbind: Do not return NO_MEMORY if we have an empty user list
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
2016-11-03 05:36:17 +01:00
Stefan Metzmacher
323e4f89fc s3:winbindd: initialize dst->primary_gid with (gid_t)-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-17 19:06:08 +02:00
Stefan Metzmacher
a7d582954d s3:winbindd: initialize acct_desc fields in rpc_enum_{dom,local}_groups()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-07-17 16:01:14 +02:00
Stefan Metzmacher
e5d309d432 s3:winbindd: initialize an [in,out] variable in rpc_try_lookup_sids3()
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>
2015-07-17 16:01:14 +02:00
Stefan Metzmacher
a5f35ed5cf s3:winbindd: avoid invalid pointer type warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-25 07:25:45 +01:00
Andrew Bartlett
a348959088 winbindd: Do not segfault if the trusted domain has no SID
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-09-01 00:36:42 +02:00
Andrew Bartlett
95e0d759ac winbindd: Ensure we do not look at rid_array before checking if it was returned
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-04-02 11:05:46 +02:00
Michael Adam
0cb15c169f rpc: fix name-normalization in rpc_sid_to_name()
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-25 09:17:07 +01:00
Michael Adam
ab7992b5bf rpc: correctly tread domain-only requests in rpc_sid_to_name()
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>
2014-02-25 09:17:07 +01:00
Jeremy Allison
f799f63e43 CVE-2013-4408:s3:Ensure LookupRids() replies arrays are range checked.
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-09 09:00:41 +01:00
Jeremy Allison
0dc6181894 CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.
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-09 07:05:46 +01:00
Jeremy Allison
b0ba4a5621 CVE-2013-4408:s3:Ensure LookupSids replies arrays are range checked.
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-09 07:05:46 +01:00
Michael Adam
b7095e9818 s3:winbindd: check the correct variable for talloc success in rpc_query_user()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-29 21:57:18 +01:00
Günther Deschner
4a73adf6e5 s3-winbind: use new reconnect logic in rpc_lookup_sids() also.
Volker, please check.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-30 11:49:56 +01:00
Günther Deschner
837f47d630 s3-winbindd: Adjust error code loop logic in rpc_trusted_domains().
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-29 00:34:03 +02:00
Sumit Bose
8e53b9dd51 s3-winbindd: Allow DNS resolution of trusted domains if DNS name is avaliable
Signed-off-by: Günther Deschner <gd@samba.org>
2012-09-28 22:44:08 +02:00
Jeremy Allison
21528da9cd Fix a bunch of "unused variable" warnings.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
2012-02-18 06:22:40 +01:00
Andrew Bartlett
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Günther Deschner
233779cce4 s3-winbindd: remove unused headers.
Guenther
2011-05-02 15:03:44 +02:00
Volker Lendecke
091fd0f0f7 s3: Add wbint_LookupSids
This will be called from wb_lookupsids to query remote DCs via lsa

Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13 14:13:24 -07:00
Günther Deschner
9824e2e5ee s3-rpc_client: add and use rpc_client/rpc_client.h.
Guenther
2011-04-13 22:23:59 +02:00
Günther Deschner
cc94bcb952 s3-winbindd: copy acct_info to wb_acct_info so we dont need passdb for it.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
387d1543ed s3-winbind: prefer dcerpc_lsa_X functions in winbindd/winbindd_rpc.c.
Guenther
2011-02-02 20:00:59 +01:00
Günther Deschner
924f60c77c s3-winbind: prefer dcerpc_samr_X functions in winbindd/winbindd_rpc.c.
Guenther
2011-02-02 13:30:04 +01:00
Andreas Schneider
089c25cbbb s3-rpc_client: Rename get_query_dispinfo_params. 2011-01-21 14:34:18 +01:00
Michael Adam
1ccb69aabb s3:winbindd: fix query_user for users with NULL full name.
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-01 13:03:33 +00:00
Michael Adam
53d19fac5f s3:winbindd: fix query_user_list for users with NULL full_name 2010-11-01 12:21:30 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
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-12 05:54:10 +00:00
Günther Deschner
b7683a2c9d samr: for correctness, rename samr_RidTypeArray to samr_RidAttrArray.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct  7 12:04:32 UTC 2010 on sn-devel-104
2010-10-07 12:04:32 +00:00
Günther Deschner
102a70e809 s3-util: use shared dom_sid_dup.
Guenther
2010-09-20 14:05:07 -07:00
Andreas Schneider
44d8c8dbb7 s3-winbind: Handle aliases in rpc_lookup_groupmem(). 2010-07-06 18:38:14 +02:00
Andreas Schneider
9c372a145d s3-winbind: Added a common rpc_trusted_domains function. 2010-07-05 15:59:14 +02:00
Andreas Schneider
c4a5fc72c7 s3-winbind: Added a common rpc_sequence_number function. 2010-07-05 15:59:13 +02:00
Andreas Schneider
3c06d42bec s3-winbind: Added a common rpc_lookup_groupmem function. 2010-07-05 15:59:13 +02:00
Andreas Schneider
73b2f60f6d s3-winbind: Added a common rpc_lookup_useraliases function. 2010-07-05 15:59:12 +02:00
Andreas Schneider
473d1f1086 s3-winbind: Added a common rpc_lookup_usergroups function. 2010-07-05 15:59:12 +02:00
Andreas Schneider
7d304d7e99 s3-winbind: Added a common rpc_query_user function. 2010-07-05 15:59:11 +02:00
Andreas Schneider
fd79bc9a58 s3-winbind: Added a common rpc_rids_to_names function. 2010-07-05 15:59:11 +02:00
Andreas Schneider
506dc899b2 s3-winbind: Added a common rpc_sid_to_name function. 2010-07-05 15:59:11 +02:00
Andreas Schneider
37dbfaebc7 s3-winbind: Added a common rpc_name_to_sid function. 2010-07-05 15:59:10 +02:00
Andreas Schneider
89c8ef97c4 s3-winbind: Added a common rpc_enum_local_groups function. 2010-07-05 15:59:10 +02:00