Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/utils/net_rap.c

    r414 r745  
    2424
    2525#include "includes.h"
     26#include "../librpc/gen_ndr/rap.h"
     27#include "../librpc/gen_ndr/svcctl.h"
    2628#include "utils/net.h"
     29#include "libsmb/libsmb.h"
     30#include "libsmb/clirap.h"
    2731
    2832/* The following messages were for error checking that is not properly
     
    227231        int ret;
    228232
    229         RAP_SHARE_INFO_2 sinfo;
     233        struct rap_share_info_2 sinfo;
    230234        char *p;
    231235        char *sharename;
     
    246250        }
    247251        *p = 0;
    248         strlcpy(sinfo.share_name, sharename, sizeof(sinfo.share_name));
     252        strlcpy((char *)sinfo.share_name, sharename, sizeof(sinfo.share_name));
    249253        sinfo.reserved1 = '\0';
    250254        sinfo.share_type = 0;
    251         sinfo.comment = smb_xstrdup(c->opt_comment);
     255        sinfo.comment = c->opt_comment ? smb_xstrdup(c->opt_comment) : "";
    252256        sinfo.perms = 0;
    253257        sinfo.maximum_users = c->opt_maxusers;
     
    813817        struct cli_state *cli;
    814818        int ret;
    815         RAP_USER_INFO_1 userinfo;
     819        struct rap_user_info_1 userinfo;
    816820
    817821        if (argc == 0 || c->display_usage) {
     
    822826                return -1;
    823827
    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)
    826830                c->opt_flags = 0x21;
    827831
     
    957961        struct cli_state *cli;
    958962        int ret;
    959         RAP_GROUP_INFO_1 grinfo;
     963        struct rap_group_info_1 grinfo;
    960964
    961965        if (argc == 0 || c->display_usage) {
     
    967971
    968972        /* 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);
    970974        grinfo.reserved1 = '\0';
    971975        grinfo.comment = smb_xstrdup(c->opt_comment ? c->opt_comment : "");
Note: See TracChangeset for help on using the changeset viewer.