r8107: now that we properly separate DOS and NT status codes all the places
authorAndrew Tridgell <tridge@samba.org>
Mon, 4 Jul 2005 01:57:53 +0000 (01:57 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:19:08 +0000 (13:19 -0500)
that relied on the mapping need to be fixed. The first thing is to get
all the torture tests working against w2k3 again with nt status codes
enabled. The 2nd step will be to make them pass with nt status
disabled.

This starts on the first task, fixing the assumption that
NT_STATUS_INVALID_LOCK_SEQUENCE is a valid substitute for
ERRDOS:ERRbadaccess

source/ntvfs/ntvfs_generic.c
source/torture/raw/open.c

index 9b6c75e5c6510e615da9976a9a2f448b5ef91e6b..024a48bf7a7a1298606729980f0823fb692538f0 100644 (file)
@@ -272,7 +272,7 @@ static NTSTATUS map_openx_open(uint16_t flags, uint16_t open_mode,
                        SEC_RIGHTS_FILE_WRITE;
                break;
        default:
-               return NT_STATUS_INVALID_LOCK_SEQUENCE;
+               return NT_STATUS_DOS(ERRDOS, ERRbadaccess);
        }
 
        switch (open_mode & OPENX_MODE_DENY_MASK) {
@@ -311,7 +311,7 @@ static NTSTATUS map_openx_open(uint16_t flags, uint16_t open_mode,
                io2->generic.in.share_access = NTCREATEX_SHARE_ACCESS_NONE;
                break;
        default:
-               return NT_STATUS_INVALID_LOCK_SEQUENCE;
+               return NT_STATUS_DOS(ERRDOS, ERRbadaccess);
        }
 
        switch (open_func) {
@@ -336,7 +336,7 @@ static NTSTATUS map_openx_open(uint16_t flags, uint16_t open_mode,
                        io2->generic.in.open_disposition = NTCREATEX_DISP_CREATE;
                        break;
                }
-               return NT_STATUS_INVALID_LOCK_SEQUENCE;
+               return NT_STATUS_DOS(ERRDOS, ERRbadaccess);
        }
 
        return NT_STATUS_OK;
index 8792ab7caba80f5f4f33741d7aca7eb98cf30ead..afd6963b41924506d3caaf13e580b8692e05d2fc 100644 (file)
@@ -278,8 +278,8 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                { OPENX_OPEN_FUNC_OPEN,                           False, NT_STATUS_OBJECT_NAME_NOT_FOUND },
                { OPENX_OPEN_FUNC_OPEN  | OPENX_OPEN_FUNC_CREATE, True,  NT_STATUS_OK },
                { OPENX_OPEN_FUNC_OPEN  | OPENX_OPEN_FUNC_CREATE, False, NT_STATUS_OK },
-               { OPENX_OPEN_FUNC_FAIL,                           True,  NT_STATUS_INVALID_LOCK_SEQUENCE },
-               { OPENX_OPEN_FUNC_FAIL,                           False, NT_STATUS_INVALID_LOCK_SEQUENCE },
+               { OPENX_OPEN_FUNC_FAIL,                           True,  NT_STATUS_DOS(ERRDOS, ERRbadaccess) },
+               { OPENX_OPEN_FUNC_FAIL,                           False, NT_STATUS_DOS(ERRDOS, ERRbadaccess) },
                { OPENX_OPEN_FUNC_FAIL  | OPENX_OPEN_FUNC_CREATE, True,  NT_STATUS_OBJECT_NAME_COLLISION },
                { OPENX_OPEN_FUNC_FAIL  | OPENX_OPEN_FUNC_CREATE, False, NT_STATUS_OK },
                { OPENX_OPEN_FUNC_TRUNC,                          True,  NT_STATUS_OK },