obnox/samba-ctdb.git
13 years agoREADME.samba-3.4.7-ctdb-10: fix typo samba-3.4.7-ctdb-10
Michael Adam [Thu, 26 Aug 2010 15:09:57 +0000 (17:09 +0200)]
README.samba-3.4.7-ctdb-10: fix typo

13 years agoAdd a readme for the samba-3.4.7-ctdb-10 branch.
Michael Adam [Thu, 26 Aug 2010 15:06:55 +0000 (17:06 +0200)]
Add a readme for the samba-3.4.7-ctdb-10 branch.

13 years agoRemove the file README.v3-4-ctdb from the 3.4.7-ctdb-10 branch
Michael Adam [Thu, 26 Aug 2010 15:01:06 +0000 (17:01 +0200)]
Remove the file README.v3-4-ctdb from the 3.4.7-ctdb-10 branch

13 years agosamba-3.4.7-ctdb-10: bump version to 3.4.7-ctdb-10-1
Michael Adam [Mon, 9 Aug 2010 15:32:57 +0000 (17:32 +0200)]
samba-3.4.7-ctdb-10: bump version to 3.4.7-ctdb-10-1

This changes the vendor suffix from "ctdb" to "ctdb-10"
and resets the vendor patch level from 10 to 1.
I.e. this is the start of stabilizing the 3.4.7-ctdb-10 release.
It is currently not possible to specify a vendor patch level
that is not simply an integer (like 10.1), due to the mode
with with the subversion information is assebled in smbd/trans2.c .
Hence the change in the vendor-suffix.

13 years agov3-4-ctdb: fail db_open_ctdb if ctdb is not around
Volker Lendecke [Fri, 6 Aug 2010 10:32:30 +0000 (12:32 +0200)]
v3-4-ctdb: fail db_open_ctdb if ctdb is not around

13 years agoFurther refine the time_audit warning message
Volker Lendecke [Wed, 28 Jul 2010 15:02:43 +0000 (17:02 +0200)]
Further refine the time_audit warning message

13 years agos3: Modify the warning time_audit warning message
Volker Lendecke [Wed, 28 Jul 2010 09:21:50 +0000 (11:21 +0200)]
s3: Modify the warning time_audit warning message

Now we have

System call "disk_free" took unexpectedly long (0.01 seconds) -- check your file system and disks!

13 years agos3: Log the correct core path on Linux if core_pattern is set
Volker Lendecke [Fri, 23 Jul 2010 10:22:23 +0000 (12:22 +0200)]
s3: Log the correct core path on Linux if core_pattern is set

Contributions from Bill Hymas, IBM

13 years agov3-4-ctdb: Bump up the vendor patch level to 10
Volker Lendecke [Mon, 5 Jul 2010 11:00:40 +0000 (13:00 +0200)]
v3-4-ctdb: Bump up the vendor patch level to 10

13 years agov3-4-ctdb: Re-arrange winbindd_ads.c:query_user
Volker Lendecke [Thu, 1 Jul 2010 14:31:30 +0000 (16:31 +0200)]
v3-4-ctdb: Re-arrange winbindd_ads.c:query_user

We can't access the LDAP message after nss_get_info_cached has potentially
destroyed the ads_struct

13 years agos3: Fix a winbind crash
Volker Lendecke [Fri, 25 Jun 2010 09:47:30 +0000 (11:47 +0200)]
s3: Fix a winbind crash

nss_get_info_cached might deep inside sequence_number() invalidate the
ads_struct without telling its callers.

13 years agos3: Fix a winbind crash
Volker Lendecke [Tue, 22 Jun 2010 13:59:44 +0000 (15:59 +0200)]
s3: Fix a winbind crash

nss_get_info_cached might have invalidated "ads" deep inside.

13 years ago v3-4-ctdb: Bump up the vendor patch level to 9 3.4.7-ctdb-9
Michael Adam [Wed, 23 Jun 2010 11:07:23 +0000 (13:07 +0200)]
 v3-4-ctdb: Bump up the vendor patch level to 9

