[SCM] Samba Shared Repository - branch v3-6-test updated

Michael Adam obnox at samba.org
Fri Aug 13 18:42:24 MDT 2010


The branch, v3-6-test has been updated
       via  a21b0b2... s3:idmap: fix sid_to_unixid for builtin and own domain.
       via  4159048... s3:idmap: fix spacing/indentation
       via  c6a88cf... s3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping
       via  33e35cc... s3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init()
       via  502405a... s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping
       via  9973cea... s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db
       via  698d542... s3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping
       via  9d6c204... s3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init
       via  eb89a64... s3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends
       via  f1c3286... s3:idmap_ad: untangle two assignments from checks
       via  fa735eb... s3:idmap_ad: remove unused filter_low_id and filter_high_id from idmap_ad_context
       via  726a8c2... s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids()
       via  7eeed25... s3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids()
       via  1f02264... s3:idmap_rid: remove a comment that does not apply in that place.
       via  06197db... s3:idmap_rid: remove unused domain_name from the idmap_rid_context.
       via  4532455... s3:idmap_rid: remove range from idmap_rid_context()
       via  b289abe... s3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id()
       via  219f3b7... s3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid()
       via  99518e7... s3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids()
       via  3304020... s3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id()
       via  946c89c... s3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids()
       via  cfedf68... s3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid()
       via  7b9b9f0... s3:idmap_rid: untangle assignment from check in idmap_rid_initialize()
       via  54e1ba5... s3:idmap_ldap: add my (C)
       via  ec997b0... s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids()
       via  ccfb698... s3:idmap_ldap: add a idmap_ldap_new_mapping().
       via  00cb9ae... s3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain
       via  4b25cc0... s3:idmap_ldap: move idmap_ldap_set_mapping() further up.
       via  51b0db0... s3:idmap_ldap: make idmap_ldap_alloc_context a member of idmap_ldap_context
       via  2fb6cec... s3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.
       via  a59d378... s3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context
       via  836351c... s3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()
       via  70ad965... s3:idmap_ldap: add idmap_domain arg to idmap_ldap_alloc_init and verify_idpool
       via  e28ba63... s3:idmap_ldap: remove unused filter range from struct idmap_ldap_context
       via  cadbed7... s3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain
       via  aea355a... s3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context
       via  dd63335... s3:idmap_ldap: re-implement allocate_id in idmap methods.
       via  843eff2... s3:idmap_tdb: add my (C)
       via  5e21116... s3:idmap_tdb: properly initialize the idmap_tdb context with zero
       via  51bd9a9... s3:idmap_tdb: prevent opening the idmap db more than once.
       via  75d95ce... s3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids.
       via  0787ecc... s3:idmap_tdb: add a idmap_tdb_new_mapping().
       via  9baf941... s3:idmap_tdb: move the set_mapping code up
       via  316ec56... s3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping().
       via  fe1ce43... s3:idmap_tdb: remove unused struct idmap_tdb_state.
       via  a387ac0... s3:idmap_tdb: remove unused idmap_alloc_db
       via  44b9eb1... s3:idmap_tdb: remove unused idmap_tdb_alloc_close().
       via  176857e... s3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->db
       via  c9c89d7... s3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db().
       via  7e75b36... s3:idmap_tdb: move idmap_tdb_init_hwm up.
       via  263d77c... s3:idmap_tdb: remove unused idmap_tdb_load_ranges()
       via  d467141... s3:idmap_tdb: have idmap_tdb_open_db take an idmap_domain struct as argument
       via  dbb8029... s3:idmap_tdb: rename idmap_tdb_alloc_init->idmap_tdb_init_hwm and use db from idmap_tdb_context
       via  323dba8... s3:idmap_tdb: move definition of struct idmap_tdb_context up.
       via  f66e989... s3:idmap_tdb: remove filter_low_id,filter_high_id from idmap_tdb_context
       via  5f06f69... s3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range
       via  7864784... s3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context
       via  bd9f5b7... s3:idmap_tdb: give idmap domain argument to idmap_tdb_sid_to_id
       via  e634368... s3:idmap_tdb: give idmap domain argument to idmap_tdb_id_to_sid
       via  d1c2715... s3:idmap_tdb: implement allocate_id in idmap methods for tdb backend
       via  3c7c19b... s3:idmap_tdb: add idmap_tdb_get_new_id() to allocate a new id given a domain
       via  3f6fd20... s3:idmap_tdb: convert idmap_tdb_allocate_id() to use transaction wrappers
       via  e09718f... s3:idmap_tdb: remove an extra blank line
       via  011beed... s3:idmap_tdb2: add my (C)
       via  4ead929... s3:idmap_tdb2: move idmap_tdb2_new_mapping() up. spare a prototype.
       via  28529f5... s3:idmap_tdb2: get rid of an extra variable in idmap_tdb2_db_init().
       via  8765a94... s3:idmap_tdb2: move idmap_tdb2_set_mapping() up to its _action callback.
       via  35afa54... s3:idmap_tdb2: use the right talloc context for db_open in idmap_tdb2_open_db()
       via  be15ee3... s3:idmap_tdb2: don't check whether sid is already mapped in idmap_tdb2_new_mapping().
       via  832ded7... s3:idmap_tdb2: add the db_context to the idmap_tdb2_context
       via  4bc0552... s3:idmap_tdb2: talloc_zero (instead of talloc) the idmap_tdb2_context
       via  b02e824... s3:idmap_tdb2: rename idmap_tdb2_alloc_load -> idmap_tdb2_init_hwm
       via  78f8441... s3:idmap_tdb2: move idmap_tdb2_alloc_load() up to reduce need for prototype
       via  16824af... s3:idmap_tdb2: remove unused idmap_tdb2_state and idmap_tdb2_load_ranges
       via  e4e7060... s3:idmap_tdb2: give idmap_tdb2_alloc_load() and idmap domain arguemnt
       via  a5e4696... s3:idmap_tdb2: add an idmap_domain struct argument to idmap_tdb2_open_db()
       via  eaf9f05... s3:idmap_tdb2: remove filter_low_id and filter_high_id from idmap_tdb2_context
       via  7fae8f2... s3:idmap_tdb2: don't parse config and fill filter_low_id and filter_high_id
       via  558e311... s3:idmap_tdb2: honour the "idmap read only" flag in the tdb2 module.
       via  eb71269... s3:idmap_tdb2: use range from idmap_domain in idmap_tdb2_allocate_id
       via  7d35ced... s3:idmap_tdb2: use filter from idmap_domain rather than from idmap_tdb2_context
       via  f826387... s3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to idmap_tdb2_sid_to_id
       via  2df9157... s3:idmap_tdb2: pass idmap_domain instead of idmap_tdb2_context to idmap_tdb2_unixids_to_sids
       via  514d406... s3:idmap_tdb2: also support idmap script for named domains
       via  687a7d7... s3:idmap_tdb2: move the idmap script from idmap_tdb2_state to idmap_tdb2_context
       via  2b98c5f... s3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_id
       via  ce3e560... s3:idmap_tdb2: move definition of struct idmap_tdb2_context up.
       via  b412754... s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init().
       via  912d3dc... s3:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixids
       via  92215d1... s3:idmap_tdb2: re-implement allocated_id in idmap methods.
       via  cb337df... s3:idmap: add idmap_unix_id_is_in_range() for checking an id against an idmap range
       via  a3a8cd9... s3:idmap: don't check range for passdb idmap domain
       via  203f3fe... s3:idmap: parse ranges and "read only" in idmap_init_domain().
       via  f5ae065... s3:idmap: add a read_only flag to the idmap_domain struct.
       via  9555a10... s3:idmap: add low_id and high_id to the idmap_domain struct
       via  3416b70... s3:docs: fix net manpage to reflect removal of net "idmap secret alloc" feature
       via  b773a10... s3:net: remove the "net idmap secret alloc" functionality.
       via  2ab80e2... s3:docs: add documentation for new "idmap read only" parameter
       via  2142d17... s3:loadparm: add new boolean parameter "idmap read only"
       via  7520532... s3:docs: remove documentation of removed parameter "idmap alloc backend"
       via  be8e6b6... s3:loadparm: remove parameter "idmap alloc backend"
       via  a34d092... s3:idmap: remove unused definition of idmap_alloc_methods.
       via  2a5222d... s3:idmap: remove idmap_alloc_context from idmap.c
       via  c3aec10... s3:idmap: remove the alloc methods list from idmap.c
       via  556609b... s3:idmap: remove unused get_alloc_methods().
       via  493df89... s3:idmap: remove unused smb_register_idmap_alloc().
       via  fb48387... s3:idmap_ldap: remove unused idmap_ldap_alloc_methods.
       via  32ff774... s3:idmap_ldap: remoce unused idmap_alloc_ldap_init
       via  3926325... s3:idmap_ldap: don't call idmap_alloc_ldap_init in idmap_ldap_init
       via  8e763d0... s3:idmap_tdb: remove unused idmap_alloc_methods
       via  8b6a039... s3:idmap_tdb: remove unused idmap_alloc_tdb_init()
       via  3cf1d6c... s3:idmap_tdb: don't call idmap_alloc_tdb_init in idmap_tdb_init
       via  21746f9... s3:idmap_tdb2: remove unused idmap_tdb2_alloc_init().
       via  30c142e... s3:idmap_tdb2: remove unused idmap_tdb2_alloc_close().
       via  0b1c5d3... s3:idmap_tdb2: remove unused idmap_alloc_methods.
       via  f6b0dbd... s3:idmap_tdb2: don't call smb_register_idmap_alloc() in idmap_tdb2_init
       via  10fc3a2... s3:idmap_tdb: make idmap_alloc_tdb_init() static.
       via  c371da5... s3:idmap: remove unused idmap_alloc_init().
       via  dba12aa... s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()
       via  59cae55... s3:idmap: add an allocate_id method to the idmap_methods struct.
       via  6011f7e... s3:idmap: factor out common code of idmap_allocate_uid|gid()
       via  883e226... s3:idmap: remove the set_mapping method from the idmap API
       via  33a87e2... s3:idmap: remove idmap_new_mapping() - now implemented in the backends
       via  e08d958... s3:idmap: add a debug message to idmap_sid_to_gid
       via  995cc51... s3:idmap: add a debug message to idmap_sid_to_uid
       via  bb2b4d2... s3:idmap: don't call idmap_new_mapping idmap_sid_to_gid
       via  b8bebcf... s3:idmap: don't call idmap_new_mapping idmap_sid_to_unixid.
       via  6f618fb... s3:winbind: increase interface version after removing calls
       via  51b59d1... s3:idmap: remove unused method set_id_hwm from idmap API
       via  e4d1ff8... s3:idmap: remove unused alloc method get_id_hwm from idmap API
       via  19452a4... s3:idmap: remove unused method dump_data() from the idmap API
       via  4d9906b... s3:idmap: remove the remove_mapping method from API and backends
       via  69044c7... s3:idmap: remove unused idmap_remove_mapping().
       via  a077fc1... s4: remove REMOVE_MAPPING from wb_samba3_protocol
       via  a8a4cff... s3:winbind: remove the method REMOVE_MAPPING from winbind's API
       via  a025513... s3:idmap: remove unused idmap_set_mapping().
       via  0eac879... s4: remove SET_MAPPING from wb_samba3_protocol
       via  c31f60e... s3:winbind: remove the method SET_MAPPING from winbind's API
       via  8af0379... libwbclient: unimplement wbcRemoveGidMapping()
       via  78ea3e6... libwbclient: unimplement wbcRemoveUidMapping()
       via  fd870f3... libwbclient: unimplement wbcSetGidMapping()
       via  8a2698a... libwbclient: unimplement wbcSetUidMapping()
       via  b9ddb07... s3:idmap: remove unused idmap_set_gid_hwm()
       via  603524c... s3:idmap: remove unused idmap_set_uid_hwm()
       via  2998253... s4: remove SET_HWM and SET_DUAL_HWM from wb_samba3_protocol
       via  c9c472c... s3:winbind: remove SET_HWM from winbind's API.
       via  98e6dd8... libwbclient: unimplement wbcSetGidHwm()
       via  fed7200... libwbclient: unimplement wbcSetUidHwm()
       via  82585cd... s3:net: rewrite "net idmap restore" using dbwrap
       via  e4f535b... s3:net: change "net idmap dump" to use dbwrap instead of direct tdb access
       via  2fc7fbd... s3:net sam provision: compose sid before getting uid for Guest
       via  ed03802... s3:net sam provision: allocate the uid after composing the sid for Administrator
       via  07384a3... s3:pdb_ldap: move some code in ldapsam_create_dom_group()
       via  818cc18... s3:groupdb: allocate a gid after allocating a rid in pdb_default_create_alias()
       via  2bcd266... s3:idmap_tdb2: fix a debug message
      from  22e2090... pidl: fix printing of server side ndr request debug messages

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit a21b0b22c75b253f9d366c9bf9117a45df214059
Author: Michael Adam <obnox at samba.org>
Date:   Fri Aug 13 17:26:36 2010 +0200

    s3:idmap: fix sid_to_unixid for builtin and own domain.
    
    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.

