Ignore:
Timestamp:
May 13, 2014, 11:39:04 AM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update trunk to 3.6.23

Location:
trunk/server
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/libnet/groupinfo.c

    r745 r862  
    8888                s->monitor_fn(&msg);
    8989        }
    90        
    9190
    9291        /* have we actually got name resolved
    9392           - we're looking for only one at the moment */
    94         if (s->lookup.out.rids->count == 0) {
    95                 composite_error(c, NT_STATUS_NO_SUCH_USER);
     93        if (s->lookup.out.rids->count != s->lookup.in.num_names) {
     94                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
     95                return;
     96        }
     97        if (s->lookup.out.types->count != s->lookup.in.num_names) {
     98                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
     99                return;
    96100        }
    97101
  • trunk/server/source4/libnet/groupman.c

    r745 r862  
    213213        /* what to do when there's no group account to delete
    214214           and what if there's more than one rid resolved */
    215         if (!s->lookupname.out.rids->count) {
    216                 c->status = NT_STATUS_NO_SUCH_GROUP;
    217                 composite_error(c, c->status);
    218                 return;
    219 
    220         } else if (!s->lookupname.out.rids->count > 1) {
    221                 c->status = NT_STATUS_INVALID_ACCOUNT_NAME;
     215        if (s->lookupname.out.rids->count != s->lookupname.in.num_names) {
     216                c->status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     217                composite_error(c, c->status);
     218                return;
     219        }
     220        if (s->lookupname.out.types->count != s->lookupname.in.num_names) {
     221                c->status = NT_STATUS_INVALID_NETWORK_RESPONSE;
    222222                composite_error(c, c->status);
    223223                return;
  • trunk/server/source4/libnet/libnet_join.c

    r745 r862  
    657657                                                              r->in.account_name, ln.out.rids->count);
    658658                        talloc_free(tmp_ctx);
    659                         return NT_STATUS_INVALID_PARAMETER;
    660                 }
    661                
     659                        return NT_STATUS_INVALID_NETWORK_RESPONSE;
     660                }
     661
     662                if (ln.out.types->count != 1) {
     663                        r->out.error_string = talloc_asprintf(mem_ctx,
     664                                                                "samr_LookupNames for [%s] returns %d RID TYPEs",
     665                                                                r->in.account_name, ln.out.types->count);
     666                        talloc_free(tmp_ctx);
     667                        return NT_STATUS_INVALID_NETWORK_RESPONSE;
     668                }
     669
    662670                /* prepare samr_OpenUser */
    663671                ZERO_STRUCTP(u_handle);
  • trunk/server/source4/libnet/libnet_lookup.c

    r745 r862  
    364364        if (!composite_is_ok(c)) return;
    365365
     366        if (s->lookup.out.sids->count != s->lookup.in.num_names) {
     367                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
     368                return;
     369        }
     370
    366371        composite_done(c);
    367372}
  • trunk/server/source4/libnet/libnet_passwd.c

    r752 r862  
    628628                                                "samr_LookupNames for [%s] returns %d RIDs",
    629629                                                r->samr.in.account_name, ln.out.rids->count);
    630                 status = NT_STATUS_INVALID_PARAMETER;
     630                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
    631631                goto disconnect;       
     632        }
     633
     634        if (ln.out.types->count != 1) {
     635                r->samr.out.error_string = talloc_asprintf(mem_ctx,
     636                                                "samr_LookupNames for [%s] returns %d RID TYPEs",
     637                                                r->samr.in.account_name, ln.out.types->count);
     638                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     639                goto disconnect;
    632640        }
    633641
  • trunk/server/source4/libnet/userinfo.c

    r745 r862  
    9191        /* have we actually got name resolved
    9292           - we're looking for only one at the moment */
    93         if (s->lookup.out.rids->count == 0) {
    94                 composite_error(c, NT_STATUS_NO_SUCH_USER);
     93        if (s->lookup.out.rids->count != s->lookup.in.num_names) {
     94                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
     95                return;
     96        }
     97        if (s->lookup.out.types->count != s->lookup.in.num_names) {
     98                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
     99                return;
    95100        }
    96101
  • trunk/server/source4/libnet/userman.c

    r745 r862  
    237237        /* what to do when there's no user account to delete
    238238           and what if there's more than one rid resolved */
    239         if (!s->lookupname.out.rids->count) {
    240                 c->status = NT_STATUS_NO_SUCH_USER;
    241                 composite_error(c, c->status);
    242                 return;
    243 
    244         } else if (!s->lookupname.out.rids->count > 1) {
    245                 c->status = NT_STATUS_INVALID_ACCOUNT_NAME;
    246                 composite_error(c, c->status);
     239        if (s->lookupname.out.rids->count != s->lookupname.in.num_names) {
     240                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
     241                return;
     242        }
     243        if (s->lookupname.out.types->count != s->lookupname.in.num_names) {
     244                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
    247245                return;
    248246        }
     
    512510        /* what to do when there's no user account to delete
    513511           and what if there's more than one rid resolved */
    514         if (!s->lookupname.out.rids->count) {
    515                 c->status = NT_STATUS_NO_SUCH_USER;
    516                 composite_error(c, c->status);
    517                 return;
    518 
    519         } else if (!s->lookupname.out.rids->count > 1) {
    520                 c->status = NT_STATUS_INVALID_ACCOUNT_NAME;
    521                 composite_error(c, c->status);
     512        if (s->lookupname.out.rids->count != s->lookupname.in.num_names) {
     513                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
     514                return;
     515        }
     516        if (s->lookupname.out.types->count != s->lookupname.in.num_names) {
     517                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
    522518                return;
    523519        }
Note: See TracChangeset for help on using the changeset viewer.