[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-495-g525a688

Volker Lendecke vl at sernet.de
Wed Dec 5 14:44:50 GMT 2007


The branch, v3-2-test has been updated
       via  525a6887afcae8d8e740cf194a412c21da899649 (commit)
      from  97c9a4042d36178a728b5e0f8923091c7069366d (commit)

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


- Log -----------------------------------------------------------------
commit 525a6887afcae8d8e740cf194a412c21da899649
Author: Volker Lendecke <vl at sernet.de>
Date:   Wed Dec 5 15:34:07 2007 +0100

    There's no point in passing down a 0

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

Summary of changes:
 source/smbd/nttrans.c |    6 ++----
 source/smbd/open.c    |   40 +++++++++++++++++++++++++---------------
 2 files changed, 27 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index 8a177c8..fb85a67 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -423,7 +423,6 @@ void reply_ntcreate_and_X(connection_struct *conn, struct smb_request *req)
 	SMB_BIG_UINT allocation_size;
 	/* Breakout the oplock request bits so we can set the
 	   reply bits separately. */
-	int oplock_request = 0;
 	uint32 fattr=0;
 	SMB_OFF_T file_len = 0;
 	SMB_STRUCT_STAT sbuf;
@@ -501,7 +500,7 @@ void reply_ntcreate_and_X(connection_struct *conn, struct smb_request *req)
 	status = create_file(conn, req, root_dir_fid, fname, flags,
 			     access_mask, file_attributes, share_access,
 			     create_disposition, create_options,
-			     oplock_request, allocation_size, NULL, NULL,
+			     allocation_size, NULL, NULL,
 			     &fsp, &info, &oplock_granted, &sbuf);
 
 	if (!NT_STATUS_IS_OK(status)) {
@@ -812,7 +811,6 @@ static void call_nt_transact_create(connection_struct *conn,
 	char *params = *ppparams;
 	char *data = *ppdata;
 	/* Breakout the oplock request bits so we can set the reply bits separately. */
-	int oplock_request = 0;
 	uint32 fattr=0;
 	SMB_OFF_T file_len = 0;
 	SMB_STRUCT_STAT sbuf;
@@ -946,7 +944,7 @@ static void call_nt_transact_create(connection_struct *conn,
 	status = create_file(conn, req, root_dir_fid, fname, flags,
 			     access_mask, file_attributes, share_access,
 			     create_disposition, create_options,
-			     oplock_request, allocation_size, sd, ea_list,
+			     allocation_size, sd, ea_list,
 			     &fsp, &info, &oplock_granted, &sbuf);
 
 	if(!NT_STATUS_IS_OK(status)) {
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 0a142cd..66ceb8d 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -2454,7 +2454,6 @@ NTSTATUS create_file(connection_struct *conn,
 		     uint32_t share_access,
 		     uint32_t create_disposition,
 		     uint32_t create_options,
-		     int oplock_request,
 		     SMB_BIG_UINT allocation_size,
 		     struct security_descriptor *sd,
 		     struct ea_list *ea_list,
@@ -2470,6 +2469,7 @@ NTSTATUS create_file(connection_struct *conn,
 	int info = FILE_WAS_OPENED;
 	files_struct *fsp = NULL;
 	uint8_t oplock_granted = NO_OPLOCK_RETURN;
+	int oplock_request;
 	NTSTATUS status;
 
 	DEBUG(10,("create_file: flags = 0x%x, access_mask = 0x%x "
@@ -2619,18 +2619,22 @@ NTSTATUS create_file(connection_struct *conn,
 			? BATCH_OPLOCK : 0;
 	}
 
-	status = resolve_dfspath(
-		talloc_tos(), conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
-		fname, &fname);
+	if (req == NULL) {
+		oplock_request |= INTERNAL_OPEN_ONLY;
+	}
 
-	if (!NT_STATUS_IS_OK(status)) {
-		/*
-		 * For PATH_NOT_COVERED we had
-		 * reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
-		 *		   ERRSRV, ERRbadpath);
-		 * Need to fix in callers
-		 */
-		goto fail;
+	if ((req != NULL) && (req->flags2 & FLAGS2_DFS_PATHNAMES)) {
+		status = resolve_dfspath(talloc_tos(), conn, true, fname, &fname);
+
+		if (!NT_STATUS_IS_OK(status)) {
+			/*
+			 * For PATH_NOT_COVERED we had
+			 * reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
+			 *		   ERRSRV, ERRbadpath);
+			 * Need to fix in callers
+			 */
+			goto fail;
+		}
 	}
 
 	/*
@@ -2852,9 +2856,15 @@ NTSTATUS create_file(connection_struct *conn,
 		   info, (int)oplock_granted));
 
 	*result = fsp;
-	*pinfo = info;
-	*poplock_granted = oplock_granted;
-	*psbuf = sbuf;
+	if (pinfo != NULL) {
+		*pinfo = info;
+	}
+	if (poplock_granted != NULL) {
+		*poplock_granted = oplock_granted;
+	}
+	if (psbuf != NULL) {
+		*psbuf = sbuf;
+	}
 	TALLOC_FREE(frame);
 	return NT_STATUS_OK;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list