commit 4159048e381a29daa81876cca9841eb9189a6fff
Author: Michael Adam <obnox at samba.org>
Date:   Fri Aug 13 16:15:38 2010 +0200

    s3:idmap: fix spacing/indentation

commit c6a88cfd90b8f081b0b93af9cc6423af2878cdf1
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 12:02:31 2010 +0200

    s3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping

commit 33e35cc4bab16903c2d89ac7363881005e7647f8
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 12:18:35 2010 +0200

    s3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init()

commit 502405a8a027d9700f5009c8d1cab1ed46a3ae2c
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 12:02:31 2010 +0200

    s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping

commit 9973ceaa4122aae02fc55cd5a7da6b4c4babb04b
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 12:12:37 2010 +0200

    s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db

commit 698d5429df315f21f8762247cb04312f81188010
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 12:02:31 2010 +0200

    s3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping

commit 9d6c204c1b543aeaad96fe4db9ce84dbb04bd782
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 12:01:47 2010 +0200

    s3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init

commit eb89a64250d976d34b20785a90921c9269cd44c4
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 17:12:32 2010 +0200

    s3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends

commit f1c32861c847efe531f3cfcacc8dcf235847c8cc
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 14:13:55 2010 +0200

    s3:idmap_ad: untangle two assignments from checks

commit fa735eb9bbefd3720e7a979a33c3f544325482e3
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 14:12:14 2010 +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.

commit 726a8c279c8d78650552a165c401563e9f9b9df4
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 14:09:57 2010 +0200

    s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids()

commit 7eeed2538b355a97673bf772fd76475066a10d16
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 13:13:57 2010 +0200

    s3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids()

commit 1f02264c9e0e37d66eadf594fc0700bcfe2e2f77
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:47:41 2010 +0200

    s3:idmap_rid: remove a comment that does not apply in that place.
    
    Probably got copied from a different location.

commit 06197dbb8e2267b59129d0a30e532b33c8b9daa7
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:44:22 2010 +0200

    s3:idmap_rid: remove unused domain_name from the idmap_rid_context.

commit 4532455353a2ced4ce9da0cdd787a059e24b34e9
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:42:52 2010 +0200

    s3:idmap_rid: remove range from idmap_rid_context()
    
    Now, the idmap_domain range that is centrally parsed is used.

commit b289abe0cd41e9bc8309ba9a713c6b035229804c
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:42:06 2010 +0200

    s3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id()

commit 219f3b7ce241261408e3ce2eb324f35b98aa12b4
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:38:19 2010 +0200

    s3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid()

commit 99518e7eca42dc65bf6c624f2dd64a9ca6e5670e
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:32:35 2010 +0200

    s3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids()

commit 330402031eaa72f76d76d48d17d36987efb93324
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:31:41 2010 +0200

    s3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id()

