summaryrefslogtreecommitdiff
path: root/source3/utils/net_rap.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/utils/net_rap.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/utils/net_rap.c')
-rw-r--r--source3/utils/net_rap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c
index afda222740..36f6d33197 100644
--- a/source3/utils/net_rap.c
+++ b/source3/utils/net_rap.c
@@ -26,6 +26,7 @@
#include "../librpc/gen_ndr/rap.h"
#include "../librpc/gen_ndr/svcctl.h"
#include "utils/net.h"
+#include "libsmb/libsmb.h"
#include "libsmb/clirap.h"
/* The following messages were for error checking that is not properly
@@ -824,7 +825,7 @@ static int rap_user_add(struct net_context *c, int argc, const char **argv)
if (!NT_STATUS_IS_OK(net_make_ipc_connection(c, 0, &cli)))
return -1;
- safe_strcpy((char *)userinfo.user_name, argv[0], sizeof(userinfo.user_name)-1);
+ strlcpy((char *)userinfo.user_name, argv[0], sizeof(userinfo.user_name));
if (c->opt_flags == 0)
c->opt_flags = 0x21;
@@ -969,7 +970,7 @@ static int rap_group_add(struct net_context *c, int argc, const char **argv)
return -1;
/* BB check for length 21 or smaller explicitly ? BB */
- safe_strcpy((char *)grinfo.group_name, argv[0], sizeof(grinfo.group_name)-1);
+ strlcpy((char *)grinfo.group_name, argv[0], sizeof(grinfo.group_name));
grinfo.reserved1 = '\0';
grinfo.comment = smb_xstrdup(c->opt_comment ? c->opt_comment : "");