summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-08 21:25:40 +0100
committerVolker Lendecke <vl@samba.org>2011-03-18 15:46:36 +0100
commitdb3f8ae2bfe03dc67a76398f54845f0ef348971c (patch)
treea04aa13aae680f4376016b55c383f8350bd4ad9d /source3/winbindd
parenta94cc222bd8e38d05d162a7884692d45ba2d5092 (diff)
downloadsamba-db3f8ae2bfe03dc67a76398f54845f0ef348971c.tar.gz
samba-db3f8ae2bfe03dc67a76398f54845f0ef348971c.tar.bz2
samba-db3f8ae2bfe03dc67a76398f54845f0ef348971c.zip
idmap-autorid: Not necessary to talloc domaincfg
Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_autorid.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index d4618a9716..73121e120f 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -272,7 +272,6 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
struct id_map **ids)
{
struct autorid_global_config *global;
- struct autorid_domain_config *domaincfg;
struct winbindd_tdc_domain *domain;
TALLOC_CTX *ctx;
NTSTATUS ret;
@@ -285,13 +284,6 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
goto failure;
}
- if ((domaincfg = TALLOC_ZERO_P(ctx,
- struct autorid_domain_config)) == NULL) {
- DEBUG(0, ("Out of memory!\n"));
- ret = NT_STATUS_NO_MEMORY;
- goto failure;
- }
-
/* initialize the status to avoid surprise */
for (i = 0; ids[i]; i++) {
ids[i]->status = ID_UNKNOWN;
@@ -301,6 +293,7 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
struct autorid_global_config);
for (i = 0; ids[i]; i++) {
+ struct autorid_domain_config domaincfg;
struct dom_sid domainsid;
uint32_t rid;
@@ -319,12 +312,13 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
continue;
}
- ZERO_STRUCTP(domaincfg);
- domaincfg->sid = domain->sid;
- domaincfg->globalcfg = global;
+ ZERO_STRUCT(domaincfg);
+ domaincfg.sid = domain->sid;
+ domaincfg.globalcfg = global;
- ret = dbwrap_trans_do(autorid_db, idmap_autorid_get_domainrange,
- domaincfg);
+ ret = dbwrap_trans_do(autorid_db,
+ idmap_autorid_get_domainrange,
+ &domaincfg);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(3, ("Could not determine range for domain, "
@@ -332,7 +326,7 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
goto failure;
}
- ret = idmap_autorid_sid_to_id(ctx, global, domaincfg, ids[i]);
+ ret = idmap_autorid_sid_to_id(ctx, global, &domaincfg, ids[i]);
if ((!NT_STATUS_IS_OK(ret)) &&
(!NT_STATUS_EQUAL(ret, NT_STATUS_NONE_MAPPED))) {