summaryrefslogtreecommitdiff
path: root/source3/utils/net_groupmap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-04 11:38:26 -0700
committerJeremy Allison <jra@samba.org>2011-05-04 12:12:15 -0700
commit8380835fc6de38706d9af29dc7f0fa4cec4f9c90 (patch)
tree5fdf238d5573c022a135e3f2e5590b656b0d64bf /source3/utils/net_groupmap.c
parentdf023b8657cab232df88d3656aa5d87676bb7254 (diff)
downloadsamba-8380835fc6de38706d9af29dc7f0fa4cec4f9c90.tar.gz
Fix warning messages caused by addition of null check in fstrcpy macro.
Diffstat (limited to 'source3/utils/net_groupmap.c')
-rw-r--r--source3/utils/net_groupmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index 818905e122f..9145093f52d 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -130,7 +130,7 @@ static int net_groupmap_list(struct net_context *c, int argc, const char **argv)
GROUP_MAP map;
if ( sid_string[0] )
- fstrcpy( ntgroup, sid_string);
+ strlcpy(ntgroup, sid_string, sizeof(ntgroup));
if (!get_sid_from_input(&sid, ntgroup)) {
return -1;
@@ -324,7 +324,7 @@ static int net_groupmap_add(struct net_context *c, int argc, const char **argv)
}
if (!ntgroup[0] )
- fstrcpy( ntgroup, unixgrp );
+ strlcpy(ntgroup, unixgrp, sizeof(ntgroup));
if (!NT_STATUS_IS_OK(add_initial_entry(gid, string_sid, sid_type, ntgroup, ntcomment))) {
d_fprintf(stderr, _("adding entry for group %s failed!\n"), ntgroup);
@@ -457,10 +457,10 @@ static int net_groupmap_modify(struct net_context *c, int argc, const char **arg
/* Change comment if new one */
if ( ntcomment[0] )
- fstrcpy( map.comment, ntcomment );
+ strlcpy(map.comment, ntcomment, sizeof(map.comment));
if ( ntgroup[0] )
- fstrcpy( map.nt_name, ntgroup );
+ strlcpy(map.nt_name, ntgroup, sizeof(map.nt_name));
if ( unixgrp[0] ) {
gid = nametogid( unixgrp );
@@ -528,7 +528,7 @@ static int net_groupmap_delete(struct net_context *c, int argc, const char **arg
/* give preference to the SID if we have that */
if ( sid_string[0] )
- fstrcpy( ntgroup, sid_string );
+ strlcpy(ntgroup, sid_string, sizeof(ntgroup));
if ( !get_sid_from_input(&sid, ntgroup) ) {
d_fprintf(stderr, _("Unable to resolve group %s to a SID\n"),