summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-09-26 11:30:05 -0400
committerAndreas Schneider <asn@cryptomilk.org>2011-09-26 18:25:26 +0200
commitf7419172f03089276cab71c41419a5c57508d42e (patch)
tree1fb9960270a0395fe6e3220d3caeeaad2e0d0cb6 /source3/groupdb
parent0ff0b37f43d6a3ad52b1c954bc8f921222424c0d (diff)
downloadsamba-f7419172f03089276cab71c41419a5c57508d42e.tar.gz
samba-f7419172f03089276cab71c41419a5c57508d42e.tar.bz2
samba-f7419172f03089276cab71c41419a5c57508d42e.zip
s3-passdb: Cleanup use of fstring and move to talloc.
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index 638c06a8f1..e9a6c3b729 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -549,8 +549,14 @@ NTSTATUS pdb_default_get_aliasinfo(struct pdb_methods *methods,
return NT_STATUS_NO_SUCH_ALIAS;
}
- fstrcpy(info->acct_name, map.nt_name);
- fstrcpy(info->acct_desc, map.comment);
+ info->acct_name = talloc_strdup(info, map.nt_name);
+ if (!info->acct_name) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ info->acct_desc = talloc_strdup(info, map.comment);
+ if (!info->acct_desc) {
+ return NT_STATUS_NO_MEMORY;
+ }
sid_peek_rid(&map.sid, &info->rid);
return NT_STATUS_OK;
}