13 years agos3:net rpc registry: make getsd succeed when key sd only gives access to SD not key...
Michael Adam [Mon, 21 Jun 2010 10:32:14 +0000 (12:32 +0200)]
s3:net rpc registry: make getsd succeed when key sd only gives access to SD not key contents

You don't need the REG_KEY_READ permissions to access the SD of a key.
And for instance, the key HKLM\security ususally has no specific bits
set for builtin\administrators, but the READ_CONTROL_ACCESS.
I.e. builtin\administrators can get the sd but not enumerate the key.

13 years agos3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping
Michael Adam [Wed, 23 Jun 2010 10:02:31 +0000 (12:02 +0200)]
s3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping

13 years agos3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init()
Michael Adam [Wed, 23 Jun 2010 10:18:35 +0000 (12:18 +0200)]
s3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init()

13 years agos3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping
Michael Adam [Wed, 23 Jun 2010 10:02:31 +0000 (12:02 +0200)]
s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping

13 years agos3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db
Michael Adam [Wed, 23 Jun 2010 10:12:37 +0000 (12:12 +0200)]
s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db

13 years agos3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping
Michael Adam [Wed, 23 Jun 2010 10:02:31 +0000 (12:02 +0200)]
s3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping

13 years agos3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init
Michael Adam [Wed, 23 Jun 2010 10:01:47 +0000 (12:01 +0200)]
s3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init

13 years agos3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends
Michael Adam [Mon, 31 May 2010 15:12:32 +0000 (17:12 +0200)]
s3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends

13 years agos3:winbindd: make sure we only call static_init_idmap once
Stefan Metzmacher [Mon, 31 May 2010 08:57:52 +0000 (10:57 +0200)]
s3:winbindd: make sure we only call static_init_idmap once

metze

Signed-off-by: Michael Adam <obnox@samba.org>
13 years agos3:winbind Ensure we always init idmap_passdb before we use it
Andrew Bartlett [Mon, 24 May 2010 04:55:17 +0000 (14:55 +1000)]
s3:winbind Ensure we always init idmap_passdb before we use it

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>
13 years agos3:idmap_ad: untangle two assignments from checks
Michael Adam [Tue, 22 Jun 2010 12:13:55 +0000 (14:13 +0200)]
s3:idmap_ad: untangle two assignments from checks

13 years agos3:idmap_ad: remove unused filter_low_id and filter_high_id from idmap_ad_context
Michael Adam [Tue, 22 Jun 2010 12:12:14 +0000 (14:12 +0200)]
s3:idmap_ad: remove unused filter_low_id and filter_high_id from idmap_ad_context

The filter range from the idmap_domain is used now.

13 years agos3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids()
Michael Adam [Tue, 22 Jun 2010 12:09:57 +0000 (14:09 +0200)]
s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids()

13 years agos3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids()
Michael Adam [Tue, 22 Jun 2010 11:13:57 +0000 (13:13 +0200)]
s3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids()

13 years agos3:idmap_rid: remove a comment that does not apply in that place.
Michael Adam [Tue, 22 Jun 2010 10:47:41 +0000 (12:47 +0200)]
s3:idmap_rid: remove a comment that does not apply in that place.

Probably got copied from a different location.

13 years agos3:idmap_rid: remove unused domain_name from the idmap_rid_context.
Michael Adam [Tue, 22 Jun 2010 10:44:22 +0000 (12:44 +0200)]
s3:idmap_rid: remove unused domain_name from the idmap_rid_context.

13 years agos3:idmap_rid: remove range from idmap_rid_context()
Michael Adam [Tue, 22 Jun 2010 10:42:52 +0000 (12:42 +0200)]
s3:idmap_rid: remove range from idmap_rid_context()

Now, the idmap_domain range that is centrally parsed is used.

