summaryrefslogtreecommitdiff
path: root/source3/utils/net_rap.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-03 08:28:12 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-03 08:28:12 +0000
commit634c54310c92c48dd4eceec602e230a021bdcfc5 (patch)
tree9f5732a180b8daacf176e42511b0a72c972c7a4b /source3/utils/net_rap.c
parent47a7f0cfb5006fb41239a6cd81cce5e35fde750a (diff)
downloadsamba-634c54310c92c48dd4eceec602e230a021bdcfc5.tar.gz
samba-634c54310c92c48dd4eceec602e230a021bdcfc5.tar.bz2
samba-634c54310c92c48dd4eceec602e230a021bdcfc5.zip
Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
Diffstat (limited to 'source3/utils/net_rap.c')
-rw-r--r--source3/utils/net_rap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c
index af0a6adbd2..8f3dd53fa6 100644
--- a/source3/utils/net_rap.c
+++ b/source3/utils/net_rap.c
@@ -204,7 +204,7 @@ static int rap_share_add(int argc, const char **argv)
strlcpy(sinfo.share_name, sharename, sizeof(sinfo.share_name));
sinfo.reserved1 = '\0';
sinfo.share_type = 0;
- sinfo.comment = opt_comment;
+ sinfo.comment = smb_xstrdup(opt_comment);
sinfo.perms = 0;
sinfo.maximum_users = opt_maxusers;
sinfo.active_users = 0;
@@ -644,7 +644,7 @@ static int rap_user_add(int argc, const char **argv)
userinfo.userflags = opt_flags;
userinfo.reserved1 = '\0';
- userinfo.comment = opt_comment;
+ userinfo.comment = smb_xstrdup(opt_comment);
userinfo.priv = 1;
userinfo.home_dir = NULL;
userinfo.logon_script = NULL;
@@ -757,7 +757,7 @@ static int rap_group_add(int argc, const char **argv)
/* BB check for length 21 or smaller explicitly ? BB */
safe_strcpy(grinfo.group_name, argv[0], sizeof(grinfo.group_name));
grinfo.reserved1 = '\0';
- grinfo.comment = opt_comment;
+ grinfo.comment = smb_xstrdup(opt_comment);
ret = cli_NetGroupAdd(cli, &grinfo);
cli_shutdown(cli);