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

Samba Server: updated vendor to 3.6.9

Location:
vendor/current/source3/client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/client/client.c

    r740 r746  
    17181718
    17191719        status = cli_ntcreate(cli, name, 0,
    1720                               CREATE_ACCESS_READ, 0,
     1720                              SEC_FILE_READ_DATA | SEC_FILE_READ_ATTRIBUTE |
     1721                              SEC_STD_SYNCHRONIZE, 0,
    17211722                              FILE_SHARE_READ|FILE_SHARE_WRITE
    17221723                              |FILE_SHARE_DELETE,
     
    19141915        if (f == x_stdin) {
    19151916                cli_shutdown(cli);
    1916                 exit(0);
     1917                exit(rc);
    19171918        }
    19181919
     
    25292530
    25302531        if (!NT_STATUS_IS_OK(cli_posix_open(targetcli, targetname, O_CREAT|O_RDWR, mode, &fnum))) {
    2531                 if (!NT_STATUS_IS_OK(cli_posix_open(targetcli, targetname, O_CREAT|O_RDONLY, mode, &fnum))) {
    2532                         d_printf("posix_open file %s: for read/write fnum %d\n", targetname, fnum);
     2532                if (NT_STATUS_IS_OK(cli_posix_open(targetcli, targetname, O_CREAT|O_RDONLY, mode, &fnum))) {
     2533                        d_printf("posix_open file %s: for readonly fnum %d\n", targetname, fnum);
    25332534                } else {
    25342535                        d_printf("Failed to open file %s. %s\n", targetname, cli_errstr(cli));
     
    48454846                status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage)));
    48464847
    4847                 if (!NT_STATUS_IS_OK(status)) {
    4848                         DEBUG(0, ("SMBecho failed. Maybe server has closed "
    4849                                 "the connection\n"));
     4848                if (NT_STATUS_IS_OK(status)) {
     4849                        return;
     4850                }
     4851
     4852                if (!cli_state_is_connected(cli)) {
     4853                        DEBUG(0, ("SMBecho failed (%s). The connection is "
     4854                                "disconnected now\n", nt_errstr(status)));
    48504855                        finished = true;
    48514856                        smb_readline_done();
  • vendor/current/source3/client/clitar.c

    r740 r746  
    209209                memset(hb.dbuf.size, 0, 4);
    210210                hb.dbuf.size[0]=128;
    211                 for (i = 8, jp=(char*)&size; i; i--)
    212                         hb.dbuf.size[i+3] = *(jp++);
     211                for (i = 8; i; i--) {
     212                        hb.dbuf.size[i+3] = size & 0xff;
     213                        size >>= 8;
     214                }
    213215        }
    214216        oct_it((uint64_t) mtime, 13, hb.dbuf.mtime);
     
    312314                convert_time_t_to_timespec((time_t)strtol(hb->dbuf.mtime, NULL, 8));
    313315        finfo->atime_ts = convert_time_t_to_timespec(time(NULL));
    314         finfo->size = unoct(hb->dbuf.size, sizeof(hb->dbuf.size));
     316        if ((hb->dbuf.size[0] & 0xff) == 0x80) {
     317                /* This is a non-POSIX compatible extention to extract files
     318                        greater than 8GB. */
     319                finfo->size = 0;
     320                for (i = 0; i < 8; i++) {
     321                        finfo->size <<= 8;
     322                        finfo->size |= hb->dbuf.size[i+4] & 0xff;
     323                }
     324        } else {
     325                finfo->size = unoct(hb->dbuf.size, sizeof(hb->dbuf.size));
     326        }
    315327
    316328        return True;
     
    826838        NTSTATUS status = NT_STATUS_OK;
    827839
    828         if (strequal(finfo->name,"..") || strequal(finfo->name,"."))
    829                 return NT_STATUS_OK;
     840        if (strequal(finfo->name,"..") || strequal(finfo->name,".")) {
     841                status = NT_STATUS_OK;
     842                goto cleanup;
     843        }
    830844
    831845        /* Is it on the exclude list ? */
     
    840854                                finfo->name);
    841855                if (!exclaim) {
    842                         return NT_STATUS_NO_MEMORY;
     856                        status = NT_STATUS_NO_MEMORY;
     857                        goto cleanup;
    843858                }
    844859
     
    849864                        DEBUG(3,("Skipping file %s\n", exclaim));
    850865                        TALLOC_FREE(exclaim);
    851                         return NT_STATUS_OK;
     866                        status = NT_STATUS_OK;
     867                        goto cleanup;
    852868                }
    853869                TALLOC_FREE(exclaim);
     
    861877                saved_curdir = talloc_strdup(ctx, client_get_cur_dir());
    862878                if (!saved_curdir) {
    863                         return NT_STATUS_NO_MEMORY;
     879                        status = NT_STATUS_NO_MEMORY;
     880                        goto cleanup;
    864881                }
    865882
     
    874891                                finfo->name);
    875892                if (!new_cd) {
    876                         return NT_STATUS_NO_MEMORY;
     893                        status = NT_STATUS_NO_MEMORY;
     894                        goto cleanup;
    877895                }
    878896                client_set_cur_dir(new_cd);
     
    893911                                client_get_cur_dir());
    894912                if (!mtar_mask) {
    895                         return NT_STATUS_NO_MEMORY;
     913                        status = NT_STATUS_NO_MEMORY;
     914                        goto cleanup;
    896915                }
    897916                DEBUG(5, ("Doing list with mtar_mask: %s\n", mtar_mask));
    898                 status = do_list(mtar_mask, attribute, do_tar, False, True);
     917                do_list(mtar_mask, attribute, do_tar, False, True);
    899918                client_set_cur_dir(saved_curdir);
    900919                TALLOC_FREE(saved_curdir);
     
    907926                                        finfo->name);
    908927                if (!rname) {
    909                         return NT_STATUS_NO_MEMORY;
     928                        status = NT_STATUS_NO_MEMORY;
     929                        goto cleanup;
    910930                }
    911931                status = do_atar(rname,finfo->name,finfo);
    912932                TALLOC_FREE(rname);
    913933        }
     934
     935  cleanup:
     936        TALLOC_FREE(ctx);
    914937        return status;
    915938}
     
    10191042{
    10201043        uint16_t fnum = (uint16_t) -1;
    1021         int pos = 0, dsize = 0, bpos = 0;
    1022         uint64_t rsize = 0;
     1044        int dsize = 0, bpos = 0;
     1045        uint64_t rsize = 0, pos = 0;
    10231046        NTSTATUS status;
    10241047
Note: See TracChangeset for help on using the changeset viewer.