[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-300-gcd62122

Michael Adam obnox at samba.org
Sun Nov 11 22:50:37 GMT 2007


The branch, v3-2-test has been updated
       via  cd62122916defbfb57468c3b82a60b766fc4652e (commit)
      from  b9d79fb509a6c59fdd73b016be5f4da3435c7789 (commit)

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


- Log -----------------------------------------------------------------
commit cd62122916defbfb57468c3b82a60b766fc4652e
Author: Volker Lendecke <vl at sernet.de>
Date:   Sun Nov 11 12:49:42 2007 +0100

    Cosmetic fix
    
    Do directory vs file open before entering open_file_stat

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

Summary of changes:
 source/smbd/file_access.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/file_access.c b/source/smbd/file_access.c
index 189fcbb..121e7f7 100644
--- a/source/smbd/file_access.c
+++ b/source/smbd/file_access.c
@@ -51,9 +51,7 @@ static NTSTATUS conn_get_nt_acl(TALLOC_CTX *mem_ctx,
 
 	/* fake a files_struct ptr: */
 
-	status = open_file_stat(conn, NULL, fname, psbuf, &fsp);
-	/* Perhaps it is a directory */
-	if (NT_STATUS_EQUAL(status, NT_STATUS_FILE_IS_A_DIRECTORY)) {
+	if (S_ISDIR(psbuf->st_mode)) {
 		status = open_directory(conn, NULL, fname, psbuf,
 					READ_CONTROL_ACCESS,
 					FILE_SHARE_READ|FILE_SHARE_WRITE,
@@ -62,6 +60,10 @@ static NTSTATUS conn_get_nt_acl(TALLOC_CTX *mem_ctx,
 					FILE_ATTRIBUTE_DIRECTORY,
 					NULL, &fsp);
 	}
+	else {
+		status = open_file_stat(conn, NULL, fname, psbuf, &fsp);
+	}
+
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(3, ("Unable to open file %s: %s\n", fname,
 			  nt_errstr(status)));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list