commit 946c89c0f356055c22d4497e4b265be5b1d1a910
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:30:58 2010 +0200

    s3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids()

commit cfedf68009918e07215bd3fbfcf5e59b8ba63eaf
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 12:29:57 2010 +0200

    s3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid()

commit 7b9b9f094a124700cf31f7ff9b49fe1daff74851
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 21 17:28:37 2010 +0200

    s3:idmap_rid: untangle assignment from check in idmap_rid_initialize()

commit 54e1ba5da5e9edd48b0d73a027987d5616924364
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 12:39:59 2010 +0200

    s3:idmap_ldap: add my (C)

commit ec997b0a04a2cadcb3d262afd5dfd06355df8818
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 21:55:02 2010 +0200

    s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids()

commit ccfb698c88cd3402992109e4443c1e835191b83b
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 20:19:46 2010 +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.

commit 00cb9aedaed11ae114c5ac41589e5df94be8439e
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 20:18:27 2010 +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.

commit 4b25cc09874da240bb41a16c4ed0203ebe183ebc
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 20:15:25 2010 +0200

    s3:idmap_ldap: move idmap_ldap_set_mapping() further up.

commit 51b0db00edcef3497ca92b851f0da82b78316e38
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 19:45:39 2010 +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

commit 2fb6cec08d588bddd56e7b2da9876b6ca9b0b978
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 19:17:48 2010 +0200

    s3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.
    
    The alloc subsystem is now subordinate to the idmap system.

commit a59d3785761c15f37f3b95a8ed12fcc290427269
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 19:03:46 2010 +0200

    s3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context

commit 836351cb800f681c2c461a342b51105b3221191e
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 19:03:12 2010 +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.

commit 70ad965b8207c00c9a83676856ca096d1dac684e
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 18:59:28 2010 +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.

commit e28ba638f3e4564246b235c8ec8b473202a4c09a
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 10:16:54 2010 +0200

    s3:idmap_ldap: remove unused filter range from struct idmap_ldap_context

commit cadbed7335f49c821c92e634b633adb841019ee5
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 10:16:20 2010 +0200

    s3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain

commit aea355a06655ee50fc24a331c674beb2f0e73c45
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 10:00:49 2010 +0200

    s3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context

commit dd63335ac890ab975bbfdc6703a6e8376f627b9b
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 14:49:00 2010 +0200

    s3:idmap_ldap: re-implement allocate_id in idmap methods.

commit 843eff2f507780bf21adac8cd30364bae78713dc
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 09:39:11 2010 +0200

    s3:idmap_tdb: add my (C)

commit 5e21116a654c1682e18b2f4af701af6f3724d787
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 09:01:32 2010 +0200

    s3:idmap_tdb: properly initialize the idmap_tdb context with zero

commit 51bd9a97fddb6b65d6646bf888c0a44f32752793
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 09:35:52 2010 +0200

    s3:idmap_tdb: prevent opening the idmap db more than once.

commit 75d95ce5f3f30779935f0743f4da1d2553b9560f
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:53:54 2010 +0200

    s3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids.

commit 0787ecc1584e354e9aa0810bc320af5f6e9e635a
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:44:04 2010 +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.

commit 9baf941ce974fbe18bc83200298af66d0d3c8df8
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:43:11 2010 +0200

    s3:idmap_tdb: move the set_mapping code up

commit 316ec56538e4929abe3e916caf262c881047583e
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:35:28 2010 +0200

    s3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping().

commit fe1ce43c92cdd86ef12f4ad53ebb369e1a5ccfc2
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 09:47:27 2010 +0200

    s3:idmap_tdb: remove unused struct idmap_tdb_state.

commit a387ac094894f737661d4076e95d66e67053195b
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:17:39 2010 +0200

    s3:idmap_tdb: remove unused idmap_alloc_db

commit 44b9eb10d59818052d72799653f0c01498cf5050
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:17:06 2010 +0200

    s3:idmap_tdb: remove unused idmap_tdb_alloc_close().

commit 176857e9e6aac2b7eccfb9f788aa143929901986
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:16:05 2010 +0200

    s3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->db
    
    instead of alloc_db

commit c9c89d76b02b6efc85ab30de82dc94f46e533106
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:12:43 2010 +0200

    s3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db().

commit 7e75b36a8617b278dc380f045d0ae03c964c0ac5
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:11:19 2010 +0200

    s3:idmap_tdb: move idmap_tdb_init_hwm up.

commit 263d77c1e92732dc72b784f96f8bf91ac09ac87f
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:07:40 2010 +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.

commit d467141e012fa64a90f8059472bf8fbae444103b
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 10:53:29 2010 +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.

commit dbb802953791dc1acc97f28655cf81900db6aef7
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 07:56:46 2010 +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

commit 323dba879a66ff2da1726b2259c0d0b147c60973
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 07:51:15 2010 +0200

    s3:idmap_tdb: move definition of struct idmap_tdb_context up.

commit f66e98976e4a40b45c11967c96ba37a10db907de
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 07:43:14 2010 +0200

    s3:idmap_tdb: remove filter_low_id,filter_high_id from idmap_tdb_context
    
    These are now taken from the idmap_domain struct.

commit 5f06f697d34d2a5b25586bf2192fe578c6a10468
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 09:46:08 2010 +0200

    s3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range

commit 7864784aee76d1f71dfc4ef9c4366e9c0f423eb8
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 07:42:00 2010 +0200

    s3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context

commit bd9f5b76e4f2a206761535567655f55344384576
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 07:35:28 2010 +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.

commit e634368bf2f60984128934805c0352a3389e44dc
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 07:32:12 2010 +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.

commit d1c2715c50af1e7ae01636ed6c49ff3794f58d16
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 14:41:31 2010 +0200

    s3:idmap_tdb: implement allocate_id in idmap methods for tdb backend

commit 3c7c19b191419d970f9444d525f65ce7349e9f3d
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 09:26:17 2010 +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.

commit 3f6fd206e016412c236edec656d61349b4ca9bae
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 09:19:21 2010 +0200

    s3:idmap_tdb: convert idmap_tdb_allocate_id() to use transaction wrappers

commit e09718fa2fd9434aa659ec55cdd5e248e09cfde2
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 15 09:12:49 2010 +0200

    s3:idmap_tdb: remove an extra blank line

commit 011beed432b884799d4077f64a8f5f8e40b25239
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 09:39:24 2010 +0200

    s3:idmap_tdb2: add my (C)

commit 4ead92961996f81e0d77ce4a20638893ab85596a
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 11:30:56 2010 +0200

    s3:idmap_tdb2: move idmap_tdb2_new_mapping() up. spare a prototype.

commit 28529f5fba13d1d3640568e3848549ea9481e19c
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 09:31:53 2010 +0200

    s3:idmap_tdb2: get rid of an extra variable in idmap_tdb2_db_init().

commit 8765a94c793a47ec578f8871227bc9248f113101
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:23:25 2010 +0200

    s3:idmap_tdb2: move idmap_tdb2_set_mapping() up to its _action callback.

commit 35afa54c6943804faf738a6b6e6a5c9e7c00a386
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 08:04:53 2010 +0200

    s3:idmap_tdb2: use the right talloc context for db_open in idmap_tdb2_open_db()

commit be15ee3a58c4f0d55535aee1e1022bc4087a46cf
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 22:02:54 2010 +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.

commit 832ded7ebed9ff59b04a0abe616a2d81153549c4
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:40:12 2010 +0200

    s3:idmap_tdb2: add the db_context to the idmap_tdb2_context
    
    this removes the idmap_tdb2 global variable

commit 4bc0552a75f45dabb59817bc07e742a417657030
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 22:36:33 2010 +0200

    s3:idmap_tdb2: talloc_zero (instead of talloc) the idmap_tdb2_context

commit b02e82441a6a27fb406e74d780a5835f0a5ab5e5
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:30:07 2010 +0200

    s3:idmap_tdb2: rename idmap_tdb2_alloc_load -> idmap_tdb2_init_hwm

