summaryrefslogtreecommitdiff
path: root/source3/rpc_server/lsa
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-09-26 17:55:47 -0400
committerGünther Deschner <gd@samba.org>2011-10-12 19:28:12 +0200
commit995d1567265be178b4e45f79ea4562a7041ffa52 (patch)
tree97eed8a77f5332f0aa73109454037e6f87250cdb /source3/rpc_server/lsa
parentfc320551d84508371ab1c082752515d538648f49 (diff)
downloadsamba-995d1567265be178b4e45f79ea4562a7041ffa52.tar.gz
samba-995d1567265be178b4e45f79ea4562a7041ffa52.tar.bz2
samba-995d1567265be178b4e45f79ea4562a7041ffa52.zip
s3-group-mapping: Remove fstrings from GROUP_MAP.
Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/lsa')
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index 17f873bca9..c78f23815c 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -3023,7 +3023,8 @@ NTSTATUS _lsa_SetSystemAccessAccount(struct pipes_struct *p,
struct lsa_SetSystemAccessAccount *r)
{
struct lsa_info *info=NULL;
- GROUP_MAP map;
+ NTSTATUS status;
+ GROUP_MAP *map;
/* find the connection policy handle. */
if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info))
@@ -3037,10 +3038,19 @@ NTSTATUS _lsa_SetSystemAccessAccount(struct pipes_struct *p,
return NT_STATUS_ACCESS_DENIED;
}
- if (!pdb_getgrsid(&map, info->sid))
+ map = talloc_zero(p->mem_ctx, GROUP_MAP);
+ if (!map) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ if (!pdb_getgrsid(map, info->sid)) {
+ TALLOC_FREE(map);
return NT_STATUS_NO_SUCH_GROUP;
+ }
- return pdb_update_group_mapping_entry(&map);
+ status = pdb_update_group_mapping_entry(map);
+ TALLOC_FREE(map);
+ return status;
}
/***************************************************************************