Ignore:
Timestamp:
May 24, 2009, 7:17:10 AM (17 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 to 3.3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/auth/auth_util.c

    r206 r221  
    556556        gid_t *gids;
    557557        auth_serversupplied_info *result;
    558         int i;
    559         size_t num_gids;
    560         DOM_SID unix_group_sid;
    561558        const char *username = pdb_get_username(sampass);
    562559        NTSTATUS status;
     
    574571
    575572        result->sam_account = sampass;
    576         /* Ensure thaat the sampass will be freed with the result */
    577         talloc_steal(result, sampass);
    578573        result->unix_name = pwd->pw_name;
    579574        /* Ensure that we keep pwd->pw_name, because we will free pwd below */
     
    632627        }
    633628
    634         /* Add the "Unix Group" SID for each gid to catch mapped groups
    635            and their Unix equivalent.  This is to solve the backwards
    636            compatibility problem of 'valid users = +ntadmin' where
    637            ntadmin has been paired with "Domain Admins" in the group
    638            mapping table.  Otherwise smb.conf would need to be changed
    639            to 'valid user = "Domain Admins"'.  --jerry */
    640        
    641         num_gids = result->num_sids;
    642         for ( i=0; i<num_gids; i++ ) {
    643                 if ( !gid_to_unix_groups_sid( gids[i], &unix_group_sid ) ) {
    644                         DEBUG(1,("make_server_info_sam: Failed to create SID "
    645                                 "for gid %d!\n", gids[i]));
    646                         continue;
    647                 }
    648                 status = add_sid_to_array_unique(result, &unix_group_sid,
    649                                                  &result->sids,
    650                                                  &result->num_sids);
    651                 if (!NT_STATUS_IS_OK(status)) {
    652                         result->sam_account = NULL; /* Don't free on error exit. */
    653                         TALLOC_FREE(result);
    654                         return status;
    655                 }
    656         }
    657 
    658629        /* For now we throw away the gids and convert via sid_to_gid
    659630         * later. This needs fixing, but I'd like to get the code straight and
     
    666637
    667638        *server_info = result;
     639
     640
    668641
    669642        return NT_STATUS_OK;
     
    720693        NTSTATUS status;
    721694        size_t i;
     695
    722696
    723697        /*
     
    772746        }
    773747
     748
     749
     750
     751
     752
     753
     754
     755
     756
     757
     758
     759
     760
     761
     762
     763
     764
     765
     766
     767
     768
     769
     770
     771
     772
     773
     774
     775
     776
     777
     778
     779
    774780        debug_nt_user_token(DBGC_AUTH, 10, server_info->ptok);
     781
     782
     783
     784
     785
    775786
    776787        status = log_nt_token(server_info->ptok);
Note: See TracChangeset for help on using the changeset viewer.