[SCM] Samba Shared Repository - branch v4-6-test updated

Karolin Seeger kseeger at samba.org
Fri Feb 3 12:05:03 UTC 2017


The branch, v4-6-test has been updated
       via  b162acb ctdb-tests: Use replace headers instead of system headers
       via  eb90262 ctdb-tests: Do not build mutex test if robust mutexes are not supported
       via  cb1a9e7 ctdb-common: ioctl(.. FIONREAD ..) returns an int value
       via  6d83ec9 s3: VFS: vfs_streams_xattr.c: Make streams_xattr_open() store the same path as streams_xattr_recheck().
       via  2a0c2b6 smbd: Fix "map acl inherit" = yes
       via  64a14a3 s3: vfs: dirsort doesn't handle opendir of "." correctly.
      from  de82686 docs: Improve description of "unix_primary_group" parameter in idmap_ad manpage

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


- Log -----------------------------------------------------------------
commit b162acb229635ca207cf42336f72e09f75d2c148
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Jan 31 16:49:14 2017 +1100

    ctdb-tests: Use replace headers instead of system headers
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12469
    
    This ensures that PTHREAD_MUTEX_ROBUST, pthread_mutexattr_setrobust()
    and pthread_mutex_consistent() are always defined.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue Jan 31 11:57:01 CET 2017 on sn-devel-144
    
    (cherry picked from commit 39ac4ae65eb3b8d4d3574987eab47eb7a290f2e4)
    
    Autobuild-User(v4-6-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-6-test): Fri Feb  3 13:04:01 CET 2017 on sn-devel-144

commit eb90262cc2f9a0f2d37d10228c17370ba76f64e4
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Jan 31 14:50:53 2017 +1100

    ctdb-tests: Do not build mutex test if robust mutexes are not supported
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12469
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 08b4a5f9f1575c882ab7174eb3249b574df6976f)

commit cb1a9e77709db2b0b0b4fa11612b15077404531e
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Wed Feb 1 15:52:48 2017 +1100

    ctdb-common: ioctl(.. FIONREAD ..) returns an int value
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12549
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Wed Feb  1 14:29:14 CET 2017 on sn-devel-144
    
    (cherry picked from commit 2bea45e450e5ebd6544c2a8be4493242158b712e)

commit 6d83ec9eac4dc5255d248c47ef82cb995307c85b
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Feb 1 11:36:25 2017 -0800

    s3: VFS: vfs_streams_xattr.c: Make streams_xattr_open() store the same path as streams_xattr_recheck().
    
    If the open is changing directories, fsp->fsp_name->base_name
    will be the full path from the share root, whilst
    smb_fname will be relative to the $cwd.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12546
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Feb  2 01:55:42 CET 2017 on sn-devel-144
    
    (cherry picked from commit a24ba3e4083200ec9885363efc5769f43183fb6b)

commit 2a0c2b6d0955ad897a09fad87fa666b3968619b8
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Feb 1 14:41:43 2017 +0000

    smbd: Fix "map acl inherit" = yes
    
    Brown-Paper-Bag bug in f85c2a6852a. The assignment contains a self-reference
    in get_pai_flags which I missed.
    
    Fix an uninitialized read.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12551
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Wed Feb  1 22:06:50 CET 2017 on sn-devel-144
    
    (cherry picked from commit 129bc58eee4b1868b1aaec6194808752520517b4)

commit 64a14a37c1b0ce53ac7701db88d83bba822d39e3
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jan 5 12:38:07 2017 -0800

    s3: vfs: dirsort doesn't handle opendir of "." correctly.
    
    Needs to store $cwd path for correct sorting.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12499
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    (cherry picked from commit e2f34116ab6328e2b872999dc7c4bcda69c03ab2)

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

Summary of changes:
 ctdb/common/run_proc.c              |  3 ++-
 ctdb/tests/src/test_mutex_raw.c     | 24 +++++++-----------------
 ctdb/wscript                        |  9 +++++----
 source3/modules/vfs_dirsort.c       |  4 ++++
 source3/modules/vfs_streams_xattr.c |  9 ++++++++-
 source3/smbd/posix_acls.c           |  4 ++--
 6 files changed, 28 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/run_proc.c b/ctdb/common/run_proc.c
