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

Michael Adam obnox at samba.org
Wed Aug 6 08:52:39 GMT 2008


The branch, v3-2-test has been updated
       via  61274204b63cf077a826671a9e0d807bd17dfec3 (commit)
       via  892e41d60469e1e8adccd2b1ff860210db58dcb0 (commit)
      from  0bdab793c1da9b56790d37ac7d064b67ec51e3a4 (commit)

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


- Log -----------------------------------------------------------------
commit 61274204b63cf077a826671a9e0d807bd17dfec3
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Aug 6 16:35:43 2008 +1000

    fixed permissions on ctdb databases
    (cherry picked from commit 123fc3980a83d956bffaa689f3af81bbf81ce1c1)

commit 892e41d60469e1e8adccd2b1ff860210db58dcb0
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Aug 6 14:02:45 2008 +1000

    fixed a fd leak when trying to regain contact to a domain controller
    in winbind
    
    When a w2k3 DC is rebooted the 139/445 ports come up before the
    udp/389 cldap port. During this brief period, winbind manages to
    connect to 139/445 but not to udp 389. It then enters a tight loop
    where it leaks one fd each time. In a couple of seconds it runs out of
    file descriptors, and leaves winbind crippled after the DC does
    finally come up
    (cherry picked from commit 57187cafbcc053e75bb54750494df9feabe3a738)

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

Summary of changes:
 source/lib/dbwrap_ctdb.c      |    5 +++++
 source/winbindd/winbindd_cm.c |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/dbwrap_ctdb.c b/source/lib/dbwrap_ctdb.c
index a66ea7c..cb4c573 100644
--- a/source/lib/dbwrap_ctdb.c
+++ b/source/lib/dbwrap_ctdb.c
@@ -488,6 +488,11 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
 	/* only pass through specific flags */
 	tdb_flags &= TDB_SEQNUM;
 
+	/* honor permissions if user has specified O_CREAT */
+	if (open_flags & O_CREAT) {
+		chmod(db_path, mode);
+	}
+
 	db_ctdb->wtdb = tdb_wrap_open(db_ctdb, db_path, hash_size, tdb_flags, O_RDWR, 0);
 	if (db_ctdb->wtdb == NULL) {
 		DEBUG(0, ("Could not open tdb %s: %s\n", db_path, strerror(errno)));
diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c
index 17bc66e..c9769bf 100644
--- a/source/winbindd/winbindd_cm.c
+++ b/source/winbindd/winbindd_cm.c
@@ -1312,6 +1312,7 @@ static bool find_new_dc(TALLOC_CTX *mem_ctx,
 	TALLOC_FREE(addrs);
 	num_addrs = 0;
 
+	close(*fd);
 	*fd = -1;
 
 	goto again;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list