summaryrefslogtreecommitdiffstats
path: root/source3/winbindd/idmap.c
Commit message (Collapse)AuthorAgeFilesLines
* winbind: Fix CID 1273294 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* winbind: Fix CID 1273295 Uninitialized scalar variableVolker Lendecke2015-03-041-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* winbind: Fix idmap initializationVolker Lendecke2015-01-221-6/+8
| | | | | | | | | | | | | | | | | | The fix is in the sscanf line: %u in the sscanf format mandates the use of a pointer to an "unsigned". idmap_domain->[low|high]_id are uint32_t. On little endian 64-bit this might at least put the correct values into low_id and high_id, but might overwrite the read_only bit set earlier, depending on structure alignment and packing. On big endian 64-bit, this will just fail. Automatic conversion to uint32_t will happen only at assignment, not when you take a pointer of such a thing. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jan 22 17:58:16 CET 2015 on sn-devel-104
* s3:idmap: fix talloc hierarchy in idmap_passdb_domain()Michael Adam2014-07-251-1/+1
| | | | | | | | | | (don't init to NULL context - we got one handed in...) Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jul 25 14:18:20 CEST 2014 on sn-devel-104
* s3:idmap: only check the range values if a range setting has been found.Michael Adam2014-07-251-3/+1
| | | | | | | | Otherwise, the check is superfluous since high and low values are initialized to 0. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:idmap: move loading of idmap options together before range checking in ↵Michael Adam2014-07-251-4/+4
| | | | | | | idmap_init_domain() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:idmap: in idmap_init_domain() load methods before loading further configMichael Adam2014-07-251-18/+23
| | | | | | | | Check whether the requested backend exists at all, before going further into the config parsing. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:idmap: don't log missing range config if range checking not requestedMichael Adam2014-07-251-2/+2
| | | | | | | | | | | | | | idmap_init_domain() is called with check_range == false from idmap_passdb_domain(). In this case, we usually don't have an idmap range at all, and we don't want to level 1 debug messages complaining about the fact are irritating at least. This patch removes the debug in the case of check_range == false. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10737 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3-winbindd: Honour pdb_is_responsible_for_everything_else()Andrew Bartlett2014-06-161-8/+11
| | | | | | | | | | | This allows us to avoid running idmap_init_default_domain() which gives an error in the default AD DC config. Andrew Bartlett Change-Id: I923bd941951f6a907e6fa1ad167e5218a01040ff Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* s3:idmap: fix a debug message and lower its levelMichael Adam2013-03-081-1/+2
| | | | | | | | | | | | It is not an error to be logged at level 1 when a domain has no explicitly configured idmap backend. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Mar 8 03:16:54 CET 2013 on sn-devel-104
* s3:winbindd: use the new sid_check_is_for_passdb() in ↵Michael Adam2012-12-031-6/+2
| | | | | | | | | | | idmap_find_domain_with_sid() This is more correct than the original one: It also hands the wellknown and "Unix Users" and "Unix Groups" sids to passdb for id mapping. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: remove unused function idmap_backends_sid_to_unixid()Michael Adam2012-12-031-41/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: make idmap_find_domain() static.Michael Adam2012-12-031-1/+1
| | | | | | | idmap_find_domain_with_sid() should be used instead Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: add idmap_find_domain_with_sid()Michael Adam2012-12-031-0/+16
| | | | | | | | | This will return the passdb domain if the given sid is in our sam or builtin or is the domain sid of those domains. Otherwise it returns the idmap domain that results from the idmap configuration. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: rename idmap_init_passdb_domain() -> idmap_passdb_domain()Michael Adam2012-12-031-3/+3
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-winbind: Fix idmap initialization debug message.Guenther Deschner2012-07-231-1/+1
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jul 23 18:19:00 CEST 2012 on sn-devel-104
* s3: rename sid_check_is_in_our_domain() to sid_check_is_in_our_sam()Michael Adam2012-07-121-1/+1
| | | | | | | | | This does not check whether the given sid is in our domain, but but whether it belongs to the local sam, which is a different thing on a domain member server. Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 12 18:36:02 CEST 2012 on sn-devel-104
* s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* s3: Make idmap_find_domain publicVolker Lendecke2011-04-131-1/+1
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3-passdb: use passdb headers where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3:idmap: make sure that the id mapping system is initialized for first accessMichael Adam2011-03-221-0/+4
|
* s3:idmap: remove (now) unneeded function parse_idmap_module()Michael Adam2011-03-221-38/+0
|
* s3:idmap: simply call idmap_init_named_domain for "*" in ↵Michael Adam2011-03-221-41/+14
| | | | | | | idmap_init_default_domain The default domain "*" is now treated exactly the same as other explicitly configured domains.
* s3:idmap: remove passdb argument from idmap_init_domain()Michael Adam2011-03-221-5/+3
|
* s3:idmap: remove the params argument from the init functionMichael Adam2011-03-221-1/+1
|
* s3:idmap: remove the special treatment of the default domain "*" from ↵Michael Adam2011-03-221-65/+23
| | | | idmap_init_domain
* s3: Remove close_fn from idmap_methodsVolker Lendecke2011-03-061-14/+0
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Mar 6 13:37:13 CET 2011 on sn-devel-104
* s3:winbindd/idmap.c: add my CMichael Adam2011-01-031-0/+1
|
* Second part of fix for bug #7777 - When requesting lookups for BUILTIN sids, ↵Jeremy Allison2010-11-081-1/+3
| | | | | | | | | | | | winbindd allocates new uids/gids in error. Ensure we return after calling passdb for SID lookups for which we are authoritative. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Nov 8 22:24:34 UTC 2010 on sn-devel-104
* First part of fix for bug #7777 - When requesting lookups for BUILTIN sids, ↵Jeremy Allison2010-11-081-0/+10
| | | | | | | | | winbindd allocates new uids/gids in error. Ensure idmap_init_passdb_domain() correctly initialized the default domain first. Jeremy.
* s3-idmap: only include idmap headers where needed.Günther Deschner2010-08-261-0/+1
| | | | Guenther
* s3:idmap: fix sid_to_unixid for builtin and own domain.Michael Adam2010-08-141-2/+12
| | | | | | | The old idmap code created a new mapping if asking the backends failed. Now with the new layering, if passdb (which is used for our own domain and builtin), then we need to continue and ask the backends, giving tdb or whatever the default backend is a chance to create a mapping.
* s3:idmap: fix spacing/indentationMichael Adam2010-08-141-2/+2
|
* s3:idmap: don't check range for passdb idmap domainMichael Adam2010-08-141-21/+30
|
* s3:idmap: parse ranges and "read only" in idmap_init_domain().Michael Adam2010-08-141-0/+78
|
* s3:idmap: remove idmap_alloc_context from idmap.cMichael Adam2010-08-141-14/+0
| | | | | | | | The registering of alloc backends is being removed. The idmap backends are responsible for initializing their alloc code on their own if necessary. No list of alloc backends is maintained any more in the top level.
* s3:idmap: remove the alloc methods list from idmap.cMichael Adam2010-08-141-12/+0
| | | | | | | | The registering of alloc backends is being removed. The idmap backends are responsible for initializing their alloc code on their own if necessary. No list of alloc backends is maintained any more in the top level.
* s3:idmap: remove unused get_alloc_methods().Michael Adam2010-08-141-13/+0
|
* s3:idmap: remove unused smb_register_idmap_alloc().Michael Adam2010-08-141-49/+0
| | | | | | The registering of alloc backends is being removed. The idmap backends are responsible for initializing their alloc code on their own if necessary.
* s3:idmap: remove unused idmap_alloc_init().Michael Adam2010-08-141-79/+0
|
* s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()Michael Adam2010-08-141-4/+12
| | | | The idmap alloc methods are being removed.
* s3:idmap: factor out common code of idmap_allocate_uid|gid()Michael Adam2010-08-141-10/+9
| | | | into new idmap_allocate_unixid().
* s3:idmap: remove idmap_new_mapping() - now implemented in the backendsMichael Adam2010-08-141-68/+0
|
* s3:idmap: remove unused idmap_remove_mapping().Michael Adam2010-08-141-17/+0
| | | | Michael
* s3:idmap: remove unused idmap_set_mapping().Michael Adam2010-08-141-17/+0
| | | | Michael
* s3:idmap: remove unused idmap_set_gid_hwm()Michael Adam2010-08-141-13/+0
| | | | Michael
* s3:idmap: remove unused idmap_set_uid_hwm()Michael Adam2010-08-141-13/+0
| | | | Michael
* s3:winbindd: make sure we only call static_init_idmap onceStefan Metzmacher2010-06-011-7/+18
| | | | | | metze Signed-off-by: Michael Adam <obnox@samba.org>
* s3:winbind Ensure we always init idmap_passdb before we use itAndrew Bartlett2010-06-011-0/+4
| | | | | | | | | | It seems that it is possible for idmap_init_passdb_domain() to be run before idmap_init_domain(), so ensure we run the static init functions in both. Andrew Bartlett Signed-off-by: Michael Adam <obnox@samba.org>
* s3:idmap: fix a comment typoMichael Adam2009-05-271-1/+1
| | | | Michael