index 96e422c..f9fee80 100644
--- a/ctdb/common/run_proc.c
+++ b/ctdb/common/run_proc.c
@@ -132,8 +132,9 @@ static void proc_read_handler(struct tevent_context *ev,
 {
 	struct proc_context *proc = talloc_get_type_abort(
 		private_data, struct proc_context);
-	size_t offset, len = 0;
+	size_t offset;
 	ssize_t nread;
+	int len = 0;
 	int ret;
 
 	ret = ioctl(proc->fd, FIONREAD, &len);
diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c
index 8e3cae3..ab7aff9 100644
--- a/ctdb/tests/src/test_mutex_raw.c
+++ b/ctdb/tests/src/test_mutex_raw.c
@@ -38,21 +38,11 @@
  *  If no pid is printed, then no process is holding the mutex.
  */
 
-#include <stdio.h>
-#include <unistd.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <sched.h>
-#include <sys/mman.h>
-#include <pthread.h>
-#include <errno.h>
-#include <stdbool.h>
-
-int pthread_mutex_consistent_np(pthread_mutex_t *);
+#include "replace.h"
+#include "system/filesys.h"
+#include "system/wait.h"
+#include "system/shmem.h"
+#include "system/threads.h"
 
 static void set_realtime(void)
 {
@@ -99,7 +89,7 @@ static void run_child(const char *filename)
 again:
 	ret = pthread_mutex_lock(mutex);
 	if (ret == EOWNERDEAD) {
-		ret = pthread_mutex_consistent_np(mutex);
+		ret = pthread_mutex_consistent(mutex);
 	} else if (ret == EAGAIN) {
 		goto again;
 	}
@@ -172,7 +162,7 @@ int main(int argc, const char **argv)
 	if (strcmp(argv[2], "debug") == 0) {
 		ret = pthread_mutex_trylock(mutex);
 		if (ret == EOWNERDEAD) {
-			ret = pthread_mutex_consistent_np(mutex);
+			ret = pthread_mutex_consistent(mutex);
 			if (ret == 0) {
 				pthread_mutex_unlock(mutex);
 			}
diff --git a/ctdb/wscript b/ctdb/wscript
index b9a3072..446bd8d 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -830,10 +830,11 @@ def build(bld):
                               ib_deps,
                          install_path='${CTDB_TEST_LIBEXECDIR}')
 
-    bld.SAMBA_BINARY('test_mutex_raw',
-                     source='tests/src/test_mutex_raw.c',
-                     deps='pthread',
-                     install_path='${CTDB_TEST_LIBEXECDIR}')
+    if bld.env.HAVE_ROBUST_MUTEXES:
+        bld.SAMBA_BINARY('test_mutex_raw',
+                         source='tests/src/test_mutex_raw.c',
+                         deps='pthread',
+                         install_path='${CTDB_TEST_LIBEXECDIR}')
 
     test_subdirs = [
         'complex',
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index f856835..4a3e152 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -138,6 +138,10 @@ static DIR *dirsort_opendir(vfs_handle_struct *handle,
 		return NULL;
 	}
 
+	if (ISDOT(data->smb_fname->base_name)) {
+		data->smb_fname->base_name = vfs_GetWd(data, handle->conn);
+	}
+
 	/* Open the underlying directory and count the number of entries */
 	data->source_directory = SMB_VFS_NEXT_OPENDIR(handle, smb_fname, mask,
 						      attr);
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index d9eb2e1..d3c988c 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -527,8 +527,15 @@ static int streams_xattr_open(vfs_handle_struct *handle,
 
         sio->xattr_name = talloc_strdup(VFS_MEMCTX_FSP_EXTENSION(handle, fsp),
 					xattr_name);
+	/*
+	 * so->base needs to be a copy of fsp->fsp_name->base_name,
+	 * making it identical to streams_xattr_recheck(). If the
+	 * open is changing directories, fsp->fsp_name->base_name
+	 * will be the full path from the share root, whilst
+	 * smb_fname will be relative to the $cwd.
+	 */
         sio->base = talloc_strdup(VFS_MEMCTX_FSP_EXTENSION(handle, fsp),
-				  smb_fname->base_name);
+				  fsp->fsp_name->base_name);
 	sio->fsp_name_ptr = fsp->fsp_name;
 	sio->handle = handle;
 	sio->fsp = fsp;
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index f7829fe..6999c83 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2698,9 +2698,9 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
 			.attr = ALLOW_ACE,
 			.trustee = sid,
 			.unix_ug = unix_ug,
-			.owner_type = owner_type,
-			.ace_flags = get_pai_flags(pal, ace, is_default_acl)
+			.owner_type = owner_type
 		};
+		ace->ace_flags = get_pai_flags(pal, ace, is_default_acl);
 
 		DLIST_ADD(l_head, ace);
 	}


-- 
Samba Shared Repository



More information about the samba-cvs mailing list