13 years agos3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id()
Michael Adam [Tue, 22 Jun 2010 10:42:06 +0000 (12:42 +0200)]
s3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id()

13 years agos3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid()
Michael Adam [Tue, 22 Jun 2010 10:38:19 +0000 (12:38 +0200)]
s3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid()

13 years agos3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids()
Michael Adam [Tue, 22 Jun 2010 10:32:35 +0000 (12:32 +0200)]
s3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids()

13 years agos3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id()
Michael Adam [Tue, 22 Jun 2010 10:31:41 +0000 (12:31 +0200)]
s3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id()

13 years agos3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids()
Michael Adam [Tue, 22 Jun 2010 10:30:58 +0000 (12:30 +0200)]
s3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids()

13 years agos3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid()
Michael Adam [Tue, 22 Jun 2010 10:29:57 +0000 (12:29 +0200)]
s3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid()

13 years agos3:idmap_rid: untangle assignment from check in idmap_rid_initialize()
Michael Adam [Mon, 21 Jun 2010 15:28:37 +0000 (17:28 +0200)]
s3:idmap_rid: untangle assignment from check in idmap_rid_initialize()

13 years agos3:idmap_ldap: add my (C)
Michael Adam [Wed, 23 Jun 2010 10:39:59 +0000 (12:39 +0200)]
s3:idmap_ldap: add my (C)

13 years agos3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids()
Michael Adam [Thu, 17 Jun 2010 19:55:02 +0000 (21:55 +0200)]
s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids()

13 years agos3:idmap_ldap: remove unreached code (and explicit error return code)
Michael Adam [Thu, 17 Jun 2010 18:48:53 +0000 (20:48 +0200)]
s3:idmap_ldap: remove unreached code (and explicit error return code)

13 years agos3:idmap_ldap: add a idmap_ldap_new_mapping().
Michael Adam [Thu, 17 Jun 2010 18:19:46 +0000 (20:19 +0200)]
s3:idmap_ldap: add a idmap_ldap_new_mapping().

High level function to create a new mapping for an unmapped sid.
This builds logic that used to reside in the top level idmap code
in the backend.

13 years agos3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain
Michael Adam [Thu, 17 Jun 2010 18:18:27 +0000 (20:18 +0200)]
s3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain

Currently this only works with the default domain, calling out
to idmap_ldap_allocate_id(). In the future this will be extended
to also work for non-default domains.

13 years agos3:idmap_ldap: move idmap_ldap_set_mapping() further up.
Michael Adam [Thu, 17 Jun 2010 18:15:25 +0000 (20:15 +0200)]
s3:idmap_ldap: move idmap_ldap_set_mapping() further up.

13 years agos3:idmap_ldap: make idmap_ldap_alloc_context a member of idmap_ldap_context
Michael Adam [Thu, 17 Jun 2010 17:45:39 +0000 (19:45 +0200)]
s3:idmap_ldap: make idmap_ldap_alloc_context a member of idmap_ldap_context

this hides this beneath the idmap structure and removes a global variable

13 years agos3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.
Michael Adam [Thu, 17 Jun 2010 17:17:48 +0000 (19:17 +0200)]
s3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.

The alloc subsystem is now subordinate to the idmap system.

13 years agos3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context
Michael Adam [Thu, 17 Jun 2010 17:03:46 +0000 (19:03 +0200)]
s3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context

13 years agos3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()
Michael Adam [Thu, 17 Jun 2010 17:03:12 +0000 (19:03 +0200)]
s3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()

Second step in removing the idmap range from the idmap_ldap_alloc_context.

13 years agos3:idmap_ldap: add idmap_domain arg to idmap_ldap_alloc_init and verify_idpool
Michael Adam [Thu, 17 Jun 2010 16:59:28 +0000 (18:59 +0200)]
s3:idmap_ldap: add idmap_domain arg to idmap_ldap_alloc_init and verify_idpool

