Ignore:
Timestamp:
Jun 29, 2011, 7:36:41 AM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update vendor to version 3.5.6

Location:
vendor/current/source3/winbindd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/winbindd/winbindd_cm.c

    r478 r587  
    20172017***********************************************************************/
    20182018
    2019 static bool cm_get_schannel_creds(struct winbindd_domain *domain,
     2019static NTSTATUS cm_get_schannel_creds(struct winbindd_domain *domain,
    20202020                                   struct netlogon_creds_CredentialState **ppdc)
    20212021{
    2022         NTSTATUS result;
     2022        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
    20232023        struct rpc_pipe_client *netlogon_pipe;
    20242024
    20252025        if (lp_client_schannel() == False) {
    2026                 return False;
     2026                return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;;
    20272027        }
    20282028
    20292029        result = cm_connect_netlogon(domain, &netlogon_pipe);
    20302030        if (!NT_STATUS_IS_OK(result)) {
    2031                 return False;
     2031                return result;
    20322032        }
    20332033
     
    20362036
    20372037        if (!domain->conn.netlogon_pipe->dc) {
    2038                 return false;
     2038                return NT_STATUS_INTERNAL_ERROR; /* This shouldn't happen. */
    20392039        }
    20402040
    20412041        *ppdc = domain->conn.netlogon_pipe->dc;
    2042         return True;
     2042        return NT_STATUS_OK;
    20432043}
    20442044
     
    21372137        /* Fall back to schannel if it's a W2K pre-SP1 box. */
    21382138
    2139         if (!cm_get_schannel_creds(domain, &p_creds)) {
     2139        result = cm_get_schannel_creds(domain, &p_creds);
     2140        if (!NT_STATUS_IS_OK(result)) {
    21402141                /* If this call fails - conn->cli can now be NULL ! */
    21412142                DEBUG(10, ("cm_connect_sam: Could not get schannel auth info "
    2142                            "for domain %s, trying anon\n", domain->name));
     2143                           "for domain %s (error %s), trying anon\n",
     2144                        domain->name,
     2145                        nt_errstr(result) ));
    21432146                goto anonymous;
    21442147        }
     
    22322235{
    22332236        struct winbindd_cm_conn *conn;
     2237        struct netlogon_creds_CredentialState *creds;
    22342238        NTSTATUS status;
    22352239
     
    22522256        TALLOC_FREE(conn->lsa_pipe_tcp);
    22532257
    2254         status = cli_rpc_pipe_open_schannel(conn->cli,
    2255                                             &ndr_table_lsarpc.syntax_id,
    2256                                             NCACN_IP_TCP,
    2257                                             DCERPC_AUTH_LEVEL_PRIVACY,
    2258                                             domain->name,
    2259                                             &conn->lsa_pipe_tcp);
     2258        status = cm_get_schannel_creds(domain, &creds);
    22602259        if (!NT_STATUS_IS_OK(status)) {
    2261                 DEBUG(10,("cli_rpc_pipe_open_schannel failed: %s\n",
     2260                goto done;
     2261        }
     2262
     2263        status = cli_rpc_pipe_open_schannel_with_key(conn->cli,
     2264                                                     &ndr_table_lsarpc.syntax_id,
     2265                                                     NCACN_IP_TCP,
     2266                                                     DCERPC_AUTH_LEVEL_PRIVACY,
     2267                                                     domain->name,
     2268                                                     &creds,
     2269                                                     &conn->lsa_pipe_tcp);
     2270        if (!NT_STATUS_IS_OK(status)) {
     2271                DEBUG(10,("cli_rpc_pipe_open_schannel_with_key failed: %s\n",
    22622272                        nt_errstr(status)));
    22632273                goto done;
     
    23392349        /* Fall back to schannel if it's a W2K pre-SP1 box. */
    23402350
    2341         if (!cm_get_schannel_creds(domain, &p_creds)) {
     2351        result = cm_get_schannel_creds(domain, &p_creds);
     2352        if (!NT_STATUS_IS_OK(result)) {
    23422353                /* If this call fails - conn->cli can now be NULL ! */
    23432354                DEBUG(10, ("cm_connect_lsa: Could not get schannel auth info "
    2344                            "for domain %s, trying anon\n", domain->name));
     2355                           "for domain %s (error %s), trying anon\n",
     2356                        domain->name,
     2357                        nt_errstr(result) ));
    23452358                goto anonymous;
    23462359        }
  • vendor/current/source3/winbindd/winbindd_dual_srv.c

    r414 r587  
    611611        id.id = r->in.id;
    612612
    613         switch (id.type) {
     613        switch (r->in.type) {
    614614        case WBINT_ID_TYPE_UID:
    615615                id.type = ID_TYPE_UID;
    616616                status = idmap_set_uid_hwm(&id);
    617617                break;
    618         case ID_TYPE_GID:
     618        case WBINT_ID_TYPE_GID:
    619619                id.type = ID_TYPE_GID;
    620620                status = idmap_set_gid_hwm(&id);
  • vendor/current/source3/winbindd/winbindd_pam.c

    r427 r587  
    802802{
    803803        struct winbindd_domain *domain;
    804         fstring name_domain, name_user, mapped_user;
     804        fstring name_domain, name_user;
    805805        char *mapped = NULL;
    806806        NTSTATUS result;
     
    829829                                               &mapped);
    830830
    831         /* If the name normalization didnt' actually do anything,
    832            just use the original name */
    833 
    834         if (NT_STATUS_IS_OK(name_map_status)
    835             ||NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED)) {
    836                 fstrcpy(mapped_user, mapped);
    837         } else {
    838                 fstrcpy(mapped_user, state->request->data.auth.user);
    839         }
    840 
    841         if (!canonicalize_username(mapped_user, name_domain, name_user)) {
     831        /* Update the auth name if we did any mapping */
     832
     833        if (NT_STATUS_IS_OK(name_map_status) ||
     834            NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED))
     835        {
     836                fstrcpy(state->request->data.auth.user, mapped);
     837        }
     838
     839        if (!canonicalize_username(state->request->data.auth.user, name_domain, name_user)) {
    842840                result = NT_STATUS_NO_SUCH_USER;
    843841                goto done;
Note: See TracChangeset for help on using the changeset viewer.