commit 78f84418ea2650beb3f13d04c497e645442a3d63
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:28:34 2010 +0200

    s3:idmap_tdb2: move idmap_tdb2_alloc_load() up to reduce need for prototype

commit 16824af26f6ce18d225c5b7be31d1d4bac38a1a1
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:26:26 2010 +0200

    s3:idmap_tdb2: remove unused idmap_tdb2_state and idmap_tdb2_load_ranges

commit e4e70606741b089585987baa9256c8c16a94e9dd
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:24:40 2010 +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

commit a5e46968d7de6dd9c374fe8f559531cec2bf3af5
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:21:27 2010 +0200

    s3:idmap_tdb2: add an idmap_domain struct argument to idmap_tdb2_open_db()

commit eaf9f053277e4fd925da5d04c641788aecaaf116
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:31:52 2010 +0200

    s3:idmap_tdb2: remove filter_low_id and filter_high_id from idmap_tdb2_context
    
    Now these are taken from the idmap_domain struct.

commit 7fae8f252c539f23e10d742d6fb117bc949365c3
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:17:44 2010 +0200

    s3:idmap_tdb2: don't parse config and fill filter_low_id and filter_high_id
    
    into idmap_tdb2_context in idmap_tdb2_db_init().
    Now these are taken from the idmap_domain struct instead.

commit 558e311ce2e56523a158658fdd5eb1cda82d844d
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 1 16:45:51 2010 +0200

    s3:idmap_tdb2: honour the "idmap read only" flag in the tdb2 module.
    
    Note that this will not prevent the idmap script from writing its
    mappings to the database, but no new unix ids will be allocated via
    the allocator and hence no new mappings will be autogenerated.

commit eb7126904c564c243de89ad9393a520a93a4c64e
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:14:51 2010 +0200

    s3:idmap_tdb2: use range from idmap_domain in idmap_tdb2_allocate_id

commit 7d35ceded8dbe72953a605cbe63225d0c871b7c6
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:12:44 2010 +0200

    s3:idmap_tdb2: use filter from idmap_domain rather than from idmap_tdb2_context

commit f82638769b355ba89580b1ee4f6d81ee7e384ddc
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 17:06:17 2010 +0200

    s3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to idmap_tdb2_sid_to_id

commit 2df9157ccf7b31d0a0ab7a2e16b1c909d068e5a0
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 16:02:07 2010 +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.

commit 514d406d9f6c00ba7025c82c8a995f93379ad11f
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 15:49:30 2010 +0200

    s3:idmap_tdb2: also support idmap script for named domains
    
    this can be configured via "idmap config DOMAIN : script = foobar"

commit 687a7d776983fe68307e07e45c56af3aea0ffb2a
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 15:47:23 2010 +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.

commit 2b98c5f2313fbfe047673eab7ab73befc177680e
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 15:31:55 2010 +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.

commit ce3e5601f5393b667acd091dce86ee0d09a5a1c9
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 15:31:05 2010 +0200

    s3:idmap_tdb2: move definition of struct idmap_tdb2_context up.

commit b412754456f33daf373d5c23ca316e71de3baaa1
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 15:08:16 2010 +0200

    s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init().

commit 912d3dc5b4a6d27fc29719f6f6077bfbcdf3bdcc
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jul 29 23:13:54 2010 +0200

    s3:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixids
    
    This moves the new_mapping feature inside the tdb2 backend to make creations
    of mappings atomic.
    
    Note: The new internal function idmap_tdb2_get_new_id() that is used to allocate
    a new unix id is prepared to function for multiple explicitly configured idmap
    domains, but currently it does only work for the default domain. The extended
    allocation support requires extension of the data base format to store multiple
    counters (per domain). This will be added in a later step (TODO!).

commit 92215d1de02cccd7665f50d039c2e7bca19c48f2
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 14:47:11 2010 +0200

    s3:idmap_tdb2: re-implement allocated_id in idmap methods.

commit cb337df6ed36fb87ab878949d8d93af46674fd9b
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 16:59:26 2010 +0200

    s3:idmap: add idmap_unix_id_is_in_range() for checking an id against an idmap range

commit a3a8cd96fddb70873dcb1f4ba00c135cef5720ce
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 16:29:13 2010 +0200

    s3:idmap: don't check range for passdb idmap domain

commit 203f3feed9ece70085cfff8a4ee952e7316750a8
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 16:07:55 2010 +0200

    s3:idmap: parse ranges and "read only" in idmap_init_domain().

commit f5ae06544f44f895b7ad7773efe4bcad24948692
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jul 29 17:51:13 2010 +0200

    s3:idmap: add a read_only flag to the idmap_domain struct.
    
    This will be used to mark "allocating backends" (tdb, tdb2, ldap) read-only.

commit 9555a10577ab2bccdd21a379286babb6b9bb06cc
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 16 16:05:34 2010 +0200

    s3:idmap: add low_id and high_id to the idmap_domain struct
    
    This global data will replace the backend-specific filter_low_id
    and filter_high_id. The presence of a range is generic to all
    idmap configs.

commit 3416b7094fe9649b281c4ada882f582f9f2df97a
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 15:55:01 2010 +0200

    s3:docs: fix net manpage to reflect removal of net "idmap secret alloc" feature

commit b773a106db4e54dc6273a23273e5276e0582d602
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 15:00:38 2010 +0200

    s3:net: remove the "net idmap secret alloc" functionality.
    
    This is now not available any more, since allocation is moved
    below the id mapping layer. The functionality could be
    reintroduced on a per domain basis as an e.g
    "net idmap secret <domain> alloc" command.

commit 2ab80e2e7dffeb5341b5020cc046733d558787df
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jul 30 15:15:47 2010 +0200

    s3:docs: add documentation for new "idmap read only" parameter

commit 2142d1728ac0b2957d1edaa4a95220012cc67089
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 1 15:35:01 2010 +0200

    s3:loadparm: add new boolean parameter "idmap read only"
    
    This will be used to be able to put the default idmap config
    read only. This can make sense for instance with the tdb2
    idmap backend and using the idmap script feature.

commit 7520532042f548c7f0b75976e9727b332467139e
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jul 30 15:01:37 2010 +0200

    s3:docs: remove documentation of removed parameter "idmap alloc backend"

commit be8e6b649be6198e9bb52bfcec13f472cfa758f5
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 15:53:27 2010 +0200

    s3:loadparm: remove parameter "idmap alloc backend"

commit a34d092911363b40ff89e5bd5db7b31fa7d24d66
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:56:55 2010 +0200

    s3:idmap: remove unused definition of idmap_alloc_methods.
    
    Allocation is now completely handled in the allocating backends.

commit 2a5222de3785adc6993c42b4f9fa58850f65ff77
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:55:18 2010 +0200

    s3:idmap: remove idmap_alloc_context from idmap.c
    
    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.

commit c3aec10984bda6b8fc24981e1393d483633f83ea
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:47:04 2010 +0200

    s3:idmap: remove the alloc methods list from idmap.c
    
    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.

commit 556609b56126428713f3b8e775d8a97c51fd410b
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:45:58 2010 +0200

    s3:idmap: remove unused get_alloc_methods().

commit 493df894b62835f0fe6d3ad514d0b2fa962fbf97
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:44:44 2010 +0200

    s3:idmap: remove unused smb_register_idmap_alloc().
    
    The registering of alloc backends is being removed.
    The idmap backends are responsible for initializing
    their alloc code on their own if necessary.

commit fb48387d637c823f79e7e80df87006d4be6ab20f
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:41:05 2010 +0200

    s3:idmap_ldap: remove unused idmap_ldap_alloc_methods.

commit 32ff774281aac9c95dcf1ef6d026113e642f93e8
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:38:58 2010 +0200

    s3:idmap_ldap: remoce unused idmap_alloc_ldap_init

commit 392632505b2c590392a97757843af7b57c5522f7
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:37:40 2010 +0200

    s3:idmap_ldap: don't call idmap_alloc_ldap_init in idmap_ldap_init
    
    The registering of alloc backends is being removed.
    The idmap backends are responsible for initializing
    their alloc code on their own if necessary.