First step in removing idmap ranges from the idmap_ldap_alloc_context.
The range from the domain is to be used now.

13 years agos3:idmap_ldap: remove unused filter range from struct idmap_ldap_context
Michael Adam [Thu, 17 Jun 2010 08:16:54 +0000 (10:16 +0200)]
s3:idmap_ldap: remove unused filter range from struct idmap_ldap_context

13 years agos3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain
Michael Adam [Thu, 17 Jun 2010 08:16:20 +0000 (10:16 +0200)]
s3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain

13 years agos3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context
Michael Adam [Thu, 17 Jun 2010 08:00:49 +0000 (10:00 +0200)]
s3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context

13 years agos3:idmap_ldap: re-implement allocate_id in idmap methods.
Michael Adam [Tue, 22 Jun 2010 12:49:00 +0000 (14:49 +0200)]
s3:idmap_ldap: re-implement allocate_id in idmap methods.

13 years agos3:idmap_tdb: add my (C)
Michael Adam [Thu, 17 Jun 2010 07:39:11 +0000 (09:39 +0200)]
s3:idmap_tdb: add my (C)

13 years agos3:idmap_tdb: properly initialize the idmap_tdb context with zero
Michael Adam [Tue, 22 Jun 2010 07:01:32 +0000 (09:01 +0200)]
s3:idmap_tdb: properly initialize the idmap_tdb context with zero

13 years agos3:idmap_tdb: prevent opening the idmap db more than once.
Michael Adam [Thu, 17 Jun 2010 07:35:52 +0000 (09:35 +0200)]
s3:idmap_tdb: prevent opening the idmap db more than once.

13 years agos3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids.
Michael Adam [Thu, 17 Jun 2010 06:53:54 +0000 (08:53 +0200)]
s3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids.

13 years agos3:idmap_tdb: add a idmap_tdb_new_mapping().
Michael Adam [Thu, 17 Jun 2010 06:44:04 +0000 (08:44 +0200)]
s3:idmap_tdb: add a idmap_tdb_new_mapping().

High level function to create a new mapping for an unmapped sid.
This builds logic that used to reside in the top level idmap code
in the backend. To be called inside a transaction to guarantee
atomicity of the operation.

13 years agos3:idmap_tdb: move the set_mapping code up
Michael Adam [Thu, 17 Jun 2010 06:43:11 +0000 (08:43 +0200)]
s3:idmap_tdb: move the set_mapping code up

13 years agos3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping().
Michael Adam [Thu, 17 Jun 2010 06:35:28 +0000 (08:35 +0200)]
s3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping().

13 years agos3:idmap_tdb: remove unused struct idmap_tdb_state.
Michael Adam [Thu, 17 Jun 2010 07:47:27 +0000 (09:47 +0200)]
s3:idmap_tdb: remove unused struct idmap_tdb_state.

13 years agos3:idmap_tdb: remove unused idmap_alloc_db
Michael Adam [Thu, 17 Jun 2010 06:17:39 +0000 (08:17 +0200)]
s3:idmap_tdb: remove unused idmap_alloc_db

13 years agos3:idmap_tdb: remove unused idmap_tdb_alloc_close().
Michael Adam [Thu, 17 Jun 2010 06:17:06 +0000 (08:17 +0200)]
s3:idmap_tdb: remove unused idmap_tdb_alloc_close().

13 years agos3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->db
Michael Adam [Thu, 17 Jun 2010 06:16:05 +0000 (08:16 +0200)]
s3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->db

instead of alloc_db

13 years agos3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db().
Michael Adam [Thu, 17 Jun 2010 06:12:43 +0000 (08:12 +0200)]
s3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db().

13 years agos3:idmap_tdb: move idmap_tdb_init_hwm up.
Michael Adam [Thu, 17 Jun 2010 06:11:19 +0000 (08:11 +0200)]
s3:idmap_tdb: move idmap_tdb_init_hwm up.

