The branch, master has been updated via 0c1ff3b... 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. via f8ab38a... Vector correctly through reply_openerror() (which uses the same logic). Jeremy. from cfbf62d... s4 torture: RAW-STREAMS-NAMES Make sure the create time of the streams are different from the base file
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 0c1ff3bb09e3fec82c11fc182d6a5a12494caea8 Author: Jeremy Allison <j...@samba.org> Date: Thu Dec 17 18:31:44 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. commit f8ab38a8f211a11c7b006ea7cfb19aee526e12a4 Author: Jeremy Allison <j...@samba.org> Date: Thu Dec 17 18:31:26 2009 -0800 Vector correctly through reply_openerror() (which uses the same logic). Jeremy. ----------------------------------------------------------------------- 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