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

Samba Server: updated vendor to 3.6.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.