13 years agos3:idmap_tdb: remove unused idmap_tdb_load_ranges()
Michael Adam [Thu, 17 Jun 2010 06:07:40 +0000 (08:07 +0200)]
s3:idmap_tdb: remove unused idmap_tdb_load_ranges()

The idmap_tdb_state (which should actually be called idmap_tdb_alloc_context)
is being removed since the alloc part is combined with the id mapping part.

13 years agos3:idmap_tdb: have idmap_tdb_open_db take an idmap_domain struct as argument
Michael Adam [Wed, 23 Jun 2010 08:53:29 +0000 (10:53 +0200)]
s3:idmap_tdb: have idmap_tdb_open_db take an idmap_domain struct as argument

the other arguments are not needed any more and are removed.

13 years agos3:idmap_tdb: rename idmap_tdb_alloc_init->idmap_tdb_init_hwm and use db from idmap_t...
Michael Adam [Thu, 17 Jun 2010 05:56:46 +0000 (07:56 +0200)]
s3:idmap_tdb: rename idmap_tdb_alloc_init->idmap_tdb_init_hwm and use db from idmap_tdb_context

instead of the special idmap_alloc_db

13 years agos3:idmap_tdb: move definition of struct idmap_tdb_context up.
Michael Adam [Thu, 17 Jun 2010 05:51:15 +0000 (07:51 +0200)]
s3:idmap_tdb: move definition of struct idmap_tdb_context up.

13 years agos3:idmap_tdb: remove filter_low_id,filter_high_id from idmap_tdb_context
Michael Adam [Thu, 17 Jun 2010 05:43:14 +0000 (07:43 +0200)]
s3:idmap_tdb: remove filter_low_id,filter_high_id from idmap_tdb_context

These are now taken from the idmap_domain struct.

13 years agos3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range
Michael Adam [Thu, 17 Jun 2010 07:46:08 +0000 (09:46 +0200)]
s3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range

13 years agos3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context
Michael Adam [Thu, 17 Jun 2010 05:42:00 +0000 (07:42 +0200)]
s3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context

13 years agos3:idmap_tdb: give idmap domain argument to idmap_tdb_sid_to_id
Michael Adam [Thu, 17 Jun 2010 05:35:28 +0000 (07:35 +0200)]
s3:idmap_tdb: give idmap domain argument to idmap_tdb_sid_to_id

instead of idmap_tdb_context. This is in preparation of using the
filter from the idmap_domain struct.

13 years agos3:idmap_tdb: give idmap domain argument to idmap_tdb_id_to_sid
Michael Adam [Thu, 17 Jun 2010 05:32:12 +0000 (07:32 +0200)]
s3:idmap_tdb: give idmap domain argument to idmap_tdb_id_to_sid

instead of idmap_tdb_context. This is in preparation of using the
filter from the idmap_domain struct.

13 years agos3:idmap_tdb: implement allocate_id in idmap methods for tdb backend
Michael Adam [Tue, 22 Jun 2010 12:41:31 +0000 (14:41 +0200)]
s3:idmap_tdb: implement allocate_id in idmap methods for tdb backend

13 years agos3:idmap_tdb: add idmap_tdb_get_new_id() to allocate a new id given a domain
Michael Adam [Wed, 16 Jun 2010 07:26:17 +0000 (09:26 +0200)]
s3:idmap_tdb: add idmap_tdb_get_new_id() to allocate a new id given a domain

Currently this only works with the default domain, calling out
to idmap_tdb_allocate_id(). In the future this will be extended
to also work for non-default domains.

13 years agos3:idmap_tdb: convert idmap_tdb_allocate_id() to use transaction wrappers
Michael Adam [Wed, 16 Jun 2010 07:19:21 +0000 (09:19 +0200)]
s3:idmap_tdb: convert idmap_tdb_allocate_id() to use transaction wrappers