commit 8e763d0ed91adcd8e39697df61b6ad0300326a2d
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:34:46 2010 +0200

    s3:idmap_tdb: remove unused idmap_alloc_methods

commit 8b6a03925ceaaec83530d3b0c7539766fdb224d5
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:33:34 2010 +0200

    s3:idmap_tdb: remove unused idmap_alloc_tdb_init()

commit 3cf1d6c5177769425054700358e887558a3969de
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:32:20 2010 +0200

    s3:idmap_tdb: don't call idmap_alloc_tdb_init in idmap_tdb_init
    
    The registering of alloc backends is being removed.
    The idmap backends are responsible for initializing
    their alloc code on their own if necessary.

commit 21746f9411ef9172a70fa4f905bebff449d89da7
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:29:00 2010 +0200

    s3:idmap_tdb2: remove unused idmap_tdb2_alloc_init().

commit 30c142e6133d9156a50993f20e30d686859dbc9d
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:28:02 2010 +0200

    s3:idmap_tdb2: remove unused idmap_tdb2_alloc_close().

commit 0b1c5d3b9bc526d07cc9589aeb2a68d0d6187f84
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:27:18 2010 +0200

    s3:idmap_tdb2: remove unused idmap_alloc_methods.

commit f6b0dbd34abfc869adb710895f0e1c4bbdbb704e
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:24:52 2010 +0200

    s3:idmap_tdb2: don't call smb_register_idmap_alloc() in idmap_tdb2_init
    
    The registering of alloc backends is being removed.
    The idmap backends are responsible for initializing
    their alloc code on their own if necessary.

commit 10fc3a2f659d26f3ade0ca1e8bd5579434b961b7
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 10:14:18 2010 +0200

    s3:idmap_tdb: make idmap_alloc_tdb_init() static.

commit c371da52ed87cb2546e86fe39c358ad1ee51cece
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 00:27:23 2010 +0200

    s3:idmap: remove unused idmap_alloc_init().

commit dba12aa3e2c74fe318c43f825a2b0198158305da
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jul 29 23:20:21 2010 +0200

    s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()
    
    The idmap alloc methods are being removed.

commit 59cae55fa8c30aaf29b9a675b84146fd160936c7
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 22 14:31:24 2010 +0200

    s3:idmap: add an allocate_id method to the idmap_methods struct.
    
    The idmap_alloc_methods are being removed, but this single "alloc" method
    is still needed for the samba-wide Unix-ID allocator, which is used in
    group-mapping and ldapsam:editposix.
    This method should ultimately also disappear.

commit 6011f7ecc1a14ceb1ac65cf8eb511baa249c609d
Author: Michael Adam <obnox at samba.org>
Date:   Sun May 30 21:40:44 2010 +0200

    s3:idmap: factor out common code of idmap_allocate_uid|gid()
    
    into new idmap_allocate_unixid().

commit 883e2268c84e0122298a9e22a0536ea826bb46e1
Author: Michael Adam <obnox at samba.org>
Date:   Wed May 19 10:20:08 2010 +0200

    s3:idmap: remove the set_mapping method from the idmap API

commit 33a87e2a43d50e9a26486727b582e99bf4ce3f5e
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 20 10:28:03 2010 +0200

    s3:idmap: remove idmap_new_mapping() - now implemented in the backends

commit e08d9589df0171ce3e64b20473be8bca44904cd2
Author: Michael Adam <obnox at samba.org>
Date:   Sun May 16 00:32:10 2010 +0200

    s3:idmap: add a debug message to idmap_sid_to_gid

commit 995cc519970c29c6aaa290968ac6afe7bc34e062
Author: Michael Adam <obnox at samba.org>
Date:   Sun May 16 00:31:39 2010 +0200

    s3:idmap: add a debug message to idmap_sid_to_uid

commit bb2b4d2ad7665c2f55cec42dc7b61dc50cbc93e4
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 14 16:19:46 2010 +0200

    s3:idmap: don't call idmap_new_mapping idmap_sid_to_gid
    
    The setting of a new mapping is moved into the backend code
    to achieve atomicity and greater flexibility.
    
    Michael

commit b8bebcf5b9b71c01a39c7c3e4219a87149888d8d
Author: Michael Adam <obnox at samba.org>
Date:   Fri May 14 16:18:16 2010 +0200

    s3:idmap: don't call idmap_new_mapping idmap_sid_to_unixid.
    
    The setting of a new mapping is moved into the backend code
    to achieve atomicity and greater flexibility.
    
    Michael

commit 6f618fb8407c358eaf708bde117afa810604fdba
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 18:05:20 2009 +0100

    s3:winbind: increase interface version after removing calls
    
    Michael

commit 51b59d14ffac27831706d7e0a2d38b7cae388f53
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 17:59:18 2009 +0100

    s3:idmap: remove unused method set_id_hwm from idmap API
    
    Michael

commit e4d1ff8c3a8bad8bbdfeedbc52e6670fb085d300
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 17:56:19 2009 +0100

    s3:idmap: remove unused alloc method get_id_hwm from idmap API
    
    Michael

commit 19452a41799ecc95a1f667f38b6589dd60f8f240
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 15:52:34 2009 +0100

    s3:idmap: remove unused method dump_data() from the idmap API
    
    Michael

commit 4d9906b57f5edc34c1d388f5e82e7b689502a7e4
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 14:44:24 2009 +0100

    s3:idmap: remove the remove_mapping method from API and backends
    
    Michael

commit 69044c7f80ec1580f9f09d2e3e4792970102d3e9
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 14:38:21 2009 +0100

    s3:idmap: remove unused idmap_remove_mapping().
    
    Michael

commit a077fc131c1d2499902288e5f903ed988e0a3ac9
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 14:36:51 2009 +0100

    s4: remove REMOVE_MAPPING from wb_samba3_protocol
    
    Michael

commit a8a4cffb74fa7221f36754d3e8e74f3fc3ee9c07
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 14:34:50 2009 +0100

    s3:winbind: remove the method REMOVE_MAPPING from winbind's API
    
    Michael

commit a025513f539f8c844a526863a6be954695eaf3c9
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 14:31:55 2009 +0100

    s3:idmap: remove unused idmap_set_mapping().
    
    Michael

commit 0eac879ba6aed5ef27a5aa5be948c44ce1d8bbf6
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 14:30:25 2009 +0100

    s4: remove SET_MAPPING from wb_samba3_protocol
    
    Michael

commit c31f60efca65b47cf1b6329f10fbcd814f5fe8c8
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 14:29:15 2009 +0100

    s3:winbind: remove the method SET_MAPPING from winbind's API
    
    Michael

commit 8af0379c10a4156f8bd255c8799b7a5403e099ef
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:57:21 2009 +0100

    libwbclient: unimplement wbcRemoveGidMapping()
    
    Michael

commit 78ea3e6396ae72d53f4ed08993df5a08705fde78
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:56:09 2009 +0100

    libwbclient: unimplement wbcRemoveUidMapping()
    
    Michael

commit fd870f3259afae0a659ed025a65eca7c431482c2
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:54:03 2009 +0100

    libwbclient: unimplement wbcSetGidMapping()
    
    Michael

commit 8a2698a504080729c826d4d3b131111e36727816
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:51:53 2009 +0100

    libwbclient: unimplement wbcSetUidMapping()
    
    Michael

commit b9ddb07538d39916b258848ced8325a2662751f4
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:49:42 2009 +0100

    s3:idmap: remove unused idmap_set_gid_hwm()
    
    Michael

commit 603524cacfa9d2c84063a95ea20b7a5292fe3fc7
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:49:06 2009 +0100

    s3:idmap: remove unused idmap_set_uid_hwm()
    
    Michael

commit 29982536eb91a57dba5f84239cc9ecf116882de1
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:46:25 2009 +0100

    s4: remove SET_HWM and SET_DUAL_HWM from wb_samba3_protocol
    
    Michael

commit c9c472c3b33a56910bd3fadf4316c8fe548fa3c6
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 28 00:34:29 2010 +0200

    s3:winbind: remove SET_HWM from winbind's API.

