Ignore:
Timestamp:
Jan 15, 2010, 8:23:30 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 to 3.3.10 (source)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/smbd/trans2.c

    r309 r370  
    12801280        char *last_entry_ptr;
    12811281        bool was_8_3;
    1282         uint32 nt_extmode; /* Used for NT connections instead of mode */
    12831282        bool needslash = ( conn->dirpath[strlen(conn->dirpath) -1] != '/');
    12841283        bool check_mangled_names = lp_manglednames(conn->params);
     
    14661465        p = pdata;
    14671466        last_entry_ptr = p;
    1468 
    1469         nt_extmode = mode ? mode : FILE_ATTRIBUTE_NORMAL;
    14701467
    14711468        switch (info_level) {
     
    16151612                        SOFF_T(p,0,file_size); p += 8;
    16161613                        SOFF_T(p,0,allocation_size); p += 8;
    1617                         SIVAL(p,0,nt_extmode); p += 4;
     1614                        SIVAL(p,0,mode); p += 4;
    16181615                        q = p; p += 4; /* q is placeholder for name length. */
    16191616                        {
     
    16661663                        SOFF_T(p,0,file_size); p += 8;
    16671664                        SOFF_T(p,0,allocation_size); p += 8;
    1668                         SIVAL(p,0,nt_extmode); p += 4;
     1665                        SIVAL(p,0,mode); p += 4;
    16691666                        len = srvstr_push(base_data, flags2,
    16701667                                          p + 4, fname, PTR_DIFF(end_data, p+4),
     
    16891686                        SOFF_T(p,0,file_size); p += 8;
    16901687                        SOFF_T(p,0,allocation_size); p += 8;
    1691                         SIVAL(p,0,nt_extmode); p += 4;
     1688                        SIVAL(p,0,mode); p += 4;
    16921689                        q = p; p += 4; /* q is placeholder for name length. */
    16931690                        {
     
    17381735                        SOFF_T(p,0,file_size); p += 8;
    17391736                        SOFF_T(p,0,allocation_size); p += 8;
    1740                         SIVAL(p,0,nt_extmode); p += 4;
     1737                        SIVAL(p,0,mode); p += 4;
    17411738                        q = p; p += 4; /* q is placeholder for name length. */
    17421739                        {
     
    17711768                        SOFF_T(p,0,file_size); p += 8;
    17721769                        SOFF_T(p,0,allocation_size); p += 8;
    1773                         SIVAL(p,0,nt_extmode); p += 4;
     1770                        SIVAL(p,0,mode); p += 4;
    17741771                        q = p; p += 4; /* q is placeholder for name length */
    17751772                        {
     
    22702267        continue_bit = (findnext_flags & FLAG_TRANS2_FIND_CONTINUE);
    22712268
    2272         srvstr_get_path_wcard(ctx, params, req->flags2, &resume_name,
     2269        if (!continue_bit) {
     2270                /* We only need resume_name if continue_bit is zero. */
     2271                srvstr_get_path_wcard(ctx, params, req->flags2, &resume_name,
    22732272                              params+12,
    22742273                              total_params - 12, STR_TERMINATE, &ntstatus,
    22752274                              &mask_contains_wcard);
    2276         if (!NT_STATUS_IS_OK(ntstatus)) {
    2277                 /* Win9x or OS/2 can send a resume name of ".." or ".". This will cause the parser to
    2278                    complain (it thinks we're asking for the directory above the shared
    2279                    path or an invalid name). Catch this as the resume name is only compared, never used in
    2280                    a file access. JRA. */
    2281                 srvstr_pull_talloc(ctx, params, req->flags2,
     2275                if (!NT_STATUS_IS_OK(ntstatus)) {
     2276                        /* Win9x or OS/2 can send a resume name of ".." or ".". This will cause the parser to
     2277                           complain (it thinks we're asking for the directory above the shared
     2278                           path or an invalid name). Catch this as the resume name is only compared, never used in
     2279                           a file access. JRA. */
     2280                        srvstr_pull_talloc(ctx, params, req->flags2,
    22822281                                &resume_name, params+12,
    22832282                                total_params - 12,
    22842283                                STR_TERMINATE);
    22852284
    2286                 if (!resume_name || !(ISDOT(resume_name) || ISDOTDOT(resume_name))) {
    2287                         reply_nterror(req, ntstatus);
    2288                         return;
     2285                        if (!resume_name || !(ISDOT(resume_name) || ISDOTDOT(resume_name))) {
     2286                                reply_nterror(req, ntstatus);
     2287                                return;
     2288                        }
    22892289                }
    22902290        }
     
    22942294resume_key = %d resume name = %s continue=%d level = %d\n",
    22952295                dptr_num, max_data_bytes, maxentries, close_after_request, close_if_end,
    2296                 requires_resume_key, resume_key, resume_name, continue_bit, info_level));
     2296                requires_resume_key, resume_key,
     2297                resume_name ? resume_name : "(NULL)", continue_bit, info_level));
    22972298
    22982299        if (!maxentries) {
     
    24162417         */
    24172418
    2418         if(*resume_name && !continue_bit) {
     2419        if(!continue_bit && resume_name && *resume_name) {
    24192420                SMB_STRUCT_STAT st;
    24202421
     
    40784079                mode = dos_mode(conn,fname,&sbuf);
    40794080        }
    4080         if (!mode)
    4081                 mode = FILE_ATTRIBUTE_NORMAL;
    40824081
    40834082        nlink = sbuf.st_nlink;
Note: See TracChangeset for help on using the changeset viewer.