[SCM] Samba Shared Repository - branch v4-8-stable updated

Karolin Seeger kseeger at samba.org
Wed May 16 10:16:54 UTC 2018


The branch, v4-8-stable has been updated
       via  e64d0d0 VERSION: Disable GIT_SNAPSHOT for the 4.8.2 release.
       via  5be589c WHATSNEW: Add release notes for Samba 4.8.2.
       via  32a5538 winbindd: Do re-connect if the RPC call fails in the passdb case
       via  7557c5d winbindd: Add a cache of the samr and lsa handles for the passdb domain
       via  54c537a vfs_ceph: add fake async pwrite/pread send/recv hooks
       via  01c335d s3: VFS: Fix memory leak in vfs_ceph.
       via  060a047 s4:lsa_lookup: remove TALLOC_FREE(state) after all dcesrv_lsa_Lookup{Names,Sids}_base_map() calls
       via  234216c s4-lsa: Fix use-after-free in LSA server
       via  1b34b86 s3:cleanupd: sends MSG_SMB_UNLOCK twice to interested peers
       via  bb5cee3 s3:smbspool: Fix cmdline argument handling
       via  4a9c164 smbspool: Improve URI handling code
       via  02b898e s3: libsmbclient: Fix hard-coded connection error return of ETIMEDOUT.
       via  dc7b7be s3:cleanupd: use MSG_SMB_BRL_VALIDATE to signal cleanupd unclean process shutdown
       via  0ccfe32 ceph: VFS: Add asynchronous fsync to ceph module, fake using synchronous call.
       via  bde6633 ctdb-client: Remove ununsed functions from old client code
       via  7cfaf700 rpc_server: Fix NetSessEnum with stale sessions
       via  2fcd26a selftest: Add testcase for querying sessions after smbd crash
       via  b7b0870 rpcclient: Print number of entries for NetSessEnum
       via  24a933e printing: return the same error code as windows does on upload failures
       via  81e7736 s3: tests: Regression test to ensure we can never return a DIRECTORY attribute on a stream.
       via  3d4a8f2 s3: smbd. Generic fix for incorrect reporting of stream dos attributes on a directory
       via  ace735e s3: vfs: vfs_streams_xattr: Don't blindly re-use the base file mode bits.
       via  13f23ec nsswitch: fix memory leak in winbind_open_pipe_sock() when the privileged pipe is not accessable.
       via  bf0a664 ldb: Release ldb 1.3.3
       via  21e10ff ldb: Add test to show a reindex failure must not leave the DB corrupt
       via  89ce0d9 lib ldb tests: Prepare to run api and index test on tdb and lmdb
       via  7f70fcd ldb_tdb: Ensure we can not commit an index that is corrupt due to partial re-index
       via  3f15f1c ldb_tdb: Add tests for truncated index keys
       via  b1ac094 ldb_tdb: Do not fail in GUID index mode if there is a duplicate attribute
       via  f1bf8d7 VERSION: Bump version up to 4.8.2...
      from  e5b036d VERSION: Disable GIT_SNAPSHOT for the 4.8.1 release.

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-8-stable


- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 VERSION                                            |    2 +-
 WHATSNEW.txt                                       |   95 +-
 ctdb/client/ctdb_client.c                          | 2535 +-------------------
 ctdb/include/ctdb_client.h                         |  218 --
 lib/ldb/ABI/{ldb-1.3.2.sigs => ldb-1.3.3.sigs}     |    0
 ...b-util.py3-1.3.2.sigs => pyldb-util-1.3.3.sigs} |    0
 ...il.py3-1.3.2.sigs => pyldb-util.py3-1.3.3.sigs} |    0
 lib/ldb/ldb_tdb/ldb_index.c                        |   64 +-
 lib/ldb/ldb_tdb/ldb_tdb.c                          |   30 +
 lib/ldb/ldb_tdb/ldb_tdb.h                          |    2 +
 lib/ldb/tests/python/api.py                        |  303 ++-
 lib/ldb/tests/python/index.py                      | 1032 ++++++++
 lib/ldb/wscript                                    |    4 +-
 nsswitch/wb_common.c                               |    4 +-
 selftest/target/Samba3.pm                          |    4 +
 source3/client/smbspool.c                          |   86 +-
 source3/libsmb/libsmb_server.c                     |    2 +-
 source3/modules/vfs_ceph.c                         |  181 +-
 source3/modules/vfs_streams_xattr.c                |    2 +
 source3/printing/nt_printing.c                     |    2 +-
 source3/rpcclient/cmd_srvsvc.c                     |    2 +
 source3/script/tests/test_rpcclient_netsessenum.sh |   55 +
 source3/script/tests/test_smbclient_s3.sh          |   76 +
 source3/script/tests/test_smbspool.sh              |   30 +
 source3/selftest/tests.py                          |    6 +
 source3/smbd/dosmode.c                             |   22 +
 source3/smbd/server.c                              |    2 +-
 source3/smbd/session.c                             |    4 +
 source3/smbd/smbd_cleanupd.c                       |    4 +-
 source3/winbindd/winbindd_samr.c                   |  395 ++-
 source4/rpc_server/lsa/lsa_lookup.c                |   11 +-
 31 files changed, 2305 insertions(+), 2868 deletions(-)
 copy lib/ldb/ABI/{ldb-1.3.2.sigs => ldb-1.3.3.sigs} (100%)
 copy lib/ldb/ABI/{pyldb-util.py3-1.3.2.sigs => pyldb-util-1.3.3.sigs} (100%)
 copy lib/ldb/ABI/{pyldb-util.py3-1.3.2.sigs => pyldb-util.py3-1.3.3.sigs} (100%)
 create mode 100755 lib/ldb/tests/python/index.py
 create mode 100755 source3/script/tests/test_rpcclient_netsessenum.sh


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 03071b3..9dfbef0 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=8
-SAMBA_VERSION_RELEASE=1
+SAMBA_VERSION_RELEASE=2
 
 ########################################################
 # If a official release has a serious bug              #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index c5bbe29..6aa0f91 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,95 @@
                    =============================
+                   Release Notes for Samba 4.8.2
+                            May 16, 2018
+                   =============================
+
+
+This is the latest stable release of the Samba 4.8 release series.
+
+Major bug fixes include:
+------------------------
+
+   o After update to 4.8.0 DC failed with "Failed to find our own
+     NTDS Settings objectGUID" (bug #13335).
+
+Changes since 4.8.1:
+--------------------
+
+o  Jeremy Allison <jra at samba.org>
+   * BUG 13380: s3: smbd: Generic fix for incorrect reporting of stream dos
+     attributes on a directory.
+   * BUG 13412: ceph: VFS: Add asynchronous fsync to ceph module, fake using
+     synchronous call.
+   * BUG 13419: s3: libsmbclient: Fix hard-coded connection error return of
+     ETIMEDOUT.
+
+o  Andrew Bartlett <abartlet at samba.org>
+   * BUG 13306: ldb: Release ldb 1.3.3:
+     * Fix failure to upgrade to the GUID index DB format.
+     * Add tests for GUID index behaviour.
+   * BUG 13420: s4-lsa: Fix use-after-free in LSA server.
+   * BUG 13430: winbindd: Do re-connect if the RPC call fails in the passdb
+     case.
+
+o  Ralph Boehme <slow at samba.org>
+   * BUG 13416: s3:cleanupd: Sends MSG_SMB_UNLOCK twice to interested peers.
+   * BUG 13414: s3:cleanupd: Use MSG_SMB_BRL_VALIDATE to signal cleanupd
+     unclean process shutdown.
+
+o  David Disseldorp <ddiss at samba.org>
+   * BUG 13425: vfs_ceph: add fake async pwrite/pread send/recv hooks.
+
+o  Amitay Isaacs <amitay at gmail.com>
+   * BUG 13411: ctdb-client: Remove ununsed functions from old client code.
+
+o  Björn Jacke <bjacke at samba.org>
+   * BUG 13395: printing: Return the same error code as windows does on upload
+     failures.
+
+o  Gary Lockyer <gary at catalyst.net.nz>
+   * BUG 13335: After update to 4.8.0 DC failed with "Failed to find our own
+     NTDS Settings objectGUID".
+
+o  Stefan Metzmacher <metze at samba.org>
+   * BUG 13400: nsswitch: Fix memory leak in winbind_open_pipe_sock() when the
+     privileged pipe is not accessable.
+   * BUG 13420: s4:lsa_lookup: remove TALLOC_FREE(state) after all
+     dcesrv_lsa_Lookup{Names,Sids}_base_map() calls.
+
+o  Vandana Rungta <vrungta at amazon.com>
+   * BUG 13424: s3: VFS: Fix memory leak in vfs_ceph.
+
+o  Christof Schmitt <cs at samba.org>
+   * BUG 13407: rpc_server: Fix NetSessEnum with stale sessions.
+
+o  Andreas Schneider <asn at samba.org>
+   * BUG 13417: s3:smbspool: Fix cmdline argument handling.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+                   =============================
                    Release Notes for Samba 4.8.1
                            April 26, 2018
                    =============================