commit 98e6dd8ca79318fe7abcf1f8371f77389f2b73b9
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:39:33 2009 +0100

    libwbclient: unimplement wbcSetGidHwm()
    
    Michael

commit fed7200d6005c862bc2be7ba05f652ec625d2950
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:37:11 2009 +0100

    libwbclient: unimplement wbcSetUidHwm()
    
    Michael

commit 82585cd64d765a7a4013b5e22dd87c7797402597
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:33:54 2009 +0100

    s3:net: rewrite "net idmap restore" using dbwrap
    
    This removes the use of libwbclient from "net idmap".
    
    This detects the idmap backend from the current smb.conf
    and stores the id mapping tables in the corresponding data bases.
    Currently, only tdb and tdb2 backends are supported.
    Support for the ldap backend may be implemented later.

commit e4f535b89aeb4ffed66f1d7debc5f1454b0a8fa7
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 14 12:25:11 2010 +0200

    s3:net: change "net idmap dump" to use dbwrap instead of direct tdb access
    
    This way, it will also work in a samba-ctdb cluster.

commit 2fc7fbd15f0591d63523f7cfacb4f48b77047347
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 12:20:46 2009 +0100

    s3:net sam provision: compose sid before getting uid for Guest
    
    Michael

commit ed0380200e6d6b2bc5c649f53c9950403f493fc1
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 12:12:43 2009 +0100

    s3:net sam provision: allocate the uid after composing the sid for Administrator
    
    Michael

commit 07384a32a85b0c5fa94301b7d7e7587a962ca165
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 12:01:16 2009 +0100

    s3:pdb_ldap: move some code in ldapsam_create_dom_group()
    
    to make the flow more similar to ldapsam_create_user().
    This prepares for calling winbind_sid_to_gid() instead of
    winbind_allocate_gid(): we need the group_sid for this...
    
    Michael

commit 818cc18acedfa2665c61c5b38fe264254bc733b5
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 11:10:01 2009 +0100

    s3:groupdb: allocate a gid after allocating a rid in pdb_default_create_alias()
    
    Michael

commit 2bcd266ad00aaead7afc283e40033b307827cd54
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 1 14:03:32 2010 +0200

    s3:idmap_tdb2: fix a debug message

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages-3/net.8.xml                     |    2 +-
 docs-xml/smbdotconf/winbind/idmapallocbackend.xml |   33 -
 docs-xml/smbdotconf/winbind/idmapreadonly.xml     |   21 +
 nsswitch/libwbclient/wbc_idmap.c                  |  186 +----
 nsswitch/winbind_struct_protocol.h                |   11 +-
 source3/Makefile.in                               |   15 +-
 source3/groupdb/mapping.c                         |   13 +-
 source3/include/idmap.h                           |   24 +-
 source3/include/proto.h                           |   10 +-
 source3/librpc/idl/wbint.idl                      |   23 -
 source3/param/loadparm.c                          |   11 +-
 source3/passdb/pdb_ldap.c                         |   47 +-
 source3/utils/net_idmap.c                         |  271 ++++---
 source3/utils/net_sam.c                           |   17 +-
 source3/winbindd/idmap.c                          |  431 +++-------
 source3/winbindd/idmap_ad.c                       |   32 +-
 source3/winbindd/idmap_adex/idmap_adex.c          |   38 -
 source3/winbindd/idmap_ldap.c                     |  784 ++++++-----------
 source3/winbindd/idmap_rid.c                      |  105 +--
 source3/winbindd/idmap_rw.c                       |   79 ++
 source3/winbindd/idmap_rw.h                       |   56 ++
 source3/winbindd/idmap_tdb.c                      | 1011 ++++++++-------------
 source3/winbindd/idmap_tdb2.c                     |  638 ++++++--------
 source3/winbindd/idmap_util.c                     |  102 ++-
 source3/winbindd/winbindd.c                       |    6 -
 source3/winbindd/winbindd_dual_srv.c              |   68 --
 source3/winbindd/winbindd_proto.h                 |   21 -
 source3/winbindd/winbindd_remove_mapping.c        |  106 ---
 source3/winbindd/winbindd_set_hwm.c               |   95 --
 source3/winbindd/winbindd_set_mapping.c           |  106 ---
 source4/winbind/wb_samba3_protocol.c              |    6 -
 31 files changed, 1498 insertions(+), 2870 deletions(-)
 delete mode 100644 docs-xml/smbdotconf/winbind/idmapallocbackend.xml
 create mode 100644 docs-xml/smbdotconf/winbind/idmapreadonly.xml
 create mode 100644 source3/winbindd/idmap_rw.c
 create mode 100644 source3/winbindd/idmap_rw.h
 delete mode 100644 source3/winbindd/winbindd_remove_mapping.c
 delete mode 100644 source3/winbindd/winbindd_set_hwm.c
 delete mode 100644 source3/winbindd/winbindd_set_mapping.c


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml
index 1d2db91..c5fbc7d 100644
--- a/docs-xml/manpages-3/net.8.xml
+++ b/docs-xml/manpages-3/net.8.xml
@@ -1267,7 +1267,7 @@ Restore the mappings from the specified file or stdin.
 </refsect2>
 
 <refsect2>
-<title>IDMAP SECRET &lt;DOMAIN&gt;|ALLOC &lt;secret&gt;</title>
+<title>IDMAP SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
 
 <para>
 Store a secret for the specified domain, used primarily for domains
