The branch, v4-0-test has been updated
       via  d548f5dee5980eae0aea25f1314238eb4f963568 (commit)
      from  697cd1896bccaa55ee422f17d9312d787ca699ed (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit d548f5dee5980eae0aea25f1314238eb4f963568
Author: Stefan Metzmacher <[EMAIL PROTECTED]>
Date:   Thu Aug 14 15:14:53 2008 +0200

    RAW-OPEN: be more strict in create_option checking
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source/torture/raw/open.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/torture/raw/open.c b/source/torture/raw/open.c
index 39ff443..f3494ea 100644
--- a/source/torture/raw/open.c
+++ b/source/torture/raw/open.c
@@ -845,6 +845,7 @@ static bool test_nttrans_create(struct smbcli_state *cli, 
struct torture_context
        bool ret = true;
        int i;
        uint32_t ok_mask, not_supported_mask, invalid_parameter_mask;
+       uint32_t not_a_directory_mask, unexpected_mask;
        struct {
                uint32_t open_disp;
                bool with_file;
@@ -1004,13 +1005,16 @@ static bool test_nttrans_create(struct smbcli_state 
*cli, struct torture_context
                smbcli_close(cli->tree, fnum);
        }
 
-       ok_mask = not_supported_mask = invalid_parameter_mask = 0;
-
        io.ntcreatex.in.file_attr = 0;
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
        io.ntcreatex.in.access_mask     = SEC_FLAG_MAXIMUM_ALLOWED;
 
        /* Check for options that should return NOT_SUPPORTED, OK or 
INVALID_PARAMETER */
+       ok_mask = 0;
+       not_supported_mask = 0;
+       invalid_parameter_mask = 0;
+       not_a_directory_mask = 0;
+       unexpected_mask = 0;
        for (i=0; i < 32; i++) {
                uint32_t create_option = 1<<i;
                if (create_option & NTCREATEX_OPTIONS_DELETE_ON_CLOSE) {
@@ -1025,14 +1029,19 @@ static bool test_nttrans_create(struct smbcli_state 
*cli, struct torture_context
                        smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
                } else if (NT_STATUS_EQUAL(status, 
NT_STATUS_INVALID_PARAMETER)) {
                        invalid_parameter_mask |= create_option;
+               } else if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_A_DIRECTORY)) {
+                       not_a_directory_mask |= 1<<i;
                } else {
+                       unexpected_mask |= 1<<i;
                        printf("create option 0x%08x returned %s\n", 
create_option, nt_errstr(status));
                }
        }
 
        CHECK_VAL(ok_mask,                0x00efcfce);
+       CHECK_VAL(not_a_directory_mask,   0x00000001);
        CHECK_VAL(not_supported_mask,     0x00002000);
        CHECK_VAL(invalid_parameter_mask, 0xff100030);
+       CHECK_VAL(unexpected_mask,        0x00000000);
 
        smbcli_unlink(cli->tree, fname);
 


-- 
Samba Shared Repository

Reply via email to