Changeset 165 for branches/samba-3.0/source/nsswitch/winbindd_cm.c
- Timestamp:
- Mar 11, 2009, 9:14:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/nsswitch/winbindd_cm.c
r140 r165 162 162 ****************************************************************/ 163 163 164 bool winbindd_reinit_after_fork(const char *logfile); 165 164 166 static BOOL fork_child_dc_connect(struct winbindd_domain *domain) 165 167 { … … 169 171 pid_t child_pid; 170 172 pid_t parent_pid = sys_getpid(); 173 pstring logfile; 171 174 172 175 /* Stop zombies */ … … 198 201 199 202 /* tdb needs special fork handling */ 200 if (tdb_reopen_all(1) == -1) { 201 DEBUG(0,("tdb_reopen_all failed.\n")); 203 if (!override_logfile) { 204 pstr_sprintf(logfile, "%s/log.winbindd-dc-connect", dyn_LOGFILEBASE); 205 } 206 if (!winbindd_reinit_after_fork(logfile)) { 207 DEBUG(0,("winbindd_reinit_after_fork failed.\n")); 208 message_send_pid(pid_to_procid(parent_pid), MSG_WINBIND_FAILED_TO_GO_ONLINE, 209 domain->name, 210 strlen(domain->name)+1, False); 202 211 _exit(0); 203 }204 205 close_conns_after_fork();206 207 if (!override_logfile) {208 pstring logfile;209 pstr_sprintf(logfile, "%s/log.winbindd-dc-connect", dyn_LOGFILEBASE);210 lp_set_logfile(logfile);211 reopen_logs();212 212 } 213 213 … … 352 352 ****************************************************************/ 353 353 354 void ccache_regain_all_now(void); 355 354 356 static void set_domain_online(struct winbindd_domain *domain) 355 357 { 356 struct timeval now;357 358 358 DEBUG(10,("set_domain_online: called for domain %s\n", 359 359 domain->name )); … … 372 372 373 373 /* If we are waiting to get a krb5 ticket, trigger immediately. */ 374 GetTimeOfDay(&now); 375 set_event_dispatch_time(winbind_event_context(), 376 "krb5_ticket_gain_handler", now); 374 ccache_regain_all_now(); 377 375 378 376 /* Ok, we're out of any startup mode now... */ … … 427 425 because network manager seems to lie. 428 426 Wait at least 5 seconds. Heuristics suck... */ 427 GetTimeOfDay(&tev); 428 429 /* Go into "startup" mode again. */ 430 domain->startup_time = tev.tv_sec; 431 domain->startup = True; 432 433 tev.tv_sec += 5; 429 434 430 435 if (!domain->check_online_event) { … … 437 442 domain->name )); 438 443 439 domain->check_online_event = event_add_timed(winbind_event_context(), 440 NULL, 441 timeval_current_ofs(5, 0), 442 "check_domain_online_handler", 443 check_domain_online_handler, 444 domain); 445 446 /* The above *has* to succeed for winbindd to work. */ 447 if (!domain->check_online_event) { 448 smb_panic("set_domain_online_request: failed to add online handler.\n"); 449 } 450 } 451 452 GetTimeOfDay(&tev); 453 454 /* Go into "startup" mode again. */ 455 domain->startup_time = tev.tv_sec; 456 domain->startup = True; 457 458 tev.tv_sec += 5; 459 460 set_event_dispatch_time(winbind_event_context(), "check_domain_online_handler", tev); 444 } 445 TALLOC_FREE(domain->check_online_event); 446 447 domain->check_online_event = event_add_timed(winbind_event_context(), 448 NULL, 449 tev, 450 "check_domain_online_handler", 451 check_domain_online_handler, 452 domain); 453 454 /* The above *has* to succeed for winbindd to work. */ 455 if (!domain->check_online_event) { 456 smb_panic("set_domain_online_request: failed to add online handler.\n"); 457 } 461 458 } 462 459
Note:
See TracChangeset
for help on using the changeset viewer.