diff --git a/docs-xml/smbdotconf/winbind/idmapallocbackend.xml b/docs-xml/smbdotconf/winbind/idmapallocbackend.xml
deleted file mode 100644
index e06bcd4..0000000
--- a/docs-xml/smbdotconf/winbind/idmapallocbackend.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<samba:parameter name="idmap alloc backend"
-                 context="G"
-		 type="string"
-                 advanced="1" developer="1" hide="1"
-                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
-<description>
-	<para>
-	The idmap alloc backend provides a plugin interface for Winbind to use
-	when allocating Unix uids/gids for Windows SIDs. This option refers
-	to the name of the idmap module which will provide the id allocation
-	functionality. Please refer to the man page for each idmap plugin to
-	determine whether or not the module implements the allocation feature.
-	The most common plugins are the tdb (<citerefentry>
-	<refentrytitle>idmap_tdb</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
-	and ldap (<citerefentry><refentrytitle>idmap_ldap</refentrytitle>
-	<manvolnum>8</manvolnum></citerefentry>) libraries.
-	</para>
-
-	<para>
-	This parameter defaults to the value <smbconfoption name="idmap
-	backend"/> was set to, so by default winbind will allocate Unix IDs
-	from the default backend. You will only need to set this parameter
-	explicitly if you have an external source for Unix IDs, like a central
-	database service somewhere in your company.
-	</para>
-
-	<para>
-	Also refer to the <smbconfoption name="idmap alloc config"/> option.
-	</para>
-</description>
-
-<value type="example">tdb</value>
-</samba:parameter>
diff --git a/docs-xml/smbdotconf/winbind/idmapreadonly.xml b/docs-xml/smbdotconf/winbind/idmapreadonly.xml
new file mode 100644
index 0000000..9767ff0
--- /dev/null
+++ b/docs-xml/smbdotconf/winbind/idmapreadonly.xml
@@ -0,0 +1,21 @@
+<samba:parameter name="idmap read only"
+	context="G"
+	type="string"
+		 advanced="1" developer="0"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+
+	<para>
+	Setting this parameter to <value type="example">yes</value> allows
+	the default idmap back-end to be switched to a read only mode, which
+	means that it can not allocate new user or group IDs to create new
+	mappings. Normally, the default idmap back-end is a so called allocating
+	back-end that creates user and group ids and new mappings as needed.
+
+	Whether a back-end honors the read only setting is left to the
+	implementation of the back-end.
+	</para>
+	
+</description>
+<value type="default">no</value>
+</samba:parameter>
diff --git a/nsswitch/libwbclient/wbc_idmap.c b/nsswitch/libwbclient/wbc_idmap.c
index a125b04..ab8de9f 100644
--- a/nsswitch/libwbclient/wbc_idmap.c
+++ b/nsswitch/libwbclient/wbc_idmap.c
@@ -271,200 +271,38 @@ wbcErr wbcAllocateGid(gid_t *pgid)
 #define _ID_TYPE_UID 1
 #define _ID_TYPE_GID 2
 
-/* Set an user id mapping */
+/* Set an user id mapping - not implemented any more */
 wbcErr wbcSetUidMapping(uid_t uid, const struct wbcDomainSid *sid)
 {
-	struct winbindd_request request;
-	struct winbindd_response response;
-	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-	char *sid_string = NULL;
-
-	if (!sid) {
-		return WBC_ERR_INVALID_PARAM;
-	}
-
-	/* Initialise request */
-
-	ZERO_STRUCT(request);
-	ZERO_STRUCT(response);
-
-	/* Make request */
-
-	request.data.dual_idmapset.id = uid;
-	request.data.dual_idmapset.type = _ID_TYPE_UID;
-
-	wbc_status = wbcSidToString(sid, &sid_string);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
-	strncpy(request.data.dual_idmapset.sid, sid_string,
-		sizeof(request.data.dual_idmapset.sid)-1);
-	wbcFreeMemory(sid_string);
-
-	wbc_status = wbcRequestResponsePriv(WINBINDD_SET_MAPPING,
-					    &request, &response);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
- done:
-	return wbc_status;
+	return WBC_ERR_NOT_IMPLEMENTED;
 }
 
-/* Set a group id mapping */
+/* Set a group id mapping - not implemented any more */
 wbcErr wbcSetGidMapping(gid_t gid, const struct wbcDomainSid *sid)
 {
-	struct winbindd_request request;
-	struct winbindd_response response;
-	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-	char *sid_string = NULL;
-
-	if (!sid) {
-		return WBC_ERR_INVALID_PARAM;
-	}
-
-	/* Initialise request */
-
-	ZERO_STRUCT(request);
-	ZERO_STRUCT(response);
-
-	/* Make request */
-
-	request.data.dual_idmapset.id = gid;
-	request.data.dual_idmapset.type = _ID_TYPE_GID;
-
-	wbc_status = wbcSidToString(sid, &sid_string);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
-	strncpy(request.data.dual_idmapset.sid, sid_string,
-		sizeof(request.data.dual_idmapset.sid)-1);
-	wbcFreeMemory(sid_string);
-
-	wbc_status = wbcRequestResponsePriv(WINBINDD_SET_MAPPING,
-					    &request, &response);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
- done:
-	return wbc_status;
+	return WBC_ERR_NOT_IMPLEMENTED;
 }
 
-/* Remove a user id mapping */
+/* Remove a user id mapping - not implemented any more */
 wbcErr wbcRemoveUidMapping(uid_t uid, const struct wbcDomainSid *sid)
 {
-	struct winbindd_request request;
-	struct winbindd_response response;
-	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-	char *sid_string = NULL;
-
-	if (!sid) {
-		return WBC_ERR_INVALID_PARAM;
-	}
-
-	/* Initialise request */
-
-	ZERO_STRUCT(request);
-	ZERO_STRUCT(response);
-
-	/* Make request */
-
-	request.data.dual_idmapset.id = uid;
-	request.data.dual_idmapset.type = _ID_TYPE_UID;
-
-	wbc_status = wbcSidToString(sid, &sid_string);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
-	strncpy(request.data.dual_idmapset.sid, sid_string,
-		sizeof(request.data.dual_idmapset.sid)-1);
-	wbcFreeMemory(sid_string);
-
-	wbc_status = wbcRequestResponsePriv(WINBINDD_REMOVE_MAPPING,
-					    &request, &response);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
- done:
-	return wbc_status;
+	return WBC_ERR_NOT_IMPLEMENTED;
 }
 
-/* Remove a group id mapping */
+/* Remove a group id mapping - not implemented any more */
 wbcErr wbcRemoveGidMapping(gid_t gid, const struct wbcDomainSid *sid)
 {
-	struct winbindd_request request;
-	struct winbindd_response response;
-	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-	char *sid_string = NULL;
-
-	if (!sid) {
-		return WBC_ERR_INVALID_PARAM;
-	}
-
-	/* Initialise request */
-
-	ZERO_STRUCT(request);
-	ZERO_STRUCT(response);
-
-	/* Make request */
-
-	request.data.dual_idmapset.id = gid;
-	request.data.dual_idmapset.type = _ID_TYPE_GID;
-
-	wbc_status = wbcSidToString(sid, &sid_string);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
-	strncpy(request.data.dual_idmapset.sid, sid_string,
-		sizeof(request.data.dual_idmapset.sid)-1);
-	wbcFreeMemory(sid_string);
-
-	wbc_status = wbcRequestResponsePriv(WINBINDD_REMOVE_MAPPING,
-					    &request, &response);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
- done:
-	return wbc_status;
+	return WBC_ERR_NOT_IMPLEMENTED;
 }
 
-/* Set the highwater mark for allocated uids. */
+/* Set the highwater mark for allocated uids - not implemented any more */
 wbcErr wbcSetUidHwm(uid_t uid_hwm)
 {
-	struct winbindd_request request;
-	struct winbindd_response response;
-	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-
-	/* Initialise request */
-
-	ZERO_STRUCT(request);
-	ZERO_STRUCT(response);
-
-	/* Make request */
-
-	request.data.dual_idmapset.id = uid_hwm;
-	request.data.dual_idmapset.type = _ID_TYPE_UID;
-
-	wbc_status = wbcRequestResponsePriv(WINBINDD_SET_HWM,
-					    &request, &response);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
- done:
-	return wbc_status;
+	return WBC_ERR_NOT_IMPLEMENTED;
 }
 
-/* Set the highwater mark for allocated gids. */
+/* Set the highwater mark for allocated gids - not implemented any more */
 wbcErr wbcSetGidHwm(gid_t gid_hwm)
 {
-	struct winbindd_request request;
-	struct winbindd_response response;
-	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-
-	/* Initialise request */
-
-	ZERO_STRUCT(request);
-	ZERO_STRUCT(response);
-
-	/* Make request */
-
-	request.data.dual_idmapset.id = gid_hwm;
-	request.data.dual_idmapset.type = _ID_TYPE_GID;
-
-	wbc_status = wbcRequestResponsePriv(WINBINDD_SET_HWM,
-					    &request, &response);
-	BAIL_ON_WBC_ERROR(wbc_status);
-
- done:
-	return wbc_status;
+	return WBC_ERR_NOT_IMPLEMENTED;
 }
diff --git a/nsswitch/winbind_struct_protocol.h b/nsswitch/winbind_struct_protocol.h
index b0f99a3..537754f 100644
--- a/nsswitch/winbind_struct_protocol.h
+++ b/nsswitch/winbind_struct_protocol.h
@@ -51,8 +51,11 @@ typedef char fstring[FSTRING_LEN];
  * 23: added session_key to ccache_ntlm_auth response
  *     added WINBINDD_CCACHE_SAVE
  * 24: Fill in num_entries WINBINDD_LIST_USERS and WINBINDD_LIST_GROUPS
+ * 25: removed WINBINDD_SET_HWM
+ *     removed WINBINDD_SET_MAPPING
+ *     removed WINBINDD_REMOVE_MAPPING
  */
-#define WINBIND_INTERFACE_VERSION 24
+#define WINBIND_INTERFACE_VERSION 25
 
 /* Have to deal with time_t being 4 or 8 bytes due to structure alignment.
    On a 64bit Linux box, we have to support a constant structure size
@@ -115,9 +118,6 @@ enum winbindd_cmd {
 
 	WINBINDD_ALLOCATE_UID,
 	WINBINDD_ALLOCATE_GID,
-	WINBINDD_SET_MAPPING,
-	WINBINDD_REMOVE_MAPPING,
-	WINBINDD_SET_HWM,
 
 	/* Miscellaneous other stuff */
 
@@ -167,9 +167,6 @@ enum winbindd_cmd {
 	WINBINDD_DUAL_SIDS2XIDS,
 	WINBINDD_DUAL_UID2SID,
 	WINBINDD_DUAL_GID2SID,
-	WINBINDD_DUAL_SET_MAPPING,
-	WINBINDD_DUAL_REMOVE_MAPPING,
-	WINBINDD_DUAL_SET_HWM,
 
 	/* Wrapper around possibly blocking unix nss calls */
 	WINBINDD_DUAL_USERINFO,
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 872ed06..b703e72 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1181,7 +1181,9 @@ PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_
 		$(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
 		$(LIBTSOCKET_OBJ)
 
-IDMAP_OBJ     = winbindd/idmap.o winbindd/idmap_util.o @IDMAP_STATIC@
+IDMAP_RW_OBJ = winbindd/idmap_rw.o
+
+IDMAP_OBJ     = winbindd/idmap.o winbindd/idmap_util.o $(IDMAP_RW_OBJ) @IDMAP_STATIC@
 
 NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@
 
@@ -1278,9 +1280,6 @@ WINBINDD_OBJ1 = \
 		winbindd/winbindd_check_machine_acct.o \
 		winbindd/winbindd_change_machine_acct.o \
 		winbindd/winbindd_ping_dc.o \
-		winbindd/winbindd_set_mapping.o \
-		winbindd/winbindd_remove_mapping.o \
-		winbindd/winbindd_set_hwm.o \
 		winbindd/winbindd_pam_auth.o \
 		winbindd/winbindd_pam_auth_crap.o \
 		winbindd/winbindd_pam_chauthtok.o \
@@ -2664,13 +2663,13 @@ bin/adex. at SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_ADEX_OBJ)
 	@echo "Building plugin $@"
 	@$(SHLD_MODULE) $(IDMAP_ADEX_OBJ)
 
-bin/tdb2. at SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o
+bin/tdb2. at SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ)
 	@echo "Building plugin $@"
-	@$(SHLD_MODULE) winbindd/idmap_tdb2.o
+	@$(SHLD_MODULE) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ)
 
