Ignore:
Timestamp:
May 27, 2007, 12:26:26 AM (18 years ago)
Author:
Paul Smedley
Message:

Upgrade source to 3.0.25a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/nsswitch/winbindd_user.c

    r22 r39  
    632632        struct getent_state *ent;
    633633        struct winbindd_pw *user_list;
    634         int num_users, user_list_ndx = 0, i;
     634        int num_users, user_list_ndx;
    635635
    636636        DEBUG(3, ("[%5lu]: getpwent\n", (unsigned long)state->pid));
     
    646646
    647647        num_users = MIN(MAX_GETPWENT_USERS, state->request.data.num_entries);
     648
     649        if (num_users == 0) {
     650                request_error(state);
     651                return;
     652        }
    648653       
    649654        if ((state->response.extra_data.data = SMB_MALLOC_ARRAY(struct winbindd_pw, num_users)) == NULL) {
     
    667672        /* Start sending back users */
    668673
    669         for (i = 0; i < num_users; i++) {
     674        for (user_list_ndx = 0; user_list_ndx < num_users; ) {
    670675                struct getpwent_user *name_list = NULL;
    671676                uint32 result;
     
    710715                        &user_list[user_list_ndx]);
    711716               
    712                 ent->sam_entry_index++;
    713                
    714717                /* Add user to return list */
    715718               
     
    724727                        DEBUG(1, ("could not lookup domain user %s\n",
    725728                                  name_list[ent->sam_entry_index].name));
     729
     730                ent->sam_entry_index++;
     731               
    726732        }
    727733
Note: See TracChangeset for help on using the changeset viewer.