[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4787-gd605077

Jeremy Allison jra at samba.org
Tue Jan 6 04:41:14 GMT 2009


The branch, v3-3-test has been updated
       via  d605077effaf265ea4df66fcaf9007004db61acc (commit)
      from  bd1f723a14578792f4b8fda214096d66d57da208 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit d605077effaf265ea4df66fcaf9007004db61acc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jan 5 20:40:19 2009 -0800

    s3:winbindd: cancel all ccache entry events and not just one
    
    cancel_named_event() is stupid by design and also only cancels
    one single event.
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source/winbindd/winbindd_cred_cache.c |   14 ++++++++++++++
 source/winbindd/winbindd_dual.c       |   10 ++++------
 source/winbindd/winbindd_proto.h      |    1 +
 3 files changed, 19 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_cred_cache.c b/source/winbindd/winbindd_cred_cache.c
index e9e9e4d..fcb3d03 100644
--- a/source/winbindd/winbindd_cred_cache.c
+++ b/source/winbindd/winbindd_cred_cache.c
@@ -75,6 +75,20 @@ static int ccache_entry_count(void)
 	return i;
 }
 
+void ccache_remove_all_after_fork(void)
+{
+	struct WINBINDD_CCACHE_ENTRY *cur, *next;
+
+	for (cur = ccache_list; cur; cur = next) {
+		next = cur->next;
+		DLIST_REMOVE(ccache_list, cur);
+		TALLOC_FREE(cur->event);
+		TALLOC_FREE(cur);
+	}
+
+	return;
+}
+
 /****************************************************************
  Do the work of refreshing the ticket.
 ****************************************************************/
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index 2ce310c..7fe003b 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -1206,6 +1206,10 @@ static bool fork_domain_child(struct winbindd_child *child)
 
 	close_conns_after_fork();
 
+	/* Ensure we're not handling an event inherited from
+	   our parent. */
+	ccache_remove_all_after_fork();
+
 	if (!override_logfile) {
 		lp_set_logfile(child->logfilename);
 		reopen_logs();
@@ -1269,12 +1273,6 @@ static bool fork_domain_child(struct winbindd_child *child)
 		}
 	}
 
-	/* Ensure we're not handling an event inherited from
-	   our parent. */
-
-	cancel_named_event(winbind_event_context(),
-			   "krb5_ticket_refresh_handler");
-
 	/* We might be in the idmap child...*/
 	if (child->domain && !(child->domain->internal) &&
 	    lp_winbind_offline_logon()) {
diff --git a/source/winbindd/winbindd_proto.h b/source/winbindd/winbindd_proto.h
index 62fc885..5629733 100644
--- a/source/winbindd/winbindd_proto.h
+++ b/source/winbindd/winbindd_proto.h
@@ -224,6 +224,7 @@ bool ccache_entry_exists(const char *username);
 bool ccache_entry_identical(const char *username,
 			    uid_t uid,
 			    const char *ccname);
+void ccache_remove_all_after_fork(void);
 NTSTATUS add_ccache_to_list(const char *princ_name,
 			    const char *ccname,
 			    const char *service,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list