Ignore:
Timestamp:
Sep 24, 2009, 9:15:13 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 to 3.2.14 (final)

Location:
branches/samba-3.2.x/source/winbindd
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/winbindd/idmap_ldap.c

    r233 r335  
    894894        struct idmap_ldap_context *ctx;
    895895        LDAPMessage *result = NULL;
     896        LDAPMessage *entry = NULL;
    896897        const char *uidNumber;
    897898        const char *gidNumber;
     
    989990
    990991        for (i = 0; i < count; i++) {
    991                 LDAPMessage *entry = NULL;
    992992                char *sidstr = NULL;
    993993                char *tmp = NULL;
  • branches/samba-3.2.x/source/winbindd/winbindd_ads.c

    r228 r335  
    11201120        /* handle sids not resolved from cache by lsa_lookup_sids */
    11211121        if (num_nocache > 0) {
     1122                unsigned int orig_timeout;
    11221123
    11231124                status = cm_connect_lsa(domain, tmp_ctx, &cli, &lsa_policy);
     
    11261127                        goto done;
    11271128                }
     1129
     1130                /*
     1131                 * This call can take a long time
     1132                 * allow the server to time out.
     1133                 * 35 seconds should do it.
     1134                 */
     1135                orig_timeout = cli_set_timeout(cli->cli, 35000);
    11281136
    11291137                status = rpccli_lsa_lookup_sids(cli, tmp_ctx,
     
    11351143                                                &name_types_nocache);
    11361144
     1145                /* And restore our original timeout. */
     1146                cli_set_timeout(cli->cli, orig_timeout);
     1147
    11371148                if (!(NT_STATUS_IS_OK(status) ||
    11381149                      NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED) ||
     
    11481159                                goto done;
    11491160                        }
     1161
     1162                        /*
     1163                         * This call can take a long time
     1164                         * allow the server to time out.
     1165                         * 35 seconds should do it.
     1166                         */
     1167                        orig_timeout = cli_set_timeout(cli->cli, 35000);
    11501168
    11511169                        status = rpccli_lsa_lookup_sids(cli, tmp_ctx,
     
    11561174                                                        &names_nocache,
    11571175                                                        &name_types_nocache);
     1176
     1177                        /* And restore our original timeout. */
     1178                        cli_set_timeout(cli->cli, orig_timeout);
    11581179                }
    11591180
  • branches/samba-3.2.x/source/winbindd/winbindd_rpc.c

    r233 r335  
    280280        struct rpc_pipe_client *cli;
    281281        POLICY_HND lsa_policy;
     282        unsigned int orig_timeout;
    282283
    283284        if (name == NULL || *name=='\0') {
     
    303304                return result;
    304305
     306        /*
     307         * This call can take a long time
     308         * allow the server to time out.
     309         * 35 seconds should do it.
     310         */
     311        orig_timeout = cli_set_timeout(cli->cli, 35000);
     312
    305313        result = rpccli_lsa_lookup_names(cli, mem_ctx, &lsa_policy, 1,
    306314                                         (const char**) &full_name, NULL, 1, &sids, &types);
    307        
     315
     316        /* And restore our original timeout. */
     317        cli_set_timeout(cli->cli, orig_timeout);
     318
    308319        if (!NT_STATUS_IS_OK(result))
    309320                return result;
     
    333344        struct rpc_pipe_client *cli;
    334345        POLICY_HND lsa_policy;
     346        unsigned int orig_timeout;
    335347
    336348        DEBUG(3,("sid_to_name [rpc] %s for domain %s\n", sid_string_dbg(sid),
     
    345357       
    346358
     359        /*
     360         * This call can take a long time
     361         * allow the server to time out.
     362         * 35 seconds should do it.
     363         */
     364        orig_timeout = cli_set_timeout(cli->cli, 35000);
     365
    347366        result = rpccli_lsa_lookup_sids(cli, mem_ctx, &lsa_policy,
    348367                                        1, sid, &domains, &names, &types);
     368
     369        /* And restore our original timeout. */
     370        cli_set_timeout(cli->cli, orig_timeout);
     371
    349372        if (!NT_STATUS_IS_OK(result)) {         
    350373                DEBUG(2,("msrpc_sid_to_name: rpccli_lsa_lookup_sids()  failed (%s)\n",
     
    379402        size_t i;
    380403        char **ret_names;
     404        unsigned int orig_timeout;
    381405
    382406        DEBUG(3, ("rids_to_names [rpc] for domain %s\n", domain->name ));
     
    402426        }
    403427
     428        /*
     429         * This call can take a long time
     430         * allow the server to time out.
     431         * 35 seconds should do it.
     432         */
     433        orig_timeout = cli_set_timeout(cli->cli, 35000);
     434
    404435        result = rpccli_lsa_lookup_sids(cli, mem_ctx, &lsa_policy,
    405436                                        num_rids, sids, &domains,
    406437                                        names, types);
     438
     439        /* And restore our original timeout. */
     440        cli_set_timeout(cli->cli, orig_timeout);
     441
    407442        if (!NT_STATUS_IS_OK(result) &&
    408443            !NT_STATUS_EQUAL(result, STATUS_SOME_UNMAPPED)) {
  • branches/samba-3.2.x/source/winbindd/winbindd_sid.c

    r133 r335  
    9494                name_domain = state->request.data.name.name;
    9595                name_user = p+1;
     96        } else if ((p = strchr(state->request.data.name.name, '@')) != NULL) {
     97                name_domain = p + 1;
     98                *p = 0;
     99                name_user = state->request.data.name.name;
    96100        } else {
    97101                name_domain = state->request.data.name.dom_name;
  • branches/samba-3.2.x/source/winbindd/winbindd_util.c

    r232 r335  
    11031103                        fstrcpy(domain, lp_workgroup());
    11041104                } else if ((p = strchr(domuser, '@')) != NULL) {
    1105                         fstrcpy(domain, "");                   
     1105                        fstrcpy(domain, p + 1);
     1106                        user[PTR_DIFF(p, domuser)] = 0;
    11061107                } else {
    11071108                        return False;
Note: See TracChangeset for help on using the changeset viewer.