Changeset 745 for trunk/server/source3/utils/net_rap.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/utils/net_rap.c
r414 r745 24 24 25 25 #include "includes.h" 26 #include "../librpc/gen_ndr/rap.h" 27 #include "../librpc/gen_ndr/svcctl.h" 26 28 #include "utils/net.h" 29 #include "libsmb/libsmb.h" 30 #include "libsmb/clirap.h" 27 31 28 32 /* The following messages were for error checking that is not properly … … 227 231 int ret; 228 232 229 RAP_SHARE_INFO_2 sinfo;233 struct rap_share_info_2 sinfo; 230 234 char *p; 231 235 char *sharename; … … 246 250 } 247 251 *p = 0; 248 strlcpy( sinfo.share_name, sharename, sizeof(sinfo.share_name));252 strlcpy((char *)sinfo.share_name, sharename, sizeof(sinfo.share_name)); 249 253 sinfo.reserved1 = '\0'; 250 254 sinfo.share_type = 0; 251 sinfo.comment = smb_xstrdup(c->opt_comment);255 sinfo.comment = c->opt_comment ? smb_xstrdup(c->opt_comment) : ""; 252 256 sinfo.perms = 0; 253 257 sinfo.maximum_users = c->opt_maxusers; … … 813 817 struct cli_state *cli; 814 818 int ret; 815 RAP_USER_INFO_1 userinfo;819 struct rap_user_info_1 userinfo; 816 820 817 821 if (argc == 0 || c->display_usage) { … … 822 826 return -1; 823 827 824 safe_strcpy( userinfo.user_name, argv[0], sizeof(userinfo.user_name)-1);825 if (c->opt_flags == -1)828 safe_strcpy((char *)userinfo.user_name, argv[0], sizeof(userinfo.user_name)-1); 829 if (c->opt_flags == 0) 826 830 c->opt_flags = 0x21; 827 831 … … 957 961 struct cli_state *cli; 958 962 int ret; 959 RAP_GROUP_INFO_1 grinfo;963 struct rap_group_info_1 grinfo; 960 964 961 965 if (argc == 0 || c->display_usage) { … … 967 971 968 972 /* BB check for length 21 or smaller explicitly ? BB */ 969 safe_strcpy( grinfo.group_name, argv[0], sizeof(grinfo.group_name)-1);973 safe_strcpy((char *)grinfo.group_name, argv[0], sizeof(grinfo.group_name)-1); 970 974 grinfo.reserved1 = '\0'; 971 975 grinfo.comment = smb_xstrdup(c->opt_comment ? c->opt_comment : "");
Note:
See TracChangeset
for help on using the changeset viewer.