Samba function test

Jim Myers myersjj at us.ibm.com
Wed Jul 31 17:02:01 GMT 2002


OK, here's the diff for the first problem I mentioned (I'm just learning 
about diffs so please correct me if this isn't correct).
BTW the error is that on and nt_create_and_X for a new directory with the 
temp flag set. IFSTEST says this is invalid, so this patch returns the 
proper NT error code.  Also, please explain about NT vs DOS error codes.

--- /home/myers/samba/source/smbd/nttrans.c     Wed Jul 31 16:39:23 2002
+++ /usr/src/samba/source/smbd/nttrans.c        Tue Jul 30 22:40:32 2002
@@ -687,6 +688,17 @@
         */
 
        if(create_options & FILE_DIRECTORY_FILE) {
+               /* verify not directory with temporary flag - IFSTEST 
fails this */
+               DEBUG(10,("reply_ntcreate_and_X: Create_options 0x%lx, 
file attributes 0x%lx temp=%x\n",
+                       (unsigned long)file_attributes,
+                       file_attributes & FILE_ATTRIBUTE_TEMPORARY,
+                       create_options & FILE_DIRECTORY_FILE ));
+               if((file_attributes & FILE_ATTRIBUTE_TEMPORARY) > 0) {
+                       DEBUG(0,("reply_ntcreate_and_X: Directory %s with 
Temporary flag is invalid\n",
+                               fname));
+                       return(ERROR_NT(NT_STATUS_INVALID_PARAMETER));
+               }
+ 
                oplock_request = 0;
 
                fsp = open_directory(conn, fname, &sbuf, desired_access, 
smb_open_mode, smb_ofun, unixmode, &smb_action);

Jim Myers
IBM Almaden Research Center
B3-239, 408-927-2013




Andrew Bartlett <abartlet at samba.org>
Sent by: abartlet at bartlett.house
07/31/2002 04:24 PM

 
        To:     Jim Myers/Almaden/IBM at IBMUS
        cc:     samba-technical at samba.org
        Subject:        Re: Samba function test

 

Jim Myers wrote:
> 
> The IFSTEST suite is only available as part of the IFS development
> kit.

OK.

> There are a number of other differences I have found running other
> parts of IFSTEST.
> If I fix (some of) these, what should I do with the fixes?

Send them here, and (possibly, but I don't particulary use it) to
samba-patches at samba.org as diff -u.

> Am I correct in assuming that Samba shares should produce exactly the
> same results, including error codes as IFSTEST?

We must produce the same results as a remote Win2k server, particulary
including error codes.  (Many subtle bugs lie in those error codes...)

Even better would be to be able to replicate Win2k when it speaks DOS
error codes too (you would need to use smbfilter), but we *know* that
our NTSTATUS codes are often wrong, and need fixing.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net


-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba-technical mailing list