13 years agos3:idmap_tdb2: add my (C)
Michael Adam [Thu, 17 Jun 2010 07:39:24 +0000 (09:39 +0200)]
s3:idmap_tdb2: add my (C)

13 years agos3:idmap_tdb2: move idmap_tdb2_new_mapping() up. spare a prototype.
Michael Adam [Wed, 23 Jun 2010 09:30:56 +0000 (11:30 +0200)]
s3:idmap_tdb2: move idmap_tdb2_new_mapping() up. spare a prototype.

13 years agos3:idmap_tdb2: get rid of an extra variable in idmap_tdb2_db_init().
Michael Adam [Wed, 16 Jun 2010 07:31:53 +0000 (09:31 +0200)]
s3:idmap_tdb2: get rid of an extra variable in idmap_tdb2_db_init().

13 years agos3:idmap_tdb2: move idmap_tdb2_set_mapping() up to its _action callback.
Michael Adam [Thu, 17 Jun 2010 06:23:25 +0000 (08:23 +0200)]
s3:idmap_tdb2: move idmap_tdb2_set_mapping() up to its _action callback.

13 years agos3:idmap_tdb2: use the right talloc context for db_open in idmap_tdb2_open_db()
Michael Adam [Thu, 17 Jun 2010 06:04:53 +0000 (08:04 +0200)]
s3:idmap_tdb2: use the right talloc context for db_open in idmap_tdb2_open_db()

13 years agos3:idmap_tdb2: don't check whether sid is already mapped in idmap_tdb2_new_mapping().
Michael Adam [Wed, 16 Jun 2010 20:02:54 +0000 (22:02 +0200)]
s3:idmap_tdb2: don't check whether sid is already mapped in idmap_tdb2_new_mapping().

idmap_tdb2_new_mapping() is called from inside a transaction only
with sids, that have been verified not to be mapped directly before
that in the same transaction.

13 years agos3:idmap_tdb2: add the db_context to the idmap_tdb2_context
Michael Adam [Wed, 16 Jun 2010 15:40:12 +0000 (17:40 +0200)]
s3:idmap_tdb2: add the db_context to the idmap_tdb2_context

this removes the idmap_tdb2 global variable

13 years agos3:idmap_tdb2: talloc_zero (instead of talloc) the idmap_tdb2_context
Michael Adam [Wed, 16 Jun 2010 20:36:33 +0000 (22:36 +0200)]
s3:idmap_tdb2: talloc_zero (instead of talloc) the idmap_tdb2_context

13 years agos3:idmap_tdb2: rename idmap_tdb2_alloc_load -> idmap_tdb2_init_hwm
Michael Adam [Wed, 16 Jun 2010 15:30:07 +0000 (17:30 +0200)]
s3:idmap_tdb2: rename idmap_tdb2_alloc_load -> idmap_tdb2_init_hwm

13 years agos3:idmap_tdb2: move idmap_tdb2_alloc_load() up to reduce need for prototype
Michael Adam [Wed, 16 Jun 2010 15:28:34 +0000 (17:28 +0200)]
s3:idmap_tdb2: move idmap_tdb2_alloc_load() up to reduce need for prototype

13 years agos3:idmap_tdb2: remove unused idmap_tdb2_state and idmap_tdb2_load_ranges
Michael Adam [Wed, 16 Jun 2010 15:26:26 +0000 (17:26 +0200)]
s3:idmap_tdb2: remove unused idmap_tdb2_state and idmap_tdb2_load_ranges

13 years agos3:idmap_tdb2: give idmap_tdb2_alloc_load() and idmap domain arguemnt
Michael Adam [Wed, 16 Jun 2010 15:24:40 +0000 (17:24 +0200)]
s3:idmap_tdb2: give idmap_tdb2_alloc_load() and idmap domain arguemnt

and use the ranges from the idmap domain for checking the HWM values

