[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Fri Aug 13 18:29:02 MDT 2010


The branch, master has been updated
       via  60eae5a... s3:idmap: fix sid_to_unixid for builtin and own domain.
       via  9f60eb8... s3:idmap: fix spacing/indentation
       via  a739cb5... s3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping
       via  a7ba906... s3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init()
       via  6659ac1... s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping
       via  5a82cff... s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db
       via  3f3cff9... s3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping
       via  e82ef14... s3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init
       via  307e5b2... s3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends
       via  9897647... s3:idmap_ad: untangle two assignments from checks
       via  264910b... s3:idmap_ad: remove unused filter_low_id and filter_high_id from idmap_ad_context
       via  d515d7f... s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids()
       via  96607d9... s3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids()
       via  f070494... s3:idmap_rid: remove a comment that does not apply in that place.
       via  a758228... s3:idmap_rid: remove unused domain_name from the idmap_rid_context.
       via  2916b30... s3:idmap_rid: remove range from idmap_rid_context()
       via  ac63c50... s3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id()
       via  cda44b9... s3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid()
       via  a6f58b7... s3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids()
       via  376e2bc... s3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id()
       via  597292a... s3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids()
       via  6283387... s3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid()
       via  622bda8... s3:idmap_rid: untangle assignment from check in idmap_rid_initialize()
       via  a896ba0... s3:idmap_ldap: add my (C)
       via  58cb516... s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids()
       via  26c8259... s3:idmap_ldap: add a idmap_ldap_new_mapping().
       via  4ed6f31... s3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain
       via  5f77570... s3:idmap_ldap: move idmap_ldap_set_mapping() further up.
       via  3e71eae... s3:idmap_ldap: make idmap_ldap_alloc_context a member of idmap_ldap_context
       via  523b94f... s3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.
       via  c854261... s3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context
       via  3f39921... s3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()
       via  5518bcb... s3:idmap_ldap: add idmap_domain arg to idmap_ldap_alloc_init and verify_idpool
       via  1cf2737... s3:idmap_ldap: remove unused filter range from struct idmap_ldap_context
       via  5bb4a94... s3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain
       via  634cd2e... s3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context
       via  3a5f862... s3:idmap_ldap: re-implement allocate_id in idmap methods.
       via  5bb5b69... s3:idmap_tdb: add my (C)
       via  78979c6... s3:idmap_tdb: properly initialize the idmap_tdb context with zero
       via  9c3d4df... s3:idmap_tdb: prevent opening the idmap db more than once.
       via  66a38d8... s3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids.
       via  4f2bb1a... s3:idmap_tdb: add a idmap_tdb_new_mapping().
       via  47387b3... s3:idmap_tdb: move the set_mapping code up
       via  2b2a8f9... s3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping().
       via  b0615e4... s3:idmap_tdb: remove unused struct idmap_tdb_state.
       via  2853534... s3:idmap_tdb: remove unused idmap_alloc_db
       via  9010194... s3:idmap_tdb: remove unused idmap_tdb_alloc_close().
       via  2e4a038... s3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->db
       via  4301a81... s3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db().
       via  1039506... s3:idmap_tdb: move idmap_tdb_init_hwm up.
       via  f739ccb... s3:idmap_tdb: remove unused idmap_tdb_load_ranges()
       via  b1285a5... s3:idmap_tdb: have idmap_tdb_open_db take an idmap_domain struct as argument
       via  53856fc... s3:idmap_tdb: rename idmap_tdb_alloc_init->idmap_tdb_init_hwm and use db from idmap_tdb_context
       via  384e35f... s3:idmap_tdb: move definition of struct idmap_tdb_context up.
       via  db38972... s3:idmap_tdb: remove filter_low_id,filter_high_id from idmap_tdb_context
       via  3315f2c... s3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range
       via  6d66018... s3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context
       via  053e451... s3:idmap_tdb: give idmap domain argument to idmap_tdb_sid_to_id
       via  f7a5f09... s3:idmap_tdb: give idmap domain argument to idmap_tdb_id_to_sid
       via  0f24816... s3:idmap_tdb: implement allocate_id in idmap methods for tdb backend
       via  2b9ad09... s3:idmap_tdb: add idmap_tdb_get_new_id() to allocate a new id given a domain
       via  9e8df74... s3:idmap_tdb: convert idmap_tdb_allocate_id() to use transaction wrappers
       via  85e9b35... s3:idmap_tdb: remove an extra blank line
       via  aad8756... s3:idmap_tdb2: add my (C)
       via  dac9f73... s3:idmap_tdb2: move idmap_tdb2_new_mapping() up. spare a prototype.
       via  627b9aa... s3:idmap_tdb2: get rid of an extra variable in idmap_tdb2_db_init().
       via  d27992e... s3:idmap_tdb2: move idmap_tdb2_set_mapping() up to its _action callback.
       via  3bc40a0... s3:idmap_tdb2: use the right talloc context for db_open in idmap_tdb2_open_db()
       via  39079ac... s3:idmap_tdb2: don't check whether sid is already mapped in idmap_tdb2_new_mapping().
       via  1a52e0d... s3:idmap_tdb2: add the db_context to the idmap_tdb2_context
       via  83ad3cd... s3:idmap_tdb2: talloc_zero (instead of talloc) the idmap_tdb2_context
       via  c08a45e... s3:idmap_tdb2: rename idmap_tdb2_alloc_load -> idmap_tdb2_init_hwm
       via  41cead6... s3:idmap_tdb2: move idmap_tdb2_alloc_load() up to reduce need for prototype
       via  2c549be... s3:idmap_tdb2: remove unused idmap_tdb2_state and idmap_tdb2_load_ranges
       via  fd81228... s3:idmap_tdb2: give idmap_tdb2_alloc_load() and idmap domain arguemnt
       via  bd4cc44... s3:idmap_tdb2: add an idmap_domain struct argument to idmap_tdb2_open_db()
       via  871945a... s3:idmap_tdb2: remove filter_low_id and filter_high_id from idmap_tdb2_context
       via  2842389... s3:idmap_tdb2: don't parse config and fill filter_low_id and filter_high_id
       via  6a70e7d... s3:idmap_tdb2: honour the "idmap read only" flag in the tdb2 module.
       via  d5c3cb5... s3:idmap_tdb2: use range from idmap_domain in idmap_tdb2_allocate_id
       via  4b10036... s3:idmap_tdb2: use filter from idmap_domain rather than from idmap_tdb2_context
       via  77096b9... s3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to idmap_tdb2_sid_to_id
       via  863212a... s3:idmap_tdb2: pass idmap_domain instead of idmap_tdb2_context to idmap_tdb2_unixids_to_sids
       via  bb8a441... s3:idmap_tdb2: also support idmap script for named domains
       via  f278585... s3:idmap_tdb2: move the idmap script from idmap_tdb2_state to idmap_tdb2_context
       via  834008c... s3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_id
       via  1dfb20d... s3:idmap_tdb2: move definition of struct idmap_tdb2_context up.
       via  5b26456... s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init().
       via  8da3d7c... s3:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixids
       via  36017ec... s3:idmap_tdb2: re-implement allocated_id in idmap methods.
       via  1cd1dff... s3:idmap: add idmap_unix_id_is_in_range() for checking an id against an idmap range
       via  212627e... s3:idmap: don't check range for passdb idmap domain
       via  24ff45f... s3:idmap: parse ranges and "read only" in idmap_init_domain().
       via  dc4d838... s3:idmap: add a read_only flag to the idmap_domain struct.
       via  10c50f7... s3:idmap: add low_id and high_id to the idmap_domain struct
       via  c09ee2b... s3:docs: fix net manpage to reflect removal of net "idmap secret alloc" feature
       via  502d00e... s3:net: remove the "net idmap secret alloc" functionality.
       via  8496c66... s3:docs: add documentation for new "idmap read only" parameter
       via  6d9f4d6... s3:loadparm: add new boolean parameter "idmap read only"
       via  2056703... s3:docs: remove documentation of removed parameter "idmap alloc backend"
       via  c62f7c7... s3:loadparm: remove parameter "idmap alloc backend"
       via  7dd8339... s3:idmap: remove unused definition of idmap_alloc_methods.
       via  3a2487e... s3:idmap: remove idmap_alloc_context from idmap.c
       via  12a0ab3... s3:idmap: remove the alloc methods list from idmap.c
       via  a423f51... s3:idmap: remove unused get_alloc_methods().
       via  75a6c24... s3:idmap: remove unused smb_register_idmap_alloc().
       via  f96575d... s3:idmap_ldap: remove unused idmap_ldap_alloc_methods.
       via  0369eb5... s3:idmap_ldap: remoce unused idmap_alloc_ldap_init
       via  0dfe400... s3:idmap_ldap: don't call idmap_alloc_ldap_init in idmap_ldap_init
       via  bc59660... s3:idmap_tdb: remove unused idmap_alloc_methods
       via  5e317be... s3:idmap_tdb: remove unused idmap_alloc_tdb_init()
       via  dd4adc1... s3:idmap_tdb: don't call idmap_alloc_tdb_init in idmap_tdb_init
       via  77e41c0... s3:idmap_tdb2: remove unused idmap_tdb2_alloc_init().
       via  2616633... s3:idmap_tdb2: remove unused idmap_tdb2_alloc_close().
       via  39fced2... s3:idmap_tdb2: remove unused idmap_alloc_methods.
       via  8a13c95... s3:idmap_tdb2: don't call smb_register_idmap_alloc() in idmap_tdb2_init
       via  7b4c6f7... s3:idmap_tdb: make idmap_alloc_tdb_init() static.
       via  fe8b158... s3:idmap: remove unused idmap_alloc_init().
       via  212468b... s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()
       via  770b22f... s3:idmap: add an allocate_id method to the idmap_methods struct.
       via  0d36927... s3:idmap: factor out common code of idmap_allocate_uid|gid()
       via  0d0032e... s3:idmap: remove the set_mapping method from the idmap API
       via  95617a0... s3:idmap: remove idmap_new_mapping() - now implemented in the backends
       via  e296816... s3:idmap: add a debug message to idmap_sid_to_gid
       via  a08e60d... s3:idmap: add a debug message to idmap_sid_to_uid
       via  9ee3134... s3:idmap: don't call idmap_new_mapping idmap_sid_to_gid
       via  f301ea5... s3:idmap: don't call idmap_new_mapping idmap_sid_to_unixid.
       via  ccfe40c... s3:winbind: increase interface version after removing calls
       via  95b840c... s3:idmap: remove unused method set_id_hwm from idmap API
       via  3715a16... s3:idmap: remove unused alloc method get_id_hwm from idmap API
       via  672ab10... s3:idmap: remove unused method dump_data() from the idmap API
       via  0f91373... s3:idmap: remove the remove_mapping method from API and backends
       via  d888e72... s3:idmap: remove unused idmap_remove_mapping().
       via  c03fa64... s4: remove REMOVE_MAPPING from wb_samba3_protocol
       via  3b56f7f... s3:winbind: remove the method REMOVE_MAPPING from winbind's API
       via  6740c18... s3:idmap: remove unused idmap_set_mapping().
       via  74da316... s4: remove SET_MAPPING from wb_samba3_protocol
       via  474020b... s3:winbind: remove the method SET_MAPPING from winbind's API
       via  1ac8bf4... libwbclient: unimplement wbcRemoveGidMapping()
       via  89100cb... libwbclient: unimplement wbcRemoveUidMapping()
       via  788123e... libwbclient: unimplement wbcSetGidMapping()
       via  2e65703... libwbclient: unimplement wbcSetUidMapping()
       via  806e006... s3:idmap: remove unused idmap_set_gid_hwm()
       via  002fe91... s3:idmap: remove unused idmap_set_uid_hwm()
       via  61f019d... s4: remove SET_HWM and SET_DUAL_HWM from wb_samba3_protocol
       via  66e67c1... s3:winbind: remove SET_HWM from winbind's API.
       via  ec33a62... libwbclient: unimplement wbcSetGidHwm()
       via  e09a269... libwbclient: unimplement wbcSetUidHwm()
       via  a03e2ca... s3:net: rewrite "net idmap restore" using dbwrap
       via  80bceab... s3:net: change "net idmap dump" to use dbwrap instead of direct tdb access
       via  a0920a5... s3:net sam provision: compose sid before getting uid for Guest
       via  d923907... s3:net sam provision: allocate the uid after composing the sid for Administrator
       via  c45eca5... s3:pdb_ldap: move some code in ldapsam_create_dom_group()
       via  0dc3cd7... s3:groupdb: allocate a gid after allocating a rid in pdb_default_create_alias()
       via  b28371b... s3:idmap_tdb2: fix a debug message
      from  a8492d2... s3:test: add a new "valgrindtestenv" target, similar to gdbtestenv

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 60eae5a1342cb0e4463d380aa2db837684e111c7
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 9f60eb8c1b325ece9127a7c3858de7c7a48ae18f
Author: Michael Adam <obnox at samba.org>
Date:   Fri Aug 13 16:15:38 2010 +0200

    s3:idmap: fix spacing/indentation

commit a739cb59445f069594f01f38a6e3c7eedccd4dcc
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 a7ba9064d6e5446cb3d0a8d773c8f31b95667134
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 6659ac11de986bb29225b87cb891c3b50175d1f9
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 5a82cffb8b9444afbfa763cad2a7be57a1874d66
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 3f3cff9127b971c0de50975ed47cbb2d102a0e03
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 e82ef14008082ae34af5d1f0205aa2b5782fc567
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 307e5b239ada7f817b941f7ffa4af6f1451ae91e
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 9897647584f042e7227f3fdbf5a9a5b91a9ce83e
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 264910b06f71ed76df8ce432d320c33ec9dac42f
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 d515d7fe49287b62a42aab5a8261745d27e349c9
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 96607d9543ebc1b485fa701db8f4f11fd501b750
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 f07049495d81dc4ad2df440f274d470ac41b83c9
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 a75822836719f17b74cb009c482482bd78349cc7
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 2916b302f35e434a1f9dfe329a146cb815bcda7e
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 ac63c50684ec2edb4a99f6ed1995288700ce5642
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 cda44b9e8e8f0edc111f5fa8daf6f8a9f5bf2a7f
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 a6f58b76cccc95f2ac69f5e215fd3a0c9d639c9e
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 376e2bcc6e6f8c8b032d83116dc742c5975f042e
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 597292a819450866a28e8a46091a0287db9631c1
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 62833871bc5e2efe203d8f0a1efaf7c9fa62ff94
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 622bda8a67083af2b1d0821e5cffcce4a50ea0b8
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 a896ba07bb0808143979d752ce89e94c47164f0c
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 23 12:39:59 2010 +0200

    s3:idmap_ldap: add my (C)

commit 58cb5163f269f11ecf2846bb00022d0b382af1d7
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 26c82596d95d31dc3d141656266123ca1fff8644
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 4ed6f315d93213154a39748c4ecc68d3d51df488
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 5f77570bb6ba0a8e8233e5f8081acac48829e772
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 3e71eaeca09fd8df39e6b894c02e83be8df4bac1
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 523b94f180a8390788a3a7ce3e10ff94f350ac98
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 c85426186704316e64153b938c85582e6d0ebb17
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 3f39921e7e1175523766a108f338ea38038c5d79
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 5518bcb840c288a4b041e1a0aa15e6cdefd9f028
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 1cf27374ab97841cf7b70a73217151276938885b
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 5bb4a94c6c022256e04e047ecf70be0d2cf09924
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 634cd2e0451d4388c3e3f78239495cf595368b15
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 3a5f86216b820c4c57d46b586634b93e1ce423f2
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 5bb5b69b0faff34ec0defbd2d358eeaf6daf4ea8
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 09:39:11 2010 +0200

    s3:idmap_tdb: add my (C)

commit 78979c642030c725489643fc7f395ea578c69261
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 9c3d4dff828574263f4f2ff3632c08af387a01f1
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 66a38d8612733427637b13c721dd474389b7cc90
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 4f2bb1a2595a23d3bba0d0b3bb7bb38872e47c95
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 47387b3ebb0d4d04403d0d65312d29af6bccc95a
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 2b2a8f9b3b283a39f391548775628e1aeb6fb811
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 b0615e475786faba1146949d5414518a0c2d05cf
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 28535349bd321fbaad8c8cdcdcbf5a1a95b18c96
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 9010194972310e0749d426b3810785e4f5fce51d
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 2e4a0382f5f9df4e50c7a7e9759bf02f54c21925
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 4301a81c995e0230eaac859c0a5444a90d944ed0
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 10395064933bd1c92d647606b4b3958aaacaf759
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 f739ccb1b9da4b5b7941944e8a4342049254c8d8
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 b1285a5cb3411dc0e2437d0952318b4837f14d81
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 53856fc8b0cdbb01eb0b639800be3ec1812aae41
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 384e35f8a754feb601fdd9d032c3aad121e0fbc3
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 db3897258392eca17835a72d022364aa5b668c32
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 3315f2cf9b6113ff84dde3a402f98c5c49f74bb9
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 6d66018187624f4b0a0a21f34abb6e74053ce7d3
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 053e4510cd4a674e3c9809b0829f32e1bca183ea
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 f7a5f0987c014b26bafd4a3af8fc49396d735d34
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 0f248169d9b42fcd9f70d7cf8d13640011dd3256
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 2b9ad09ae7bbfc4382e620705b2bc9c06e60fa5a
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 9e8df7403af834699eb94a71a5c1131a98c8b4c9
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 85e9b35993cbcbabc3abbf4f8490581c06c5f88a
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 aad8756daebf4eee03fb67e28324c723b81c3a02
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jun 17 09:39:24 2010 +0200

    s3:idmap_tdb2: add my (C)

commit dac9f73ccd7041334308367a2f712df87173bb76
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 627b9aa4b7ccc87938c864a9be19e23b404d3fa1
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 d27992e70837850136b93b93886740c77ead0416
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 3bc40a09799ed3b39ff387d07b0a3928ae800444
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 39079acc5770c23f4c1428be60202f48882eeef3
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 1a52e0d25b2d32e336f1bac4d41039e290311a6b
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 83ad3cdf6966e25ca931ebb6feabbf9be059e838
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 c08a45ebd9aa18d0d5795c90fc467cee089f2b7f
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 41cead6a31ff7f5733103fd36711a25559edf43c
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 2c549be359152964f9126530664e24bedd75f6f5
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 fd81228ed8691e3c8fc61e0be6f516b219c0e39f
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 bd4cc44c7d99dd2aeabed73ef0659909b78c6830
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 871945ae199472f4635a272467a3df5bb4d8c44c
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 2842389e55f846d559e3ae6297e6dc93b9ac68f8
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 6a70e7da58c61ada84e4fbe43d6631f359a466e4
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 d5c3cb5a8a55e325a84d5fc5f704af86588b2027
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 4b10036da81857449e95272381faa2167ee4f10b
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 77096b9a26b23edc6a059dc2bc4f56d26f4aa0ea
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 863212ad0e5ae59a218d9960553ec1e946f17826
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 bb8a4415c86bd23909d7fc34b933d8214b3e1846
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 f27858548e64b9f27d62a900aec400ea66266fa5
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 834008c2cd55a87d4fada2390606381ec7316915
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 1dfb20d0292623f21f47e93afaba865d9ff3b05b
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 5b264561e7959019974d6934af7568891a1d2c99
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 8da3d7c39be33899b29276cb2778cb9e1771bb6e
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 36017ecebf87b2c04d5af37bc209a64a4c6527a7
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 1cd1dff7569fbcd2ab02066764933fc50f0dc966
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 212627e9c0d62cf36f5f6101f0226f76bcee3881
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 24ff45ff4dd01d0ea5db7e7b182c8a4c8a9df761
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 dc4d838401787a5754d2114ba94029bef2a19f6d
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 10c50f74d0efc4a6e4d58e7158b319da41528f8f
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 c09ee2bcb41ef80ab4f33abf5de3ff4aca324f51
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 502d00e463ad39b9d8843bd3539fdedfa56add38
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 8496c663ff2c93911b0221e24fdf4f4b31e9e563
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 6d9f4d6d36da6f9ab729d769d00e615fe8b4a499
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 2056703d56c67b4f01b61edafdf17d5e20220078
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 c62f7c7a0b46ab4f834ff847f3f1a13374a53714
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 15:53:27 2010 +0200

    s3:loadparm: remove parameter "idmap alloc backend"

commit 7dd8339ca1d8cb8b44c128097f4ee4ee6f0b412f
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 3a2487e66b85bcceba6d52881f7bc4810b757023
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 12a0ab3c96acf4333371b67d81d33b3bf0c5489a
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 a423f5151d3ecf7d3dc37ae85b5868a46cdb9d39
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 11:45:58 2010 +0200

    s3:idmap: remove unused get_alloc_methods().

commit 75a6c244591b4bc13c494c2b0ec40926379d2d4a
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 f96575d6db1f0137469d2611a3f3111a8101366d
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 0369eb5555cddcdf80a7901dd64cef3114e524bc
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 0dfe400d64285cb2433718d6c09961d9513bd9a2
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 bc59660fc19493076a847e6439b80e5f6b6324d5
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 5e317beadb0f73f825e46cff01aefeb8b5529454
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 dd4adc172171bab0e2a211d50b0c584834aff161
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 77e41c0ad47f9a0974ad34e4de3d0721117c7917
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 261663389b3b04b9071b11b4f2dba39a15fda03b
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 39fced2f33eb60b25f8c1bddea09c429fc218f1a
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 8a13c959313fb876d5ef798be8e54d2971e5307d
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 7b4c6f7e89c6e5b9e68676f89e32a0d51cf947f5
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 fe8b1588b465bd84a20cc137aabdaab7453a2211
Author: Michael Adam <obnox at samba.org>
Date:   Mon May 31 00:27:23 2010 +0200

    s3:idmap: remove unused idmap_alloc_init().

commit 212468bc6e032c1f704a1d5042222b7299f9bcfb
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 770b22ff5aa3f852daaf6f0fd1b2f4f81d78343c
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 0d369271c5d7c466e2594a446a14977302850e2e
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 0d0032e744e394597d108def097143927637f854
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 95617a03db896a2ac2051f74e7d7ba1209fbc61b
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 e2968160a4649573e7820b72589042e4208ccee8
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 a08e60dd2ccc5e4be5697e3215440ec0267fe586
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 9ee31346911bb14715704a10086214b1ddc15371
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 f301ea59773b174da9009dfd482a56d7e72a76dd
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 ccfe40c27f9be794d5ae6d4cb337d820b0a03718
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 95b840cbf1a22c13c038f9ffe999672bf444daa9
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 3715a1687f0b258d0c8f0966eddc8aa6586a8735
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 672ab10ee784fcfc3270df3e7665f74ff08f7d40
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 0f913731563e3265ccc17589a01b5667c45019ec
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 d888e726a9b1e1e1603211821a71fd88aea566c7
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 c03fa64a2c05672f4b4d5a05263a449c0c7e85e1
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 3b56f7f6b5040a8f130060e7e1d8c062aa6d3b16
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 6740c180e668307f1ee16084f5d6531508bb1cbf
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 74da3163f6ef7ec8c8e5d52d926dbc3e02be0c2d
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 474020b1aeca8c527ea9aac6c39c6fb8386ace23
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 1ac8bf4ea8f28bf39990c42449eda07966bd5f81
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:57:21 2009 +0100

    libwbclient: unimplement wbcRemoveGidMapping()
    
    Michael

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

    libwbclient: unimplement wbcRemoveUidMapping()
    
    Michael

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

    libwbclient: unimplement wbcSetGidMapping()
    
    Michael

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

    libwbclient: unimplement wbcSetUidMapping()
    
    Michael

commit 806e00628810a0fd1d2884bcdb649df147f05286
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 002fe91768757f20de2a40f14480b6c5f8b74bdc
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 61f019d61d2aeb5d5dd79c3048d9c6048f4881f5
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 66e67c1bad2b6bd7c28600ba166971a83e3f3520
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 ec33a624a395d6108e47a4eef9430626ec83b314
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jan 22 13:39:33 2009 +0100

    libwbclient: unimplement wbcSetGidHwm()
    
    Michael

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

    libwbclient: unimplement wbcSetUidHwm()
    
    Michael

commit a03e2cacafacabda3fe75c784c0c360e5384339f
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 80bceab9cb53318387133edde4be888d7b3156b1
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 a0920a5ee5f7b390b0177a0d2899bf7da43c17e1
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 d923907ced67b349013041327aef2d915c476102
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 c45eca5751fe7b50106d77b5421c1169338c27e1
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 0dc3cd75a175a33a3883aa50a324db9699cb4c6b
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 b28371b9a4145d5d84d290a5fece40536838b7ed
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 ae8ad08..1eb1dbb 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1202,7 +1202,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@
 
@@ -1300,9 +1302,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 \
@@ -2686,13 +2685,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 18b3754..bc55eaf 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3653,7 +3653,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);
@@ -6010,22 +6010,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  */
 
@@ -6049,7 +6043,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  */
@@ -6058,6 +6051,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