[SCM] Samba Shared Repository - branch v3-5-test updated

Jeremy Allison jra at samba.org
Thu Dec 17 19:33:32 MST 2009


The branch, v3-5-test has been updated
       via  e315849... Always map EMFILE to ERRDOS, ERRnofids, *NOT* NT_STATUS_TOO_MANY_OPENED_FILES. This is what W2KR3 does for NTCreateX and openX calls. May be the correct fix for bug 6837 - "Too many open files" when trying to access large number of files. Jeremy. (cherry picked from commit 6585621d367d997b79ffb99e0a8743766e6ff6d2)
       via  9bef3b2... Vector correctly through reply_openerror() (which uses the same logic). Jeremy. (cherry picked from commit d1a5387580182884d3cc875f3f404ff8377c1e92)
      from  8f8c797... Update default with correct value. Add a note about Win7 behavior here. Jeremy. (cherry picked from commit fbf4923cad17b55bd7a647bf2300b28e23b8cdbb)

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


- Log -----------------------------------------------------------------
commit e315849277ef307018d6dc93a1df04792f36a435
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Dec 17 18:27:54 2009 -0800

    Always map EMFILE to ERRDOS, ERRnofids, *NOT* NT_STATUS_TOO_MANY_OPENED_FILES.
    This is what W2KR3 does for NTCreateX and openX calls. May be the correct fix
    for bug 6837 - "Too many open files" when trying to access large number of files.
    Jeremy.
    (cherry picked from commit 6585621d367d997b79ffb99e0a8743766e6ff6d2)

commit 9bef3b2030a9210acc38fd0102fb4274f34ab296
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Dec 17 18:26:53 2009 -0800

    Vector correctly through reply_openerror() (which uses the same logic).
    Jeremy.
    (cherry picked from commit d1a5387580182884d3cc875f3f404ff8377c1e92)

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

Summary of changes:
 source3/smbd/error.c   |    4 ++++
 source3/smbd/nttrans.c |    7 +------
 2 files changed, 5 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 874efa2..279b7ba 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -132,6 +132,10 @@ void reply_openerror(struct smb_request *req, NTSTATUS status)
 		 */
 		reply_botherror(req, NT_STATUS_OBJECT_NAME_COLLISION,
 			ERRDOS, ERRfilexists);
+	} else if (NT_STATUS_EQUAL(status, NT_STATUS_TOO_MANY_OPENED_FILES)) {
+		/* EMFILE always seems to be returned as a DOS error.
+		 * See bug 6837. */
+		reply_doserror(req, ERRDOS, ERRnofids);
 	} else {
 		reply_nterror(req, status);
 	}
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 16f8bb5..be50090 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -580,12 +580,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
 			/* We have re-scheduled this call, no error. */
 			goto out;
 		}
-		if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
-			reply_botherror(req, status, ERRDOS, ERRfilexists);
-		}
-		else {
-			reply_nterror(req, status);
-		}
+		reply_openerror(req, status);
 		goto out;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list