[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-312-gf4f700c

Michael Adam obnox at samba.org
Tue Nov 13 22:27:24 GMT 2007


The branch, v3-2-test has been updated
       via  f4f700cf0c1657c36e801fab20fe7b1a4efcb714 (commit)
      from  f1680bada913af4eaf5c0d686983018d6c8b3e5f (commit)

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


- Log -----------------------------------------------------------------
commit f4f700cf0c1657c36e801fab20fe7b1a4efcb714
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 13 23:26:38 2007 +0100

    Fix potential orphaned open files.
    
    Calling can_access_file could lead to orphaned open files
    when SMB_VFS_GET_NT_ACL returned ENOSYS (not implemented).
    
    Michael

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

Summary of changes:
 source/smbd/file_access.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/file_access.c b/source/smbd/file_access.c
index 4647266..a58bcdd 100644
--- a/source/smbd/file_access.c
+++ b/source/smbd/file_access.c
@@ -76,12 +76,14 @@ static NTSTATUS conn_get_nt_acl(TALLOC_CTX *mem_ctx,
 				    &secdesc);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(5, ("Unable to get NT ACL for file %s\n", fname));
-		return status;
+		goto done;
 	}
 
 	*psd = talloc_move(mem_ctx, &secdesc);
+
+done:
 	close_file(fsp, NORMAL_CLOSE);
-	return NT_STATUS_OK;
+	return status;
 }
 
 static bool can_access_file_acl(struct connection_struct *conn,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list