Ignore:
Timestamp:
Mar 1, 2010, 3:05:48 PM (15 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3.x to 3.3.11

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/libsmb/clirap.c

    r206 r411  
    271271                SIVAL(p,0,func); /* api number */
    272272                p += 2;
    273                 /* Next time through we need to use the continue api */
    274                 func = RAP_NetServerEnum3;
    275 
    276                 if (last_entry) {
    277                         strlcpy(p,"WrLehDOz", sizeof(param)-PTR_DIFF(p,param));
     273
     274                if (func == RAP_NetServerEnum3) {
     275                        strlcpy(p,"WrLehDzz", sizeof(param)-PTR_DIFF(p,param));
    278276                } else {
    279277                        strlcpy(p,"WrLehDz", sizeof(param)-PTR_DIFF(p,param));
     
    294292                 */
    295293                len = push_ascii(p,
    296                                 last_entry ? last_entry : workgroup,
     294                                workgroup,
    297295                                sizeof(param) - PTR_DIFF(p,param) - 1,
    298296                                STR_TERMINATE|STR_UPPER);
     
    303301                }
    304302                p += len;
     303
     304                if (func == RAP_NetServerEnum3) {
     305                        len = push_ascii(p,
     306                                        last_entry ? last_entry : "",
     307                                        sizeof(param) - PTR_DIFF(p,param) - 1,
     308                                        STR_TERMINATE);
     309
     310                        if (len == (size_t)-1) {
     311                                SAFE_FREE(last_entry);
     312                                return false;
     313                        }
     314                        p += len;
     315                }
     316
     317                /* Next time through we need to use the continue api */
     318                func = RAP_NetServerEnum3;
    305319
    306320                if (!cli_api(cli,
     
    365379                                char *s1, *s2;
    366380                                TALLOC_CTX *frame = talloc_stackframe();
     381                                uint32_t entry_stype;
    367382
    368383                                if (p + 26 > rdata_end) {
     
    375390                                cmnt = comment_offset?(rdata+comment_offset):"";
    376391
    377                                 if (comment_offset < 0 || comment_offset > (int)rdrcnt) {
     392                                if (comment_offset < 0 || comment_offset >= (int)rdrcnt) {
    378393                                        TALLOC_FREE(frame);
    379394                                        continue;
     
    388403                                }
    389404
    390                                 stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;
     405                                entry_stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;
    391406
    392407                                pull_string_talloc(frame,rdata,0,
     
    400415                                }
    401416
    402                                 fn(s1, stype, s2, state);
     417                                fn(s1, entry_stype, s2, state);
    403418                                TALLOC_FREE(frame);
    404419                        }
Note: See TracChangeset for help on using the changeset viewer.