Ignore:
Timestamp:
Nov 12, 2012, 5:38:52 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.16

Location:
branches/samba-3.5.x/source3/winbindd
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/winbindd/winbindd.c

    r732 r736  
    6868
    6969        if (lp_loaded()) {
    70                 const char *fname = lp_configfile();
     70                char *fname = lp_configfile();
    7171
    7272                if (file_exist(fname) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
    7373                        set_dyn_CONFIGFILE(fname);
    7474                }
     75                TALLOC_FREE(fname);
    7576        }
    7677
     
    10731074        }
    10741075
     1076        /* We call dump_core_setup one more time because the command line can
     1077         * set the log file or the log-basename and this will influence where
     1078         * cores are stored. Without this call get_dyn_LOGFILEBASE will be
     1079         * the default value derived from build's prefix. For EOM this value
     1080         * is often not related to the path where winbindd is actually run
     1081         * in production.
     1082         */
     1083        dump_core_setup("winbindd");
     1084
    10751085        if (is_daemon && interactive) {
    10761086                d_fprintf(stderr,"\nERROR: "
     
    11071117                exit(1);
    11081118        }
     1119        /* After parsing the configuration file we setup the core path one more time
     1120         * as the log file might have been set in the configuration and cores's
     1121         * path is by default basename(lp_logfile()).
     1122         */
     1123        dump_core_setup("winbindd");
    11091124
    11101125        /* Initialise messaging system */
  • branches/samba-3.5.x/source3/winbindd/winbindd_ads.c

    r414 r736  
    181181
    182182        rc = ads_search_retry(ads, &res, "(objectCategory=user)", attrs);
    183         if (!ADS_ERR_OK(rc) || !res) {
     183        if (!ADS_ERR_OK(rc)) {
    184184                DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc)));
     185                status = ads_ntstatus(rc);
     186        } else if (!res) {
     187                DEBUG(1,("query_user_list ads_search returned NULL res\n"));
     188
    185189                goto done;
    186190        }
     
    326330
    327331        rc = ads_search_retry(ads, &res, filter, attrs);
    328         if (!ADS_ERR_OK(rc) || !res) {
     332        if (!ADS_ERR_OK(rc)) {
     333                status = ads_ntstatus(rc);
    329334                DEBUG(1,("enum_dom_groups ads_search: %s\n", ads_errstr(rc)));
     335                goto done;
     336        } else if (!res) {
     337                DEBUG(1,("enum_dom_groups ads_search returned NULL res\n"));
    330338                goto done;
    331339        }
     
    533541        }
    534542        rc = ads_search_retry(ads, &msg, ldap_exp, attrs);
    535         free(ldap_exp);
     543        SAFE_FREE(ldap_exp);
    536544        TALLOC_FREE(sidstr);
    537         if (!ADS_ERR_OK(rc) || !msg) {
     545        if (!ADS_ERR_OK(rc)) {
    538546                DEBUG(1,("query_user(sid=%s) ads_search: %s\n",
    539547                         sid_string_dbg(sid), ads_errstr(rc)));
    540                 goto done;
     548                return ads_ntstatus(rc);
     549        } else if (!msg) {
     550                DEBUG(1,("query_user(sid=%s) ads_search returned NULL res\n",
     551                         sid_string_dbg(sid)));
     552                return NT_STATUS_INTERNAL_ERROR;
    541553        }
    542554
     
    633645        rc = ads_search_retry(ads, &res, ldap_exp, group_attrs);
    634646
    635         if (!ADS_ERR_OK(rc) || !res) {
     647        if (!ADS_ERR_OK(rc)) {
    636648                DEBUG(1,("lookup_usergroups ads_search member=%s: %s\n", user_dn, ads_errstr(rc)));
    637649                return ads_ntstatus(rc);
    638         }
     650        } else if (!res) {
     651                DEBUG(1,("lookup_usergroups ads_search returned NULL res\n"));
     652                return NT_STATUS_INTERNAL_ERROR;
     653        }
     654
    639655
    640656        count = ads_count_replies(ads, res);
  • branches/samba-3.5.x/source3/winbindd/winbindd_dual.c

    r732 r736  
    3737extern bool override_logfile;
    3838extern struct winbindd_methods cache_methods;
     39
     40static struct winbindd_child *children = NULL;
    3941
    4042/* Read some data from a client connection */
     
    171173                close(state->child->sock);
    172174                state->child->sock = -1;
     175                DLIST_REMOVE(children, state->child);
    173176                tevent_req_error(req, err);
    174177                return;
     
    517520        SMB_ASSERT(child->rpccli != NULL);
    518521}
    519 
    520 struct winbindd_child *children = NULL;
    521522
    522523void winbind_child_died(pid_t pid)
  • branches/samba-3.5.x/source3/winbindd/winbindd_pam.c

    r733 r736  
    13661366                }
    13671367
    1368                 logon_fn = contact_domain->can_do_samlogon_ex
     1368                logon_fn = (contact_domain->can_do_samlogon_ex && domain->can_do_validation6)
    13691369                        ? rpccli_netlogon_sam_network_logon_ex
    13701370                        : rpccli_netlogon_sam_network_logon;
     
    15591559
    15601560        if ( mapped_user != state->request->data.auth.user ) {
    1561                 fstr_sprintf( domain_user, "%s\\%s", name_domain, name_user );
     1561                fstr_sprintf( domain_user, "%s%c%s", name_domain,
     1562                        *lp_winbind_separator(),
     1563                        name_user );
    15621564                safe_strcpy( state->request->data.auth.user, domain_user,
    15631565                             sizeof(state->request->data.auth.user)-1 );
     
    19901992                }
    19911993
    1992                 logon_fn = contact_domain->can_do_samlogon_ex
     1994                logon_fn = (contact_domain->can_do_samlogon_ex && domain->can_do_validation6)
    19931995                        ? rpccli_netlogon_sam_network_logon_ex
    19941996                        : rpccli_netlogon_sam_network_logon;
Note: See TracChangeset for help on using the changeset viewer.