Take care of condition where DOS and NT error codes must differ. Found by
authorJeremy Allison <jra@samba.org>
Mon, 29 Sep 2003 23:35:39 +0000 (23:35 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 29 Sep 2003 23:35:39 +0000 (23:35 +0000)
DOS program test by Amir Hardon <hardon@actcom.co.il>.
Jeremy.

source/smbd/reply.c

index 6ac4cffddb4eaf3a542e007a33c9bb02585d15f3..303e33cc488dd70d9aa6452e9ce758de71bda11d 100644 (file)
@@ -417,7 +417,7 @@ int reply_chkpth(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
        if (check_name(name,conn)) {
                if (VALID_STAT(sbuf) || SMB_VFS_STAT(conn,name,&sbuf) == 0)
                        if (!(ok = S_ISDIR(sbuf.st_mode)))
-                               errno = ENOTDIR;
+                               return ERROR_BOTH(NT_STATUS_NOT_A_DIRECTORY,ERRDOS,ERRbadpath);
        }
 
        if (!ok) {