1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Stefan Metzmacher
493f5d6b07 winbindd: allow idmap backends to mark entries with ID_[TYPE_WB_]REQUIRE_TYPE
This must only be used between winbindd parent and child!
It must not leak into outside world.

Some backends require ID_TYPE_UID or ID_TYPE_GID as type_hint,
while others may only need ID_TYPE_BOTH in order to validate that
the domain exists.

This will allow us to skip the wb_lookupsids_send/recv in the winbindd parent
in future and only do that on demand.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14539

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-10-23 03:25:37 +00:00
Volker Lendecke
6f2ccb5973 idmap_tdb: If one SID fails to map, try the rest
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-01-08 09:32:10 +01:00
Volker Lendecke
939d64b9f8 winbind: Use dom_sid_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-12-11 00:40:31 +01:00
Volker Lendecke
fa9e6a50da idmap: Make pointer initialization explicit
Took me a few seconds to find this NULL initializer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-07-26 22:44:24 +02:00
Andreas Schneider
8a108f624d s3:winbindd: Fix size types in idmap_tdb_common
This fixes compilation with -Wstrict-overflow=2

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-03-20 23:16:15 +01:00
Volker Lendecke
7ff3ae7374 idmap_tdb: Avoid a few casts
The times of attempting to be C++ compatible are gone since C compilers
can do very good warnings too.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2017-03-22 07:11:10 +01:00
Volker Lendecke
b64835a109 idmap_tdb: Harden idmap_tdb_common_unixid_to_sid
A non-null terminated record would make string_to_sid read beyond the
end of allocated data.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-12-16 17:38:19 +01:00
Michael Adam
26062b4a9d idmap_tdb_common: remove legacy comment.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-25 15:35:08 +02:00
Michael Adam
11b3937ddd idmap_tdb_common: fix a debug message in idmap_tdb_common_set_mapping()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-04-25 15:35:08 +02:00
Michael Adam
377091a065 idmap_tdb_common: fix a debug message in idmap_tdb_common_unixid_to_sid()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-25 15:35:08 +02:00
Michael Adam
38994f6ff3 s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"
in idmap_tdb_common_sids_to_unixids()
2012-09-20 05:20:38 +02:00
Michael Adam
d1de2b4d39 s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"
in idmap_tdb_common_unixids_to_sids()
2012-09-20 05:20:38 +02:00
Rusty Russell
5716570cbc source3/winbindd/idmap_tdb_common.c: fix stackframe leak
idmap_tdb_common_sid_to_unixid() doesn't always free its stackframe.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 05:05:31 +09:30
Volker Lendecke
a7f4c2b664 s3: Remove an unnecessary ()
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jun 21 16:05:30 CEST 2012 on sn-devel-104
2012-06-21 16:05:30 +02:00
Volker Lendecke
37ad03f91d dbwrap: dbwrap_change_uint32_atomic->dbwrap_change_uint32_atomic_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
7f19a5ab52 dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Christian Ambach
c673237785 s3:winbindd add idmap_tdb_common file to store common code of TDB idmap backends 2012-05-01 09:32:11 +02:00