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

20 Commits

Author SHA1 Message Date
Volker Lendecke
5ba377f3df winbind: Make wb_sids2xids_recv work on an array
The trigger for this is that Coverity got confused by the dual use of &xid
as an array with the implicit length equality between wb_sids2xids_send
and the array passed in to wb_sids2xids_recv for the result.

I don't want to start doing things just for the Coverity scan, but this
makes the code clearer to me by removing this implicit expected array
length equality.

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Mar  7 15:28:59 CET 2015 on sn-devel-104
2015-03-07 15:28:59 +01:00
Michael Adam
8e5ce1e2d5 s3:winbindd: factor winbindd_sids_to_xids into external and internal part
- external part takes winbindd request/reponse structs (with sid strings)
- internal part takes sid lists

The new internal part implements functions wb_sids2xids_* that are
moved into the new module wb_sids2xids.c.

The purpose of this change is to use wb_sids2xids in winbindd_sid_to_uid
and winbindd_sid_to_gid instead of the currently used wb_sid2uid and wb_sid2gid.
We should just have one code path into id mapping and not several that behave
differently.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:21 +01:00
Michael Adam
c58c68d5ba s3:winbindd: convert some spaces to tabs in winbindd_sids_to_xids_send()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:21 +01:00
Michael Adam
349b9ac052 s3:winbindd: add explaining comment winbindd_sids_to_xids_send()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:21 +01:00
Michael Adam
be033a1d16 s3:winbindd: factor lsa_SidType_to_id_type() out of winbindd_sids_to_xids_lookupsids_done()
for readability

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:20 +01:00
Michael Adam
b435e668aa s3:winbindd: simplify winbindd_sids_to_xids_recv() a bit.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:20 +01:00
Christian Ambach
f767059911 s3:winbindd fix a compiler warning
about type potentially being used uninitialized

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Mon Sep 24 03:49:53 CEST 2012 on sn-devel-104
2012-09-24 03:49:53 +02:00
Christian Ambach
1b5256c184 s3:winbindd fix a compiler warning
about result being potentially uninitialized
2012-09-22 23:22:47 +02:00
Stefan Metzmacher
a65173ae68 s3:winbindd: do not expose negative cache idmap entries as valid mappings (bug #9002)
metze
2012-06-21 16:07:15 +02:00
Stefan Metzmacher
2481158a16 s3:winbindd: discard the expired gid cache if we're online (bug #9002)
This matches the uid case...

metze
2012-06-21 16:07:14 +02:00
Andrew Bartlett
c844f65779 s3-idmap: convert most idmap_cache callers to unixid API
This will eventually allow the struct unixid to be passed all the way up
and down the stack.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 13:18:03 +02:00
Andrew Bartlett
0cad493412 s3-winbindd: Do not use WBC_ types internally in winbindd
Use the types from idmap.idl instead

Signed-off-by: Michael Adam <obnox@samba.org>
2012-05-02 13:18:02 +02:00
Volker Lendecke
263c7c28e3 s3: Use the correct enum values
wbcIdType and id_type have the same values, but different names

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Feb 25 23:46:36 CET 2012 on sn-devel-104
2012-02-25 23:46:36 +01:00
Andrew Tridgell
f236c539ad s3-winbindd: add support for idmap type WBC_ID_TYPE_BOTH
this allows the s3 code to understand and cache responses from the s4
winbindd which may include a single SID mapped to both a uid and a gid

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Sep 23 01:47:54 CEST 2011 on sn-devel-104
2011-09-23 01:47:54 +02:00
Herb Lewis
73311f8a30 bug in source3/winbindd/winbindd_sids_to_xids.c
I'm having trouble getting my system setup to do submits right now but
I discovered a bug in the subject file that causes winbindd lookup sids
command to assign incorrect unix ids. The change to sid_peek_rid fixes
the case where you call lookup sids with sids s1 s2 s3 which cause them
to be cached. then call with s1 s2 s4 and s4 will get the unix id of s1.

The other change fixes the case where a sid that was not translated
gets a value returned instead of being listed as unmapped.

Could someone review this and push to master and 3.6 for me?

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jun 10 14:35:21 CEST 2011 on sn-devel-104
2011-06-10 14:35:21 +02: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
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
Volker Lendecke
44cc165627 s3: Use tevent_req_ntstatus properly in a few places
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue May 10 13:11:10 CEST 2011 on sn-devel-104
2011-05-10 13:11:10 +02:00
Volker Lendecke
32bd64359c s3: Add some debug to winbindd_sids_to_xids
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13 14:13:25 -07:00
Volker Lendecke
44f7fc4fdf s3: Export WINBINDD_SIDS_TO_XIDS via the winbind pipe
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13 14:13:25 -07:00