summaryrefslogtreecommitdiffstats
path: root/source3/libnet/libnet_samsync_passdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /source3/libnet/libnet_samsync_passdb.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-4.0.0alpha16.tar.gz
samba-4.0.0alpha16.tar.xz
samba-4.0.0alpha16.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16samba-4.0.0alpha16
Diffstat (limited to 'source3/libnet/libnet_samsync_passdb.c')
-rw-r--r--source3/libnet/libnet_samsync_passdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/libnet/libnet_samsync_passdb.c b/source3/libnet/libnet_samsync_passdb.c
index b579723f6fd..0cf2ed3323d 100644
--- a/source3/libnet/libnet_samsync_passdb.c
+++ b/source3/libnet/libnet_samsync_passdb.c
@@ -428,11 +428,11 @@ static NTSTATUS fetch_group_info(TALLOC_CTX *mem_ctx,
map.gid = grp->gr_gid;
map.sid = group_sid;
map.sid_name_use = SID_NAME_DOM_GRP;
- fstrcpy(map.nt_name, name);
+ strlcpy(map.nt_name, name, sizeof(map.nt_name));
if (r->description.string) {
- fstrcpy(map.comment, comment);
+ strlcpy(map.comment, comment, sizeof(map.comment));
} else {
- fstrcpy(map.comment, "");
+ strlcpy(map.comment, "", sizeof(map.comment));
}
if (insert)
@@ -476,7 +476,7 @@ static NTSTATUS fetch_group_mem_info(TALLOC_CTX *mem_ctx,
d_printf("Group members of %s: ", grp->gr_name);
if (r->num_rids) {
- if ((nt_members = TALLOC_ZERO_ARRAY(mem_ctx, char *, r->num_rids)) == NULL) {
+ if ((nt_members = talloc_zero_array(mem_ctx, char *, r->num_rids)) == NULL) {
DEBUG(0, ("talloc failed\n"));
return NT_STATUS_NO_MEMORY;
}
@@ -617,8 +617,8 @@ static NTSTATUS fetch_alias_info(TALLOC_CTX *mem_ctx,
else
map.sid_name_use = SID_NAME_ALIAS;
- fstrcpy(map.nt_name, name);
- fstrcpy(map.comment, comment);
+ strlcpy(map.nt_name, name, sizeof(map.nt_name));
+ strlcpy(map.comment, comment, sizeof(map.comment));
if (insert)
pdb_add_group_mapping_entry(&map);