-bin/ldap. at SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o
+bin/ldap. at SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ)
 	@echo "Building plugin $@"
-	@$(SHLD_MODULE) winbindd/idmap_ldap.o
+	@$(SHLD_MODULE) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ)
 
 bin/weird. at SHLIBEXT@: $(BINARY_PREREQS) $(DEVEL_HELP_WEIRD_OBJ)
 	@echo "Building plugin $@"
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index 4cfe995..5e2e544 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -486,21 +486,22 @@ NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
 		return NT_STATUS_ALIAS_EXISTS;
 	}
 
-	if (!winbind_allocate_gid(&gid)) {
-		DEBUG(3, ("Could not get a gid out of winbind\n"));
+	if (!pdb_new_rid(&new_rid)) {
+		DEBUG(0, ("Could not allocate a RID.\n"));
 		return NT_STATUS_ACCESS_DENIED;
 	}
 
-	if (!pdb_new_rid(&new_rid)) {
-		DEBUG(0, ("Could not allocate a RID -- wasted a gid :-(\n"));
+	sid_compose(&sid, get_global_sam_sid(), new_rid);
+
+	if (!winbind_allocate_gid(&gid)) {
+		DEBUG(3, ("Could not get a gid out of winbind - "
+			  "wasted a rid :-(\n"));
 		return NT_STATUS_ACCESS_DENIED;
 	}
 
 	DEBUG(10, ("Creating alias %s with gid %u and rid %u\n",
 		   name, (unsigned int)gid, (unsigned int)new_rid));
 
-	sid_compose(&sid, get_global_sam_sid(), new_rid);
-
 	map.gid = gid;
 	sid_copy(&map.sid, &sid);
 	map.sid_name_use = SID_NAME_ALIAS;
diff --git a/source3/include/idmap.h b/source3/include/idmap.h
index 672e373..aab41cd 100644
--- a/source3/include/idmap.h
+++ b/source3/include/idmap.h
@@ -33,6 +33,9 @@
 struct idmap_domain {
 	const char *name;
 	struct idmap_methods *methods;
+	uint32_t low_id;
+	uint32_t high_id;
+	bool read_only;
 	void *private_data;
 };
 
@@ -50,28 +53,11 @@ struct idmap_methods {
 	   and type and gets back a uid or gid. */
 	NTSTATUS (*sids_to_unixids)(struct idmap_domain *dom, struct id_map **ids);
 
-	NTSTATUS (*set_mapping)(struct idmap_domain *dom, const struct id_map *map);
-	NTSTATUS (*remove_mapping)(struct idmap_domain *dom, const struct id_map *map);
-
-	/* Called to dump backends data */
-	/* NOTE: caller must use talloc_free to free maps when done */
-	NTSTATUS (*dump_data)(struct idmap_domain *dom, struct id_map **maps, int *num_maps);
+	/* Allocate a Unix-ID. */
+	NTSTATUS (*allocate_id)(struct idmap_domain *dom, struct unixid *id);
 
 	/* Called when backend is unloaded */
 	NTSTATUS (*close_fn)(struct idmap_domain *dom);
 };
 
-struct idmap_alloc_methods {
-
-	/* Called when backend is first loaded */
-	NTSTATUS (*init)(const char *compat_params);
-
-	NTSTATUS (*allocate_id)(struct unixid *id);
-	NTSTATUS (*get_id_hwm)(struct unixid *id);
-	NTSTATUS (*set_id_hwm)(struct unixid *id);
-
-	/* Called when backend is unloaded */
-	NTSTATUS (*close_fn)(void);
-};
-
 #endif /* _IDMAP_H_ */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 61ef13f..25c0476 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3656,7 +3656,7 @@ bool lp_winbind_normalize_names(void);
 bool lp_winbind_rpc_only(void);
 bool lp_create_krb5_conf(void);
 const char *lp_idmap_backend(void);
-char *lp_idmap_alloc_backend(void);
+bool lp_idmap_read_only(void);
 int lp_idmap_cache_time(void);
 int lp_idmap_negative_cache_time(void);
 int lp_keepalive(void);
@@ -5971,22 +5971,16 @@ bool idmap_is_offline(void);
 bool idmap_is_online(void);
 NTSTATUS smb_register_idmap(int version, const char *name,
 			    struct idmap_methods *methods);
-NTSTATUS smb_register_idmap_alloc(int version, const char *name,
-				  struct idmap_alloc_methods *methods);
 void idmap_close(void);
 NTSTATUS idmap_init_cache(void);
 NTSTATUS idmap_allocate_uid(struct unixid *id);
 NTSTATUS idmap_allocate_gid(struct unixid *id);
-NTSTATUS idmap_set_uid_hwm(struct unixid *id);
-NTSTATUS idmap_set_gid_hwm(struct unixid *id);
 NTSTATUS idmap_backends_unixid_to_sid(const char *domname,
 				      struct id_map *id);
 NTSTATUS idmap_backends_sid_to_unixid(const char *domname,
 				      struct id_map *id);
 NTSTATUS idmap_new_mapping(const struct dom_sid *psid, enum id_type type,
 			   struct unixid *pxid);
-NTSTATUS idmap_set_mapping(const struct id_map *map);
-NTSTATUS idmap_remove_mapping(const struct id_map *map);
 
 /* The following definitions come from winbindd/idmap_cache.c  */
 
@@ -6010,7 +6004,6 @@ NTSTATUS idmap_passdb_init(void);
 
 /* The following definitions come from winbindd/idmap_tdb.c  */
 
-NTSTATUS idmap_alloc_tdb_init(void);
 NTSTATUS idmap_tdb_init(void);
 
 /* The following definitions come from winbindd/idmap_util.c  */
@@ -6019,6 +6012,7 @@ NTSTATUS idmap_uid_to_sid(const char *domname, struct dom_sid *sid, uid_t uid);
 NTSTATUS idmap_gid_to_sid(const char *domname, struct dom_sid *sid, gid_t gid);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list