[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Nov 24 15:06:58 MST 2009


The branch, master has been updated
       via  b2dd546... Allow us to pass RAW-CHKPATH with FILE_FLAG_POSIX_SEMANTICS set or with wide links = no. Jeremy.
      from  187ef6b... Fix make test. Only do POSIX case conversion if FILE_FLAG_POSIX_SEMANTICS set. Doh ! Jeremy.

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


- Log -----------------------------------------------------------------
commit b2dd546f01425ff17008d3b0b0c36f754e6f3eec
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Nov 24 14:05:56 2009 -0800

    Allow us to pass RAW-CHKPATH with FILE_FLAG_POSIX_SEMANTICS set or with
    wide links = no.
    Jeremy.

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

Summary of changes:
 source3/smbd/filename.c |    3 ++-
 source3/smbd/vfs.c      |   14 +++++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 16e3631..88ee42c 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -791,7 +791,8 @@ NTSTATUS check_name(connection_struct *conn, const char *name)
 		}
 	}
 
-	if (!lp_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) {
+	if (!lp_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn)) ||
+			conn->case_sensitive) {
 		NTSTATUS status = check_reduced_name(conn,name);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(5,("check_name: name %s failed with %s\n",name,
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 1510bfc..2ce61ee 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -862,7 +862,7 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
 				DEBUG(3,("check_reduced_name: Component not a "
 					 "directory in getting realpath for "
 					 "%s\n", fname));
-				return map_nt_error_from_unix(errno);
+				return NT_STATUS_OBJECT_PATH_NOT_FOUND;
 			case ENOENT:
 			{
 				TALLOC_CTX *ctx = talloc_tos();
@@ -893,10 +893,18 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
 				resolved_name = SMB_VFS_REALPATH(conn,tmp_fname,resolved_name_buf);
 #endif
 				if (!resolved_name) {
+					NTSTATUS status = map_nt_error_from_unix(errno);
+
+					if (errno == ENOENT || errno == ENOTDIR) {
+						status = NT_STATUS_OBJECT_PATH_NOT_FOUND;
+					}
+
 					DEBUG(3,("check_reduce_named: "
 						 "couldn't get realpath for "
-						 "%s\n", fname));
-					return map_nt_error_from_unix(errno);
+						 "%s (%s)\n",
+						fname,
+						nt_errstr(status)));
+					return status;
 				}
 				tmp_fname = talloc_asprintf(ctx,
 						"%s/%s",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list