Author: vlendec Date: 2005-08-23 10:38:46 +0000 (Tue, 23 Aug 2005) New Revision: 9512
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9512 Log: According to the error table NT_STATUS_TOO_MANY_OPENED_FILES is mapped to a ERRDOS/ERRnofids and not ERRSRV/ERRnofids. A quick torture test against W2k3 shows that this must be *ancient* code in W2k3, it still returns DOS error codes. We should do this as well I think, but only after we changed to the samba4 DOS-errors in NTSTATUS trick. I did not complete this test against Samba3, it is not funny to linearly search the bitmap :-( Volker Modified: trunk/source/smbd/files.c Changeset: Modified: trunk/source/smbd/files.c =================================================================== --- trunk/source/smbd/files.c 2005-08-23 09:45:38 UTC (rev 9511) +++ trunk/source/smbd/files.c 2005-08-23 10:38:46 UTC (rev 9512) @@ -76,10 +76,15 @@ first_file = (sys_getpid() ^ (int)time(NULL)) % real_max_open_files; } + /* TODO: Port the id-tree implementation from Samba4 */ + i = bitmap_find(file_bmap, first_file); if (i == -1) { DEBUG(0,("ERROR! Out of file structures\n")); - set_saved_error_triple(ERRSRV, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES); + /* TODO: We have to unconditionally return a DOS error here, + * W2k3 even returns ERRDOS/ERRnofids for ntcreate&x with + * NTSTATUS negotiated */ + set_saved_ntstatus(NT_STATUS_TOO_MANY_OPENED_FILES); return NULL; }
