s3: Remove close_fn from idmap_methods
authorVolker Lendecke <vl@samba.org>
Sun, 6 Mar 2011 11:02:05 +0000 (12:02 +0100)
committerVolker Lendecke <vlendec@samba.org>
Sun, 6 Mar 2011 12:37:13 +0000 (13:37 +0100)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 13:37:13 CET 2011 on sn-devel-104

source3/include/idmap.h
source3/winbindd/idmap.c
source3/winbindd/idmap_ad.c
source3/winbindd/idmap_adex/idmap_adex.c
source3/winbindd/idmap_autorid.c
source3/winbindd/idmap_hash/idmap_hash.c
source3/winbindd/idmap_ldap.c
source3/winbindd/idmap_nss.c
source3/winbindd/idmap_passdb.c
source3/winbindd/idmap_rid.c
source3/winbindd/idmap_tdb.c

index 2f95740f3db19954c468b386108ca79ed1e4e82e..7b3d6decf2fe3ef977a6ebdb8201f62402fea369 100644 (file)
@@ -57,9 +57,6 @@ struct idmap_methods {
 
        /* 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);
 };
 
 #include "winbindd/idmap_proto.h"
index 76310e02baa6721355747dd2b0a05c8f674f8486..a2a727cdb0894d79db93eb7c4a1828e8d42fa692 100644 (file)
@@ -153,18 +153,6 @@ NTSTATUS smb_register_idmap(int version, const char *name,
        return NT_STATUS_OK;
 }
 
-static int close_domain_destructor(struct idmap_domain *dom)
-{
-       NTSTATUS ret;
-
-       ret = dom->methods->close_fn(dom);
-       if (!NT_STATUS_IS_OK(ret)) {
-               DEBUG(3, ("Failed to close idmap domain [%s]!\n", dom->name));
-       }
-
-       return 0;
-}
-
 static bool parse_idmap_module(TALLOC_CTX *mem_ctx, const char *param,
                               char **pmodulename, char **pargs)
 {
@@ -343,8 +331,6 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx,
                goto fail;
        }
 
-       talloc_set_destructor(result, close_domain_destructor);
-
        return result;
 
 fail:
index dfaa03497c0267daf5ef4525278de7db670d7a09..1984844d2a426ec3c2d6bf45b0bd6863d2695789 100644 (file)
@@ -695,14 +695,6 @@ done:
        return ret;
 }
 
-/************************************************************************
- ***********************************************************************/
-
-static NTSTATUS idmap_ad_close(struct idmap_domain *dom)
-{
-       return NT_STATUS_OK;
-}
-
 /*
  * nss_info_{sfu,sfu20,rfc2307}
  */
@@ -1065,17 +1057,6 @@ done:
        return nt_status;
 }
 
-
-/************************************************************************
- ***********************************************************************/
-
-static NTSTATUS nss_ad_close( void )
-{
-       /* nothing to do.  All memory is free()'d by the idmap close_fn() */
-
-       return NT_STATUS_OK;
-}
-
 /************************************************************************
  Function dispatch tables for the idmap and nss plugins
  ***********************************************************************/
@@ -1084,7 +1065,6 @@ static struct idmap_methods ad_methods = {
        .init            = idmap_ad_initialize,
        .unixids_to_sids = idmap_ad_unixids_to_sids,
        .sids_to_unixids = idmap_ad_sids_to_unixids,
-       .close_fn        = idmap_ad_close
 };
 
 /* The SFU and RFC2307 NSS plugins share everything but the init
@@ -1095,7 +1075,6 @@ static struct nss_info_methods nss_rfc2307_methods = {
        .get_nss_info   = nss_ad_get_info,
        .map_to_alias   = nss_ad_map_to_alias,
        .map_from_alias = nss_ad_map_from_alias,
-       .close_fn       = nss_ad_close
 };
 
 static struct nss_info_methods nss_sfu_methods = {
@@ -1103,7 +1082,6 @@ static struct nss_info_methods nss_sfu_methods = {
        .get_nss_info   = nss_ad_get_info,
        .map_to_alias   = nss_ad_map_to_alias,
        .map_from_alias = nss_ad_map_from_alias,
-       .close_fn       = nss_ad_close
 };
 
 static struct nss_info_methods nss_sfu20_methods = {
@@ -1111,7 +1089,6 @@ static struct nss_info_methods nss_sfu20_methods = {
        .get_nss_info   = nss_ad_get_info,
        .map_to_alias   = nss_ad_map_to_alias,
        .map_from_alias = nss_ad_map_from_alias,
-       .close_fn       = nss_ad_close
 };
 
 
index 1e815def70341ed4c7b2a7ba441bde6124d32664..c8d616b4005771379580cb20f94216c93d3aa466 100644 (file)
@@ -254,17 +254,6 @@ static NTSTATUS _idmap_adex_get_id_from_sid(struct
        return NT_STATUS_OK;
 }
 
-/**********************************************************************
- *********************************************************************/
-
-static NTSTATUS _idmap_adex_close(struct idmap_domain
-                                     *dom)
-{
-       /* FIXME!  need to do cleanup here */
-
-       return NT_STATUS_OK;
-}
-
 /*
  * IdMap NSS plugin
  */