@@ -103,8 +194,8 @@ database (https://bugzilla.samba.org/).
 ======================================================================
 
 
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
 
                    =============================
                    Release Notes for Samba 4.8.0
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index d399cb5..635a488 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -584,354 +584,6 @@ int ctdb_client_send_message(struct ctdb_context *ctdb, uint32_t pnn,
 
 
 /*
-  cancel a ctdb_fetch_lock operation, releasing the lock
- */
-static int fetch_lock_destructor(struct ctdb_record_handle *h)
-{
-	ctdb_ltdb_unlock(h->ctdb_db, h->key);
-	return 0;
-}
-
-/*
-  force the migration of a record to this node
- */
-static int ctdb_client_force_migration(struct ctdb_db_context *ctdb_db, TDB_DATA key)
-{
-	struct ctdb_call call;
-	ZERO_STRUCT(call);
-	call.call_id = CTDB_NULL_FUNC;
-	call.key = key;
-	call.flags = CTDB_IMMEDIATE_MIGRATION;
-	return ctdb_call(ctdb_db, &call);
-}
-
-/*
-  try to fetch a readonly copy of a record
- */
-static int
-ctdb_client_fetch_readonly(struct ctdb_db_context *ctdb_db, TDB_DATA key, TALLOC_CTX *mem_ctx, struct ctdb_ltdb_header **hdr, TDB_DATA *data)
-{
-	int ret;
-
-	struct ctdb_call call;
-	ZERO_STRUCT(call);
-
-	call.call_id = CTDB_FETCH_WITH_HEADER_FUNC;
-	call.call_data.dptr = NULL;
-	call.call_data.dsize = 0;
-	call.key = key;
-	call.flags = CTDB_WANT_READONLY;
-	ret = ctdb_call(ctdb_db, &call);
-
-	if (ret != 0) {
-		return -1;
-	}
-	if (call.reply_data.dsize < sizeof(struct ctdb_ltdb_header)) {
-		return -1;
-	}
-
-	*hdr = talloc_memdup(mem_ctx, &call.reply_data.dptr[0], sizeof(struct ctdb_ltdb_header));
-	if (*hdr == NULL) {
-		talloc_free(call.reply_data.dptr);
-		return -1;
-	}
-
-	data->dsize = call.reply_data.dsize - sizeof(struct ctdb_ltdb_header);
-	data->dptr  = talloc_memdup(mem_ctx, &call.reply_data.dptr[sizeof(struct ctdb_ltdb_header)], data->dsize);
-	if (data->dptr == NULL) {
-		talloc_free(call.reply_data.dptr);
-		talloc_free(hdr);
-		return -1;
-	}
-
-	return 0;
-}
-
-/*
-  get a lock on a record, and return the records data. Blocks until it gets the lock
- */
-struct ctdb_record_handle *ctdb_fetch_lock(struct ctdb_db_context *ctdb_db, TALLOC_CTX *mem_ctx, 
-					   TDB_DATA key, TDB_DATA *data)
-{
-	int ret;
-	struct ctdb_record_handle *h;
-
-	/*
-	  procedure is as follows:
-
-	  1) get the chain lock. 
-	  2) check if we are dmaster
-	  3) if we are the dmaster then return handle 
-	  4) if not dmaster then ask ctdb daemon to make us dmaster, and wait for
-	     reply from ctdbd
-	  5) when we get the reply, goto (1)
-	 */
-
-	h = talloc_zero(mem_ctx, struct ctdb_record_handle);
-	if (h == NULL) {
-		return NULL;
-	}
-
-	h->ctdb_db = ctdb_db;
-	h->key     = key;
-	h->key.dptr = talloc_memdup(h, key.dptr, key.dsize);
-	if (h->key.dptr == NULL) {
-		talloc_free(h);
-		return NULL;
-	}
-	h->data    = data;
-
-	DEBUG(DEBUG_DEBUG,("ctdb_fetch_lock: key=%*.*s\n", (int)key.dsize, (int)key.dsize, 
-		 (const char *)key.dptr));
-
-again:
-	/* step 1 - get the chain lock */
-	ret = ctdb_ltdb_lock(ctdb_db, key);
-	if (ret != 0) {
-		DEBUG(DEBUG_ERR, (__location__ " failed to lock ltdb record\n"));
-		talloc_free(h);
-		return NULL;
-	}
-
-	DEBUG(DEBUG_DEBUG,("ctdb_fetch_lock: got chain lock\n"));
-
-	talloc_set_destructor(h, fetch_lock_destructor);
-
-	ret = ctdb_ltdb_fetch(ctdb_db, key, &h->header, h, data);
-
-	/* when torturing, ensure we test the remote path */
-	if ((ctdb_db->ctdb->flags & CTDB_FLAG_TORTURE) &&
-	    random() % 5 == 0) {
-		h->header.dmaster = (uint32_t)-1;
-	}
-
-
-	DEBUG(DEBUG_DEBUG,("ctdb_fetch_lock: done local fetch\n"));
-
-	if (ret != 0 || h->header.dmaster != ctdb_db->ctdb->pnn) {
-		ctdb_ltdb_unlock(ctdb_db, key);
-		ret = ctdb_client_force_migration(ctdb_db, key);
-		if (ret != 0) {
-			DEBUG(DEBUG_DEBUG,("ctdb_fetch_lock: force_migration failed\n"));
-			talloc_free(h);
-			return NULL;
-		}
-		goto again;
-	}
-
-	/* if this is a request for read/write and we have delegations
-	   we have to revoke all delegations first
-	*/
-	if ((h->header.dmaster == ctdb_db->ctdb->pnn) &&
-	    (h->header.flags & CTDB_REC_RO_HAVE_DELEGATIONS)) {
-		ctdb_ltdb_unlock(ctdb_db, key);
-		ret = ctdb_client_force_migration(ctdb_db, key);
-		if (ret != 0) {
-			DEBUG(DEBUG_DEBUG,("ctdb_fetch_readonly_lock: force_migration failed\n"));
-			talloc_free(h);
-			return NULL;
-		}
-		goto again;
-	}
-
-	DEBUG(DEBUG_DEBUG,("ctdb_fetch_lock: we are dmaster - done\n"));
-	return h;
-}
-
-/*
-  get a readonly lock on a record, and return the records data. Blocks until it gets the lock
- */
-struct ctdb_record_handle *
-ctdb_fetch_readonly_lock(
-	struct ctdb_db_context *ctdb_db, TALLOC_CTX *mem_ctx, 
-	TDB_DATA key, TDB_DATA *data,
-	int read_only)
-{
-	int ret;
-	struct ctdb_record_handle *h;
-	struct ctdb_ltdb_header *roheader = NULL;
-
-	h = talloc_zero(mem_ctx, struct ctdb_record_handle);
-	if (h == NULL) {
-		return NULL;
-	}
-
-	h->ctdb_db = ctdb_db;
-	h->key     = key;
-	h->key.dptr = talloc_memdup(h, key.dptr, key.dsize);
-	if (h->key.dptr == NULL) {
-		talloc_free(h);
-		return NULL;
-	}
-	h->data    = data;
-
-	data->dptr = NULL;
-	data->dsize = 0;
-
-
-again:
-	talloc_free(roheader);
-	roheader = NULL;
-
-	talloc_free(data->dptr);
-	data->dptr = NULL;
-	data->dsize = 0;
-
-	/* Lock the record/chain */
-	ret = ctdb_ltdb_lock(ctdb_db, key);
-	if (ret != 0) {
-		DEBUG(DEBUG_ERR, (__location__ " failed to lock ltdb record\n"));
-		talloc_free(h);
-		return NULL;
-	}
-
-	talloc_set_destructor(h, fetch_lock_destructor);
-
-	/* Check if record exists yet in the TDB */
-	ret = ctdb_ltdb_fetch_with_header(ctdb_db, key, &h->header, h, data);
-	if (ret != 0) {
-		ctdb_ltdb_unlock(ctdb_db, key);
-		ret = ctdb_client_force_migration(ctdb_db, key);
-		if (ret != 0) {
-			DEBUG(DEBUG_DEBUG,("ctdb_fetch_readonly_lock: force_migration failed\n"));
-			talloc_free(h);
-			return NULL;
-		}
-		goto again;
-	}
-
-	/* if this is a request for read/write and we have delegations
-	   we have to revoke all delegations first
-	*/
-	if ((read_only == 0) 
-	&&  (h->header.dmaster == ctdb_db->ctdb->pnn)
-	&&  (h->header.flags & CTDB_REC_RO_HAVE_DELEGATIONS)) {
-		ctdb_ltdb_unlock(ctdb_db, key);
-		ret = ctdb_client_force_migration(ctdb_db, key);
-		if (ret != 0) {
-			DEBUG(DEBUG_DEBUG,("ctdb_fetch_readonly_lock: force_migration failed\n"));
-			talloc_free(h);
-			return NULL;
-		}
-		goto again;
-	}
-
-	/* if we are dmaster, just return the handle */
-	if (h->header.dmaster == ctdb_db->ctdb->pnn) {
-		return h;
-	}
-
-	if (read_only != 0) {
-		TDB_DATA rodata = {NULL, 0};
-
-		if ((h->header.flags & CTDB_REC_RO_HAVE_READONLY)
-		||  (h->header.flags & CTDB_REC_RO_HAVE_DELEGATIONS)) {
-			return h;
-		}
-
-		ctdb_ltdb_unlock(ctdb_db, key);
-		ret = ctdb_client_fetch_readonly(ctdb_db, key, h, &roheader, &rodata);
-		if (ret != 0) {
-			DEBUG(DEBUG_ERR,("ctdb_fetch_readonly_lock:  failed. force migration and try again\n"));
-			ret = ctdb_client_force_migration(ctdb_db, key);
-			if (ret != 0) {
-				DEBUG(DEBUG_DEBUG,("ctdb_fetch_readonly_lock: force_migration failed\n"));
-				talloc_free(h);
-				return NULL;
-			}
-
-			goto again;
-		}
-
-		if (!(roheader->flags&CTDB_REC_RO_HAVE_READONLY)) {
-			ret = ctdb_client_force_migration(ctdb_db, key);
-			if (ret != 0) {
-				DEBUG(DEBUG_DEBUG,("ctdb_fetch_readonly_lock: force_migration failed\n"));
-				talloc_free(h);
-				return NULL;
-			}
-
-			goto again;
-		}
-
-		ret = ctdb_ltdb_lock(ctdb_db, key);
-		if (ret != 0) {
-			DEBUG(DEBUG_ERR, (__location__ " failed to lock ltdb record\n"));
-			talloc_free(h);
-			return NULL;
-		}
-
-		ret = ctdb_ltdb_fetch_with_header(ctdb_db, key, &h->header, h, data);
-		if (ret != 0) {
-			ctdb_ltdb_unlock(ctdb_db, key);
-
-			ret = ctdb_client_force_migration(ctdb_db, key);
-			if (ret != 0) {
-				DEBUG(DEBUG_DEBUG,("ctdb_fetch_readonly_lock: force_migration failed\n"));
-				talloc_free(h);
-				return NULL;
-			}
-
-			goto again;
-		}
-
-		return h;
-	}
-
-	/* we are not dmaster and this was not a request for a readonly lock
-	 * so unlock the record, migrate it and try again
-	 */
-	ctdb_ltdb_unlock(ctdb_db, key);
-	ret = ctdb_client_force_migration(ctdb_db, key);
-	if (ret != 0) {
-		DEBUG(DEBUG_DEBUG,("ctdb_fetch_lock: force_migration failed\n"));
-		talloc_free(h);
-		return NULL;
-	}
-	goto again;
-}
-
-/*
-  store some data to the record that was locked with ctdb_fetch_lock()
-*/
-int ctdb_record_store(struct ctdb_record_handle *h, TDB_DATA data)
-{
-	if (! ctdb_db_volatile(h->ctdb_db)) {
-		DEBUG(DEBUG_ERR,
-		      ("ctdb_record_store prohibited for non-volatile dbs\n"));
-		return -1;
-	}
-
-	return ctdb_ltdb_store(h->ctdb_db, h->key, &h->header, data);
-}
-
-/*
-  non-locking fetch of a record
- */
-int ctdb_fetch(struct ctdb_db_context *ctdb_db, TALLOC_CTX *mem_ctx, 
-	       TDB_DATA key, TDB_DATA *data)
-{
-	struct ctdb_call call;
-	int ret;
-
-	call.call_id = CTDB_FETCH_FUNC;
-	call.call_data.dptr = NULL;
-	call.call_data.dsize = 0;
-	call.key = key;
-
-	ret = ctdb_call(ctdb_db, &call);
-
-	if (ret == 0) {
-		*data = call.reply_data;
-		talloc_steal(mem_ctx, data->dptr);
-	}
-
-	return ret;
-}
-
-
-
-/*
    called when a control completes or timesout to invoke the callback
    function the user provided
 */
@@ -1210,134 +862,6 @@ int ctdb_control(struct ctdb_context *ctdb, uint32_t destnode, uint64_t srvid,
 			errormsg);
 }
 
-
-
-
-/*
-  a process exists call. Returns 0 if process exists, -1 otherwise
- */
-int ctdb_ctrl_process_exists(struct ctdb_context *ctdb, uint32_t destnode, pid_t pid)
-{
-	int ret;
-	TDB_DATA data;
-	int32_t status;
-
-	data.dptr = (uint8_t*)&pid;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list