[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Fri Jun 28 16:43:01 UTC 2019


The branch, master has been updated
       via  0b556e7827b vfs_preopen: TALLOC_FREE(fde) before closing the underlying fd
       via  c26e42cb53f vfs_preopen: Fix an uninitialized variable read
       via  6bc70dcde26 vfs_preopen: Fix for O_NOFOLLOW
       via  c88240e0e70 smbd: Fix broken brlock for clustering
      from  fee8cf326bf vfs:glusterfs_fuse: treat ENOATTR as ENOENT

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0b556e7827b32192cbbce1464e30764648ea1712
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jun 26 17:43:44 2019 +0200

    vfs_preopen: TALLOC_FREE(fde) before closing the underlying fd
    
    Without that we might get wrong stuff out of epoll
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Fri Jun 28 16:42:42 UTC 2019 on sn-devel-184

commit c26e42cb53f9cfd9a54cacde64817ccf4ddd0412
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jun 26 17:43:20 2019 +0200

    vfs_preopen: Fix an uninitialized variable read
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 6bc70dcde2685e13f2f4cd6d9876e022629004de
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jun 26 17:42:54 2019 +0200

    vfs_preopen: Fix for O_NOFOLLOW
    
    Since 4301505d977449d core smbd code passes O_NOFOLLOW together with
    [O_RDONLY|O_RDWR] as flags. This breaks activating vfs_preopen, we
    need to look at *just* the access mode.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit c88240e0e70279207611a0aba4554cb907275e42
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jun 27 13:21:33 2019 +0200

    smbd: Fix broken brlock for clustering
    
    This should have been in f11c5887f4fb4b766, sorry. We now always need
    TDB_SEQNUM on brlock.tdb.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 source3/locking/brlock.c      | 16 ++++++----------
 source3/modules/vfs_preopen.c |  4 +++-
 2 files changed, 9 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 00462a31c78..b4628831f5b 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -288,16 +288,12 @@ void brl_init(bool read_only)
 		return;
 	}
 
-	tdb_flags = TDB_DEFAULT|TDB_VOLATILE|TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH;
-
-	if (!lp_clustering()) {
-		/*
-		 * We can't use the SEQNUM trick to cache brlock
-		 * entries in the clustering case because ctdb seqnum
-		 * propagation has a delay.
-		 */
-		tdb_flags |= TDB_SEQNUM;
-	}
+	tdb_flags =
+		TDB_DEFAULT|
+		TDB_VOLATILE|
+		TDB_CLEAR_IF_FIRST|
+		TDB_INCOMPATIBLE_HASH|
+		TDB_SEQNUM;
 
 	db_path = lock_path(talloc_tos(), "brlock.tdb");
 	if (db_path == NULL) {
diff --git a/source3/modules/vfs_preopen.c b/source3/modules/vfs_preopen.c
index 24d33fafacd..a2afbf179f8 100644
--- a/source3/modules/vfs_preopen.c
+++ b/source3/modules/vfs_preopen.c
@@ -57,6 +57,7 @@ struct preopen_state {
 static void preopen_helper_destroy(struct preopen_helper *c)
 {
 	int status;
+	TALLOC_FREE(c->fde);
 	close(c->fd);
 	c->fd = -1;
 	kill(c->pid, SIGKILL);
@@ -274,6 +275,7 @@ static NTSTATUS preopen_init_helpers(TALLOC_CTX *mem_ctx, size_t to_read,
 	result->queue_max = queue_max;
 	result->template_fname = NULL;
 	result->fnum_sent = 0;
+	result->fnum_queue_end = 0;
 
 	for (i=0; i<num_helpers; i++) {
 		result->helpers[i].state = result;
@@ -400,7 +402,7 @@ static int preopen_open(vfs_handle_struct *handle,
 		return -1;
 	}
 
-	if (flags != O_RDONLY) {
+	if ((flags & O_ACCMODE) != O_RDONLY) {
 		return res;
 	}
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list