diff options
author | Jeremy Allison <jra@samba.org> | 2011-05-04 11:38:26 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-05-04 12:12:15 -0700 |
commit | 8380835fc6de38706d9af29dc7f0fa4cec4f9c90 (patch) | |
tree | 5fdf238d5573c022a135e3f2e5590b656b0d64bf /source3/libnet | |
parent | df023b8657cab232df88d3656aa5d87676bb7254 (diff) | |
download | samba-8380835fc6de38706d9af29dc7f0fa4cec4f9c90.tar.gz samba-8380835fc6de38706d9af29dc7f0fa4cec4f9c90.tar.bz2 samba-8380835fc6de38706d9af29dc7f0fa4cec4f9c90.zip |
Fix warning messages caused by addition of null check in fstrcpy macro.
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_dssync_passdb.c | 12 | ||||
-rw-r--r-- | source3/libnet/libnet_samsync_passdb.c | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source3/libnet/libnet_dssync_passdb.c b/source3/libnet/libnet_dssync_passdb.c index ab347567f1..7380efabb8 100644 --- a/source3/libnet/libnet_dssync_passdb.c +++ b/source3/libnet/libnet_dssync_passdb.c @@ -1531,11 +1531,11 @@ static NTSTATUS handle_alias_object(struct dssync_passdb *pctx, map.sid_name_use = SID_NAME_ALIAS; } - fstrcpy(map.nt_name, name); + strlcpy(map.nt_name, name, sizeof(map.nt_name)); if (description) { - fstrcpy(map.comment, comment); + strlcpy(map.comment, comment, sizeof(map.comment)); } else { - fstrcpy(map.comment, ""); + strlcpy(map.comment, "", sizeof(map.comment)); } if (insert) @@ -1636,11 +1636,11 @@ static NTSTATUS handle_group_object(struct dssync_passdb *pctx, 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 (description) { - fstrcpy(map.comment, comment); + strlcpy(map.comment, comment, sizeof(map.comment)); } else { - fstrcpy(map.comment, ""); + strlcpy(map.comment, "", sizeof(map.comment)); } if (insert) diff --git a/source3/libnet/libnet_samsync_passdb.c b/source3/libnet/libnet_samsync_passdb.c index b579723f6f..d8928c85a6 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) @@ -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); |