summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-08 21:17:37 +0100
committerVolker Lendecke <vl@samba.org>2011-03-18 15:46:36 +0100
commita94cc222bd8e38d05d162a7884692d45ba2d5092 (patch)
tree661d57c66b0477fe25d1b72be1797b041e9554eb
parent3e4879f3bddd9c9934bddeccfca65b3e8f678c26 (diff)
downloadsamba-a94cc222bd8e38d05d162a7884692d45ba2d5092.tar.gz
samba-a94cc222bd8e38d05d162a7884692d45ba2d5092.tar.bz2
samba-a94cc222bd8e38d05d162a7884692d45ba2d5092.zip
idmap-autorid: Not necessary to talloc domainsid
Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
-rw-r--r--source3/winbindd/idmap_autorid.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index f720a46fd1..d4618a9716 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -273,16 +273,13 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
{
struct autorid_global_config *global;
struct autorid_domain_config *domaincfg;
- struct dom_sid *domainsid;
struct winbindd_tdc_domain *domain;
- uint32_t rid;
TALLOC_CTX *ctx;
NTSTATUS ret;
int i;
ctx = talloc_new(dom);
- domainsid = talloc(ctx, struct dom_sid);
- if (!ctx || !domainsid) {
+ if (!ctx) {
DEBUG(0, ("Out of memory!\n"));
ret = NT_STATUS_NO_MEMORY;
goto failure;
@@ -304,19 +301,21 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
struct autorid_global_config);
for (i = 0; ids[i]; i++) {
- ZERO_STRUCTP(domainsid);
- sid_copy(domainsid, ids[i]->sid);
- if (!sid_split_rid(domainsid, &rid)) {
+ struct dom_sid domainsid;
+ uint32_t rid;
+
+ sid_copy(&domainsid, ids[i]->sid);
+ if (!sid_split_rid(&domainsid, &rid)) {
DEBUG(4, ("Could not determine domain SID from %s, "
"ignoring mapping request\n",
sid_string_dbg(ids[i]->sid)));
continue;
}
- domain = wcache_tdc_fetch_domainbysid(ctx, domainsid);
+ domain = wcache_tdc_fetch_domainbysid(ctx, &domainsid);
if (domain == NULL) {
DEBUG(10, ("Ignoring unknown domain sid %s\n",
- sid_string_dbg(domainsid)));
+ sid_string_dbg(&domainsid)));
continue;
}