@@ -383,7 +372,6 @@ static struct idmap_methods adex_idmap_methods = {
        .init             = _idmap_adex_init,
        .unixids_to_sids  = _idmap_adex_get_sid_from_id,
        .sids_to_unixids  = _idmap_adex_get_id_from_sid,
-       .close_fn         = _idmap_adex_close
 };
 static struct nss_info_methods adex_nss_methods = {
        .init           = _nss_adex_init,
index ae65647ed63091207b910d476b846149e5800d74..f720a46fd19a14ddd911a7434277396015a85154 100644 (file)
@@ -567,17 +567,10 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom,
 /*
   Close the idmap tdb instance
 */
-static NTSTATUS idmap_autorid_close(struct idmap_domain *dom)
-{
-       /* don't do anything */
-       return NT_STATUS_OK;
-}
-
 static struct idmap_methods autorid_methods = {
        .init = idmap_autorid_initialize,
        .unixids_to_sids = idmap_autorid_unixids_to_sids,
        .sids_to_unixids = idmap_autorid_sids_to_unixids,
-       .close_fn = idmap_autorid_close
 };
 
 NTSTATUS idmap_autorid_init(void)
index 816e3a05320a6583224f0c9383aca13915aed852..61ae13ac3cd0ec2f06f7919b5172bc2ab431aaf4 100644 (file)
@@ -255,14 +255,6 @@ done:
        return nt_status;
 }
 
-/*********************************************************************
- ********************************************************************/
-
-static NTSTATUS be_close(struct idmap_domain *dom)
-{
-       return NT_STATUS_OK;
-}
-
 /*********************************************************************
  ********************************************************************/
 
@@ -359,7 +351,6 @@ static struct idmap_methods hash_idmap_methods = {
        .init            = be_init,
        .unixids_to_sids = unixids_to_sids,
        .sids_to_unixids = sids_to_unixids,
-       .close_fn        = be_close
 };
 
 static struct nss_info_methods hash_nss_methods = {
index 56d2793c01e489b75dcb242f3e1d0491a3cf04d7..8444d01620e53c3b48efd96e0086d6e0f4715bda 100644 (file)
@@ -1149,18 +1149,12 @@ done:
  Close the idmap ldap instance
 **********************************/
 
-static NTSTATUS idmap_ldap_close(struct idmap_domain *dom)
-{
-       return NT_STATUS_OK;
-}
-
 static struct idmap_methods idmap_ldap_methods = {
 
        .init = idmap_ldap_db_init,
        .unixids_to_sids = idmap_ldap_unixids_to_sids,
        .sids_to_unixids = idmap_ldap_sids_to_unixids,
        .allocate_id = idmap_ldap_get_new_id,
-       .close_fn = idmap_ldap_close
 };
 
 NTSTATUS idmap_ldap_init(void);
index e802288e504a9dca0d0ed56c288b5d4c109b74fc..5d5bd8c65ea1e9480f1bbf58cd8e8e435ac679fd 100644 (file)
@@ -210,17 +210,11 @@ static NTSTATUS idmap_nss_sids_to_unixids(struct idmap_domain *dom, struct id_ma
  Close the idmap tdb instance
 **********************************/
 
-static NTSTATUS idmap_nss_close(struct idmap_domain *dom)
-{
-       return NT_STATUS_OK;
-}
-
 static struct idmap_methods nss_methods = {
 
        .init = idmap_nss_int_init,
        .unixids_to_sids = idmap_nss_unixids_to_sids,
        .sids_to_unixids = idmap_nss_sids_to_unixids,
-       .close_fn = idmap_nss_close
 };
 
 NTSTATUS idmap_nss_init(void)
index 7f14b6bf38b0623fd4776448ea7b57e19bf3c4ae..ba179c331e8b9acc27cb62b7a79ba21ad2e3af54 100644 (file)
@@ -112,17 +112,11 @@ static NTSTATUS idmap_pdb_sids_to_unixids(struct idmap_domain *dom, struct id_ma
  Close the idmap tdb instance
 **********************************/
 
-static NTSTATUS idmap_pdb_close(struct idmap_domain *dom)
-{
-       return NT_STATUS_OK;
-}
-
 static struct idmap_methods passdb_methods = {
 
        .init = idmap_pdb_init,
        .unixids_to_sids = idmap_pdb_unixids_to_sids,
        .sids_to_unixids = idmap_pdb_sids_to_unixids,
-       .close_fn =idmap_pdb_close
 };
 
 NTSTATUS idmap_passdb_init(void)
index c87e77303dd2b989ce05ba30f4e3880fe78eecd9..935d7534fc33d035b57484183699dec8924383f9 100644 (file)
@@ -182,16 +182,10 @@ static NTSTATUS idmap_rid_sids_to_unixids(struct idmap_domain *dom, struct id_ma
        return NT_STATUS_OK;
 }
 
-static NTSTATUS idmap_rid_close(struct idmap_domain *dom)
-{
-       return NT_STATUS_OK;
-}
-
 static struct idmap_methods rid_methods = {
        .init = idmap_rid_initialize,
        .unixids_to_sids = idmap_rid_unixids_to_sids,
        .sids_to_unixids = idmap_rid_sids_to_unixids,
-       .close_fn = idmap_rid_close
 };
 
 NTSTATUS idmap_rid_init(void)
index 99e7414c7ff5b0215b111f47423ac830604a2e88..537f6cfb3869756486e88422c2fccb4c72b9ce41 100644 (file)
@@ -936,17 +936,11 @@ static NTSTATUS idmap_tdb_sids_to_unixids(struct idmap_domain *dom, struct id_ma
  Close the idmap tdb instance
 **********************************/
 
-static NTSTATUS idmap_tdb_close(struct idmap_domain *dom)
-{
-       return NT_STATUS_OK;
-}
-
 static struct idmap_methods db_methods = {
        .init = idmap_tdb_db_init,
        .unixids_to_sids = idmap_tdb_unixids_to_sids,
        .sids_to_unixids = idmap_tdb_sids_to_unixids,
        .allocate_id = idmap_tdb_get_new_id,
-       .close_fn = idmap_tdb_close
 };
 
 NTSTATUS idmap_tdb_init(void)