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

Karolin Seeger kseeger at samba.org
Wed Apr 11 14:56:01 UTC 2018


The branch, v4-6-test has been updated
       via  e1c58ec s3: smbd: Unix extensions attempts to change wrong field in fchown call.
       via  b11b0e0 s3:smbd: map nterror on smb2_flush errorpath
       via  24354b0 vfs_glusterfs: Fix the wrong pointer being sent in glfs_fsync_async
       via  94d91c9 s3: smbd: Fix possible directory fd leak if the underlying OS doesn't support fdopendir()
       via  8f4202e s3: ldap: Ensure the ADS_STRUCT pointer doesn't get freed on error, we don't own it here.
      from  0afb85c tests/bind.py: Add a bind test with NTLMSSP with no domain

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


- Log -----------------------------------------------------------------
commit e1c58ec4eed3479cb28f90b3982648dcf7cf88fb
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 9 09:32:23 2018 -0700

    s3: smbd: Unix extensions attempts to change wrong field in fchown call.
    
    Cut and paste error.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13375
    
    Reported-by: Rungta, Vandana <vrungta at amazon.com>
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Tue Apr 10 00:45:56 CEST 2018 on sn-devel-144
    
    (cherry picked from commit 3227b110d065500ed84fc70063da70ab35823a2e)
    
    Autobuild-User(v4-6-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-6-test): Wed Apr 11 16:55:21 CEST 2018 on sn-devel-144

commit b11b0e0f7fcbc72814c2240aff8ed35519f022b9
Author: Anton Nefedov via samba-technical <samba-technical at lists.samba.org>
Date:   Thu Mar 15 14:38:41 2018 +0300

    s3:smbd: map nterror on smb2_flush errorpath
    
    smbd_smb2_flush_recv() expects nterror in tevent_req, and otherwise
    aborts in tevent_req_is_nterror()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13338
    
    Signed-off-by: Anton Nefedov <anton.nefedov at virtuozzo.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 98623129446672521b7fa41d3457b8ce95db828c)

commit 24354b0fdaa0512ffc50c9f037135f4f1d11a008
Author: Poornima G <pgurusid at redhat.com>
Date:   Thu Feb 22 16:21:35 2018 +0530

    vfs_glusterfs: Fix the wrong pointer being sent in glfs_fsync_async
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13297
    
    Pair-Programmed-With: Anoop C S <anoopcs at redhat.com>
    Signed-off-by: Poornima G <pgurusid at redhat.com>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Mon Feb 26 20:17:50 CET 2018 on sn-devel-144
    
    (cherry picked from commit 46e6626f73f42c84f254507c3ec2b591e2e732ba)

commit 94d91c990630c157bc162c2baf600a97c359af51
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Feb 14 13:23:12 2018 -0800

    s3: smbd: Fix possible directory fd leak if the underlying OS doesn't support fdopendir()
    
    HPUX has this problem.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13270
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Fri Feb 23 22:56:35 CET 2018 on sn-devel-144
    
    (cherry picked from commit 5ad5e7966f555b1d2b39d276646934a2cd2535e6)

commit 8f4202e0d98bd497286dc2dea63883bf880d811b
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jan 24 14:09:43 2018 -0800

    s3: ldap: Ensure the ADS_STRUCT pointer doesn't get freed on error, we don't own it here.
    
    Thanks to Isaac Boukris <iboukris at gmail.com> for finding the
    issue and testing this fix.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13244
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Jan 26 02:25:20 CET 2018 on sn-devel-144
    
    (cherry picked from commit e7425bd5245ffea68b7e8f794c9b5f864d103769)

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

Summary of changes:
 source3/libads/ldap_utils.c         | 9 +++++++++
 source3/modules/vfs_glusterfs.c     | 2 +-
 source3/smbd/smb2_flush.c           | 2 +-
 source3/smbd/smb2_query_directory.c | 9 ++++++---
 source3/smbd/trans2.c               | 4 ++--
 5 files changed, 19 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libads/ldap_utils.c b/source3/libads/ldap_utils.c
index a4adbc0..0c37b06 100644
--- a/source3/libads/ldap_utils.c
+++ b/source3/libads/ldap_utils.c
@@ -105,9 +105,18 @@ static ADS_STATUS ads_do_search_retry_internal(ADS_STRUCT *ads, const char *bind
 		status = ads_connect(ads);
 
 		if (!ADS_ERR_OK(status)) {
+			bool orig_is_mine = ads->is_mine;
+
 			DEBUG(1,("ads_search_retry: failed to reconnect (%s)\n",
 				 ads_errstr(status)));
+			/*
+			 * We need to keep the ads pointer
+			 * from being freed here as we don't own it and
+			 * callers depend on it being around.
+			 */
+			ads->is_mine = false;
 			ads_destroy(&ads);
+			ads->is_mine = orig_is_mine;
 			SAFE_FREE(bp);
 			return status;
 		}
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 09e74eb..6200333 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -961,7 +961,7 @@ static struct tevent_req *vfs_gluster_fsync_send(struct vfs_handle_struct
 
 	PROFILE_TIMESTAMP(&state->start);
 	ret = glfs_fsync_async(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle,
-				fsp), aio_glusterfs_done, req);
+				fsp), aio_glusterfs_done, state);
 	if (ret < 0) {
 		tevent_req_error(req, -ret);
 		return tevent_req_post(req, ev);
diff --git a/source3/smbd/smb2_flush.c b/source3/smbd/smb2_flush.c
index d077c62..51584ca 100644
--- a/source3/smbd/smb2_flush.c
+++ b/source3/smbd/smb2_flush.c
@@ -198,7 +198,7 @@ static void smbd_smb2_flush_done(struct tevent_req *subreq)
 	ret = SMB_VFS_FSYNC_RECV(subreq, &vfs_aio_state);
 	TALLOC_FREE(subreq);
 	if (ret == -1) {
-		tevent_req_error(req, vfs_aio_state.error);
+		tevent_req_nterror(req, map_nt_error_from_unix(vfs_aio_state.error));
 		return;
 	}
 	tevent_req_done(req);
diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c
index 2af029b..2c6aa51 100644
--- a/source3/smbd/smb2_query_directory.c
+++ b/source3/smbd/smb2_query_directory.c
@@ -325,11 +325,14 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
 	if (in_flags & SMB2_CONTINUE_FLAG_REOPEN) {
 		int flags;
 
-		dptr_CloseDir(fsp);
+		status = fd_close(fsp);
+		if (tevent_req_nterror(req, status)) {
+			return tevent_req_post(req, ev);
+		}
 
 		/*
-		 * dptr_CloseDir() will close and invalidate the fsp's file
-		 * descriptor, we have to reopen it.
+		 * fd_close() will close and invalidate the fsp's file
+		 * descriptor. So we have to reopen it.
 		 */
 
 		flags = O_RDONLY;
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index f0d8e7d..ec7a5fa 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -7751,10 +7751,10 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn,
 
 		DEBUG(10,("smb_set_file_unix_basic: SMB_SET_FILE_UNIX_BASIC "
 			  "changing group %u for file %s\n",
-			  (unsigned int)set_owner,
+			  (unsigned int)set_grp,
 			  smb_fname_str_dbg(smb_fname)));
 		if (fsp && fsp->fh->fd != -1) {
-			ret = SMB_VFS_FCHOWN(fsp, set_owner, (gid_t)-1);
+			ret = SMB_VFS_FCHOWN(fsp, (uid_t)-1, set_grp);
 		} else {
 			/*
 			 * UNIX extensions calls must always operate


-- 
Samba Shared Repository



More information about the samba-cvs mailing list