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

36 Commits

Author SHA1 Message Date
Ralph Boehme
490c35df35 winbindd: idmap_rid: error code for failing id-to-sid mapping request
NT_STATUS_NO_SUCH_DOMAIN triggers complete request failure in the parent
winbindd. By returning NT_STATUS_NONE_MAPPED winbindd lets the individual
mapping fail but keeps processing any remaining mapping requests.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13052

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct 10 19:57:37 CEST 2017 on sn-devel-144
2017-10-10 19:57:37 +02:00
Ralph Boehme
108675c4cf winbindd: idmap_rid: don't rely on the static domain list
The domain list in the idmap child is inherited from the parent winbindd
process and may not contain all domains in case enumerating trusted
domains didn't finish before the first winbind request that triggers the
idmap child fork comes along.

The previous commits added the domain SID as an additional argument to
the wbint_UnixIDs2Sids request, storing the domain SID in struct
idmap_domain.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13052

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2017-10-10 15:51:27 +02:00
Jeremy Allison
306783d6f5 lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)
Not currently used - no logic changes inside.

This will make it possible to pass down a long-lived talloc
context from the loading function for modules to use instead
of having them internally all use talloc_autofree_context()
which is a hidden global.

Updated all known module interface numbers, and added a
WHATSNEW.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Ralph Böhme <slow@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
2017-04-22 01:17:00 +02:00
Volker Lendecke
adbabd3f4c idmap_rid: Use idmap_config_int
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2017-03-20 19:36:22 +01:00
Volker Lendecke
a25fb5cae2 idmap_rid: Add the error string in a debug
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Dec 27 18:05:13 CET 2016 on sn-devel-144
2016-12-27 18:05:13 +01:00
Volker Lendecke
5a2c305643 idmap: Fix whitespace
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-01-13 07:48:30 +01:00
Stefan Metzmacher
bbd82b0fee s3:winbindd/idmap_*: make function prototypes available via static_decl_idmap;
This allows the static build of the modules.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-08-20 16:06:21 +02:00
Michael Adam
1eeb4bc0ff idmap_rid: remove a legacy comment from sid_to_id
With the introduction of the ID_TYPE_BOTH mapping
to idmap_rid, it is not a deficiency but a
virtue of the rid backend that it does not
care about the existence or type of the
sid to be mapped.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-25 15:35:08 +02:00
Christof Schmitt
7f2d12c4c0 Rename module init functions from samba_init_module
Some modules use samba_init_module as the name for the init functions,
others use a name based on the module name.

Rename the init functions from samba_init_module, to be consistent
across all modules. This change also allows to build idmap_tdb2 and
perfcount_test statically.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  2 08:50:04 CEST 2014 on sn-devel-104
2014-04-02 08:50:03 +02:00
Michael Adam
55607f0f33 s3:idmap_rid: force mapping type to ID_TYPE_BOTH for sid->unixid mapping
This is to remove problems with the same unix-id being used both
as a uid and a gid.

The rid backend will map a given number to the same SID, no matter whether this
is a uid or a gid. This will prime the idmap cache with mappings.
The sid-to-u/gid mapping, when not going through the cache, instead checks for
the type of the sid and only allows unix ids of the corresponding type.
Hence the rid backend will give different results, depending on whether the
cache is filled or not.

This patch lets the rid backend always create sid->id mappings of type both.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:27 +01:00
Jelmer Vernooij
05bc4de083 Revert making public of the samba-module library.
This library was tiny - containing just two public functions than were
themselves trivial. The amount of overhead this causes isn't really worth the
benefits of sharing the code with other projects like OpenChange. In addition, this code
isn't really generically useful anyway, as it can only load from the module path
set for Samba at configure time.

Adding a new library was breaking the API/ABI anyway, so OpenChange had to be
updated to cope with the new situation one way or another. I've added a simpler
(compatible) routine for loading modules to OpenChange, which is less than 100 lines of code.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec  3 08:36:33 CET 2011 on sn-devel-104
2011-12-03 08:36:30 +01:00
Andrew Bartlett
b256799eaf lib/util Rename samba_init_module -> samba_module_init
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Christian Ambach
a4d245b3e8 s3:winbindd/idmap make idmap modules loadable again
commit 355b5e3a83 changed the module system to
expect 'samba_init_module' as fixed initializer function
2011-10-21 16:30:56 +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
Michael Adam
82853a613b s3:idmap: remove the params argument from the init function 2011-03-22 22:49:56 +01:00
Volker Lendecke
233c8bca3b s3: Remove close_fn from idmap_methods
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 13:37:13 CET 2011 on sn-devel-104
2011-03-06 13:37:13 +01:00
Volker Lendecke
9c5802b841 s3-idmap-rid: private_data is a talloc child of dom 2011-03-06 12:51:01 +01:00
Volker Lendecke
bc940ed4c8 s3: Remove an unnecessary if-statement 2011-03-06 12:51:01 +01:00
Andreas Schneider
0195f35ce1 s3-winbind: Fixed the build of idmap_rid. 2010-10-15 11:34:03 +00:00
Günther Deschner
2b41f421fd s3-idmap: only include idmap headers where needed.
Guenther
2010-08-26 00:20:29 +02:00
Michael Adam
f07049495d s3:idmap_rid: remove a comment that does not apply in that place.
Probably got copied from a different location.
2010-08-14 02:10:55 +02:00
Michael Adam
a758228367 s3:idmap_rid: remove unused domain_name from the idmap_rid_context. 2010-08-14 02:10:55 +02:00
Michael Adam
2916b302f3 s3:idmap_rid: remove range from idmap_rid_context()
Now, the idmap_domain range that is centrally parsed is used.
2010-08-14 02:10:55 +02:00
Michael Adam
ac63c50684 s3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id() 2010-08-14 02:10:55 +02:00
Michael Adam
cda44b9e8e s3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid() 2010-08-14 02:10:55 +02:00
Michael Adam
a6f58b76cc s3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids() 2010-08-14 02:10:55 +02:00
Michael Adam
376e2bcc6e s3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id() 2010-08-14 02:10:54 +02:00
Michael Adam
597292a819 s3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids() 2010-08-14 02:10:54 +02:00
Michael Adam
62833871bc s3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid() 2010-08-14 02:10:54 +02:00
Michael Adam
622bda8a67 s3:idmap_rid: untangle assignment from check in idmap_rid_initialize() 2010-08-14 02:10:54 +02:00
Bo Yang
deb73e87b2 More fix to initialize idmap statuses 2009-03-02 15:51:55 -08:00
Volker Lendecke
340ab6a256 idmap rewrite
(This used to be commit 30a180f2fc)
2008-08-12 11:28:29 +02:00
Volker Lendecke
979496d5c1 Revert "fix typos"
This reverts commit e0957c6f4b.
(This used to be commit 0d2fc3c394)
2008-07-11 17:53:25 +02:00
Volker Lendecke
ec77a06a5d fix typos
(This used to be commit e0957c6f4b)
2008-07-02 14:54:59 +02:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Stefan Metzmacher
28aa4bff8d r25154: move winbindd code into winbindd/
metze
(This used to be commit 3ac7566ae1)
2007-10-10 12:30:46 -05:00