13 years agos3:idmap_tdb2: add an idmap_domain struct argument to idmap_tdb2_open_db()
Michael Adam [Wed, 16 Jun 2010 15:21:27 +0000 (17:21 +0200)]
s3:idmap_tdb2: add an idmap_domain struct argument to idmap_tdb2_open_db()

13 years agos3:idmap_tdb2: remove filter_low_id, filter_high_id, read_only from idmap_tdb2_context
Michael Adam [Wed, 16 Jun 2010 15:31:52 +0000 (17:31 +0200)]
s3:idmap_tdb2: remove filter_low_id, filter_high_id, read_only from idmap_tdb2_context

Now these are taken from the idmap_domain struct.

13 years agos3:idmap_tdb2: don't parse config and fill filter_low_id,filter_high_id,read_only
Michael Adam [Wed, 16 Jun 2010 15:17:44 +0000 (17:17 +0200)]
s3:idmap_tdb2: don't parse config and fill filter_low_id,filter_high_id,read_only

into idmap_tdb2_context in idmap_tdb2_db_init().
Now these are taken from the idmap_domain struct instead.

13 years agos3:idmap_tdb2: use read_only flag from idmap_domain in idmap_tdb2_sids_to_unixids().
Michael Adam [Wed, 16 Jun 2010 15:16:23 +0000 (17:16 +0200)]
s3:idmap_tdb2: use read_only flag from idmap_domain in idmap_tdb2_sids_to_unixids().

13 years agos3:idmap_tdb2: use range from idmap_domain in idmap_tdb2_allocate_id
Michael Adam [Wed, 16 Jun 2010 15:14:51 +0000 (17:14 +0200)]
s3:idmap_tdb2: use range from idmap_domain in idmap_tdb2_allocate_id

13 years agos3:idmap_tdb2: use filter from idmap_domain rather than from idmap_tdb2_context
Michael Adam [Wed, 16 Jun 2010 15:12:44 +0000 (17:12 +0200)]
s3:idmap_tdb2: use filter from idmap_domain rather than from idmap_tdb2_context

13 years agos3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to idmap_tdb2_sid_to_id
Michael Adam [Wed, 16 Jun 2010 15:06:17 +0000 (17:06 +0200)]
s3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to idmap_tdb2_sid_to_id

13 years agos3:idmap_tdb2: pass idmap_domain instead of idmap_tdb2_context to idmap_tdb2_unixids_...
Michael Adam [Wed, 16 Jun 2010 14:02:07 +0000 (16:02 +0200)]
s3:idmap_tdb2: pass idmap_domain instead of idmap_tdb2_context to idmap_tdb2_unixids_to_sids

The reason for this will become apparent later: The ranges are being moved to
the idmap_domain: They are universal.

13 years agos3:idmap_tdb2: also support idmap script for named domains
Michael Adam [Wed, 16 Jun 2010 13:49:30 +0000 (15:49 +0200)]
s3:idmap_tdb2: also support idmap script for named domains

this can be configured via "idmap config DOMAIN : script = foobar"

13 years agos3:idmap_tdb2: move the idmap script from idmap_tdb2_state to idmap_tdb2_context
Michael Adam [Wed, 16 Jun 2010 13:47:23 +0000 (15:47 +0200)]
s3:idmap_tdb2: move the idmap script from idmap_tdb2_state to idmap_tdb2_context

The state (aka idmap_tdb2_alloc_context) is being removed.
The (global) idmap script was wrong there anyways.
It belongs to the per-domain context.

13 years agos3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_id
Michael Adam [Wed, 16 Jun 2010 13:31:55 +0000 (15:31 +0200)]
s3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_id

idmap_tdb2_state should actually be called idmap_tdb2_alloc_context.
This is being removed as the idmap and allocation is moved together.
We use the idmap_tdb2_context * that is sitting in dom->private_data.
This contains the same ranges as those in the state anyways.
Later, when we can also allocate for named domains, this will become
necessary anyways.