The branch, master has been updated
       via  d5643a08e9da1f3df2ef7eeb6eb9a0afbdca36a1 (commit)
       via  a38409ee4cff1c1964cdb0a56bb1f51566e6edc5 (commit)
       via  5975ea793a5d1367ff89e8c69099b8eac69d273d (commit)
       via  11bd19c0071eb0013bedcfc149199a2f1d4063db (commit)
      from  2b16380a0e22cc455f698e59cd94bfd899c989d0 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit d5643a08e9da1f3df2ef7eeb6eb9a0afbdca36a1
Author: Steven Danneman <[email protected]>
Date:   Tue Sep 8 12:39:39 2009 -0700

    s4/torture/smb2: removed SMB2-FIND test
    
    This test has been wholly replaced by the SMB2-DIR-ONE test found
    in dir.c.

commit a38409ee4cff1c1964cdb0a56bb1f51566e6edc5
Author: Steven Danneman <[email protected]>
Date:   Tue Sep 8 12:12:01 2009 -0700

    s4/torture/smb2: Fix several small bugs and style issues in SMB2 dir tests
    
    * removed all uses of printf, replaced with torture_comment
    * replaced custom CHECK macros with new torture_assert_*_todo() helpers
    * switched string dir name generation to generate_unique_strs() helper,
      to avoid non-deterministic test behavior where generate_rand_str()
      would cause file colissions in the same directory.

commit 5975ea793a5d1367ff89e8c69099b8eac69d273d
Author: Steven Danneman <[email protected]>
Date:   Tue Sep 8 12:10:51 2009 -0700

    s4/torture: add new torture_assert_*_todo() macros
    
    These allow torture tests to perform cleanup after a failure, by
    jumping to a goto label.

commit 11bd19c0071eb0013bedcfc149199a2f1d4063db
Author: Steven Danneman <[email protected]>
Date:   Tue Sep 8 12:09:39 2009 -0700

    lib/util: add unique string generator helper function

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

Summary of changes:
 lib/torture/torture.h          |   38 ++++++
 lib/util/genrand.c             |   59 ++++++++
 lib/util/util.h                |   10 ++
 source4/torture/smb2/config.mk |    1 -
 source4/torture/smb2/dir.c     |  288 +++++++++++++++++++++-------------------
 source4/torture/smb2/find.c    |  220 ------------------------------
 source4/torture/smb2/smb2.c    |    1 -
 7 files changed, 259 insertions(+), 358 deletions(-)
 delete mode 100644 source4/torture/smb2/find.c


Changeset truncated at 500 lines:

diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index e28801e..7f387cc 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -246,6 +246,15 @@ void torture_result(struct torture_context *test,
        }\
        } while(0)
 
+#define 
torture_assert_ntstatus_equal_goto(torture_ctx,got,expected,ret,label,cmt) \
+       do { NTSTATUS __got = got, __expected = expected; \
+       if (!NT_STATUS_EQUAL(__got, __expected)) { \
+               torture_result(torture_ctx, TORTURE_FAIL, __location__": "#got" 
was %s, expected %s: %s", nt_errstr(__got), nt_errstr(__expected), cmt); \
+               ret = false; \
+               goto label; \
+       }\
+       } while(0)
+
 #define torture_assert_ndr_err_equal(torture_ctx,got,expected,cmt) \
        do { enum ndr_err_code __got = got, __expected = expected; \
        if (__got != __expected) { \
@@ -272,6 +281,17 @@ void torture_result(struct torture_context *test,
        } \
        } while(0)
 
+#define torture_assert_str_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
+       do { const char *__got = (got), *__expected = (expected); \
+       if (strcmp_safe(__got, __expected) != 0) { \
+               torture_result(torture_ctx, TORTURE_FAIL, \
+                                          __location__": "#got" was %s, 
expected %s: %s", \
+                                          __got, __expected, cmt); \
+               ret = false; \
+               goto label; \
+       } \
+       } while(0)
+
 #define torture_assert_mem_equal(torture_ctx,got,expected,len,cmt)\
        do { const void *__got = (got), *__expected = (expected); \
        if (memcmp(__got, __expected, len) != 0) { \
@@ -343,6 +363,17 @@ void torture_result(struct torture_context *test,
        } \
        } while(0)
 
+#define torture_assert_int_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
+       do { int __got = (got), __expected = (expected); \
+       if (__got != __expected) { \
+               torture_result(torture_ctx, TORTURE_FAIL, \
+                       __location__": "#got" was %d, expected %d: %s", \
+                       __got, __expected, cmt); \
+               ret = false; \
+               goto label; \
+       } \
+       } while(0)
+
 #define torture_assert_u64_equal(torture_ctx,got,expected,cmt)\
        do { uint64_t __got = (got), __expected = (expected); \
        if (__got != __expected) { \
@@ -370,6 +401,10 @@ void torture_result(struct torture_context *test,
                torture_result(torture_ctx, TORTURE_SKIP, __location__": %s", 
cmt);\
                return true; \
        } while(0)
+#define torture_skip_goto(torture_ctx,label,cmt) do {\
+               torture_result(torture_ctx, TORTURE_SKIP, __location__": %s", 
cmt);\
+               goto label; \
+       } while(0)
 #define torture_fail(torture_ctx,cmt) do {\
                torture_result(torture_ctx, TORTURE_FAIL, __location__": %s", 
cmt);\
                return false; \
@@ -385,6 +420,9 @@ void torture_result(struct torture_context *test,
 #define torture_assert_ntstatus_ok(torture_ctx,expr,cmt) \
                torture_assert_ntstatus_equal(torture_ctx,expr,NT_STATUS_OK,cmt)
 
+#define torture_assert_ntstatus_ok_goto(torture_ctx,expr,ret,label,cmt) \
+               
torture_assert_ntstatus_equal_goto(torture_ctx,expr,NT_STATUS_OK,ret,label,cmt)
+
 #define torture_assert_werr_ok(torture_ctx,expr,cmt) \
                torture_assert_werr_equal(torture_ctx,expr,WERR_OK,cmt)
 
diff --git a/lib/util/genrand.c b/lib/util/genrand.c
index 5b84565..1519931 100644
--- a/lib/util/genrand.c
+++ b/lib/util/genrand.c
@@ -360,3 +360,62 @@ again:
 
        return retstr;
 }
+
+/**
+ * Define our own pow() function to avoid linking in libm
+ */
+static double s_pow(double x, double y)
+{
+       int i;
+       double ret = x;
+
+       if (y == 0)
+               return 1;
+
+       for (i = 1; i < y; i++)
+               ret *= x;
+
+       return ret;
+}
+
+
+/**
+ * Generate an array of unique text strings all of the same length.
+ * The returned string will be allocated.
+ * Returns NULL if the number of unique combinations cannot be created.
+ *
+ * Characters used are: abcdefghijklmnopqrstuvwxyz0123456789+_-#.,
+ */
+_PUBLIC_ char** generate_unique_strs(TALLOC_CTX *mem_ctx, size_t len,
+                                    uint32_t num)
+{
+       const char *c_list = "abcdefghijklmnopqrstuvwxyz0123456789+_-#.,";
+       const int c_size = 42;
+       int i, j, rem;
+       long long place;
+       char ** strs = NULL;
+
+       if (num == 0 || len == 0)
+               return NULL;
+
+       /* We'll never return more than UINT32_MAX strings. Since 42^6 is more
+        * than UINT32_MAX, we only have to check if we've been asked to return
+        * more than the total number of permutations for lengths less than 6.*/
+       if ((len < 6) && (num > s_pow(c_size, len)))
+               return NULL;
+
+       strs = talloc_array(mem_ctx, char *, num);
+
+       for (i = 0; i < num; i++) {
+               char *retstr = talloc_zero_size(mem_ctx, len + 1);
+               rem = i;
+               for (j = len - 1; j >= 0; j--) {
+                       place = s_pow(c_size, j);
+                       retstr[j] = c_list[rem / place];
+                       rem = rem % place;
+               }
+               strs[i] = retstr;
+       }
+
+       return strs;
+}
diff --git a/lib/util/util.h b/lib/util/util.h
index 20050d2..aa9f91e 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -192,6 +192,16 @@ _PUBLIC_ char *generate_random_str_list(TALLOC_CTX 
*mem_ctx, size_t len, const c
  */
 _PUBLIC_ char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len);
 
+/**
+ * Generate an array of unique text strings all of the same length.
+ * The returned strings will be allocated.
+ * Returns NULL if the number of unique combinations cannot be created.
+ *
+ * Characters used are: 
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_-#.,
+ */
+_PUBLIC_ char** generate_unique_strs(TALLOC_CTX *mem_ctx, size_t len,
+                                         uint32_t num);
+
 /* The following definitions come from lib/util/dprintf.c  */
 #if _SAMBA_BUILD_ == 4
 
diff --git a/source4/torture/smb2/config.mk b/source4/torture/smb2/config.mk
index b321b41..2aba86a 100644
--- a/source4/torture/smb2/config.mk
+++ b/source4/torture/smb2/config.mk
@@ -16,7 +16,6 @@ TORTURE_SMB2_OBJ_FILES = $(addprefix $(torturesrcdir)/smb2/, \
                util.o \
                getinfo.o \
                setinfo.o \
-               find.o \
                lock.o \
                notify.o \
                smb2.o \
diff --git a/source4/torture/smb2/dir.c b/source4/torture/smb2/dir.c
index 354085d..3551f97 100644
--- a/source4/torture/smb2/dir.c
+++ b/source4/torture/smb2/dir.c
@@ -35,18 +35,6 @@
 
 #include "system/filesys.h"
 
-#define CHECK_STATUS(status, correct) do { \
-       if (!NT_STATUS_EQUAL(status, correct)) { \
-               torture_result(tctx, TORTURE_FAIL, __location__": \
-                      Incorrect status %s - should be %s", \
-                      nt_errstr(status), nt_errstr(correct)); \
-               ret = false; \
-               goto done; \
-       }} while (0)
-
-#define CHECK_VALUE(v, correct) torture_assert_int_equal(tctx, (v), \
-                               (correct), "incorrect value");
-
 #define DNAME  "smb2_dir"
 #define NFILES 100
 
@@ -63,6 +51,7 @@ static NTSTATUS populate_tree(struct torture_context *tctx,
                              struct smb2_handle *h_out)
 {
        struct smb2_create create;
+       char **strs = NULL;
        NTSTATUS status;
        bool ret;
        int i;
@@ -80,7 +69,7 @@ static NTSTATUS populate_tree(struct torture_context *tctx,
        create.in.fname = DNAME;
 
        status = smb2_create(tree, mem_ctx, &create);
-       CHECK_STATUS(status, NT_STATUS_OK);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
        *h_out = create.out.file.handle;
 
        ZERO_STRUCT(create);
@@ -88,12 +77,17 @@ static NTSTATUS populate_tree(struct torture_context *tctx,
        create.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
        create.in.create_disposition = NTCREATEX_DISP_CREATE;
 
+       strs = generate_unique_strs(mem_ctx, 8, nfiles);
+       if (strs == NULL) {
+               status = NT_STATUS_OBJECT_NAME_COLLISION;
+               goto done;
+       }
        for (i = 0; i < nfiles; i++) {
-               files[i].name = generate_random_str(tctx, 8);
+               files[i].name = strs[i];
                create.in.fname = talloc_asprintf(mem_ctx, "%s\\%s",
                    DNAME, files[i].name);
                status = smb2_create(tree, mem_ctx, &create);
-               CHECK_STATUS(status, NT_STATUS_OK);
+               torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
                smb2_util_close(tree, create.out.file.handle);
        }
  done:
@@ -130,7 +124,7 @@ static bool test_find(struct torture_context *tctx,
                status = smb2_find_level(tree, tree, &f, &count, &d);
                if (NT_STATUS_EQUAL(status, STATUS_NO_MORE_FILES))
                        break;
-               CHECK_STATUS(status, NT_STATUS_OK);
+               torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
 
                for (i = 0; i < count; i++) {
                        bool expected;
@@ -163,7 +157,8 @@ static bool test_find(struct torture_context *tctx,
                f.in.max_response_size  = 4096;
        } while (count != 0);
 
-       CHECK_VALUE(file_count, NFILES + 2);
+       torture_assert_int_equal_goto(tctx, file_count, NFILES + 2, ret, done,
+                                     "");
 
        for (i = 0; i < NFILES; i++) {
                if (files[j].found)
@@ -214,7 +209,7 @@ static bool test_fixed(struct torture_context *tctx,
        create.in.fname = DNAME;
 
        status = smb2_create(tree, mem_ctx, &create);
-       CHECK_STATUS(status, NT_STATUS_OK);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
        h2 = create.out.file.handle;
 
        ZERO_STRUCT(f);
@@ -226,7 +221,7 @@ static bool test_fixed(struct torture_context *tctx,
 
        /* Start enumeration on h, then delete all from h2 */
        status = smb2_find_level(tree, tree, &f, &count, &d);
-       CHECK_STATUS(status, NT_STATUS_OK);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
 
        f.in.file.handle        = h2;
 
@@ -234,7 +229,7 @@ static bool test_fixed(struct torture_context *tctx,
                status = smb2_find_level(tree, tree, &f, &count, &d);
                if (NT_STATUS_EQUAL(status, STATUS_NO_MORE_FILES))
                        break;
-               CHECK_STATUS(status, NT_STATUS_OK);
+               torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
 
                for (i = 0; i < count; i++) {
                        const char *found = d[i].both_directory_info.name.s;
@@ -245,7 +240,8 @@ static bool test_fixed(struct torture_context *tctx,
                                continue;
 
                        status = smb2_util_unlink(tree, path);
-                       CHECK_STATUS(status, NT_STATUS_OK);
+                       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                                       "");
 
                        talloc_free(path);
                }
@@ -261,7 +257,7 @@ static bool test_fixed(struct torture_context *tctx,
                status = smb2_find_level(tree, tree, &f, &count, &d);
                if (NT_STATUS_EQUAL(status, STATUS_NO_MORE_FILES))
                        break;
-               CHECK_STATUS(status, NT_STATUS_OK);
+               torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
 
                for (i = 0; i < count; i++) {
                        const char *found = d[i].both_directory_info.name.s;
@@ -427,11 +423,11 @@ static bool test_one_file(struct torture_context *tctx,
        struct smb2_handle h, h2;
 
        status = torture_smb2_testdir(tree, DNAME, &h);
-       CHECK_STATUS(status, NT_STATUS_OK);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
 
        status = smb2_create_complex_file(tree, DNAME "\\torture_search.txt",
                                          &h2);
-       CHECK_STATUS(status, NT_STATUS_OK);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "");
 
        /* call all the File Information Classes */
        for (i=0;i<ARRAY_SIZE(levels);i++) {
@@ -441,36 +437,39 @@ static bool test_one_file(struct torture_context *tctx,
                levels[i].status = torture_single_file_search(tree, mem_ctx,
                                   fname, levels[i].level, levels[i].data_level,
                                   i, &d, &count, &h);
-               CHECK_STATUS(levels[i].status, NT_STATUS_OK);
+               torture_assert_ntstatus_ok_goto(tctx, levels[i].status, ret,
+                                               done, "");
        }
 
        /* get the all_info file into to check against */
        all_info2.generic.level = RAW_FILEINFO_SMB2_ALL_INFORMATION;
        all_info2.generic.in.file.handle = h2;
        status = smb2_getinfo_file(tree, tctx, &all_info2);
-       torture_assert_ntstatus_ok(tctx, status,
-                                  "RAW_FILEINFO_ALL_INFO failed");
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "RAW_FILEINFO_ALL_INFO failed");
 
        alt_info.generic.level = RAW_FILEINFO_ALT_NAME_INFORMATION;
        alt_info.generic.in.file.handle = h2;
        status = smb2_getinfo_file(tree, tctx, &alt_info);
-       torture_assert_ntstatus_ok(tctx, status,
-                                  "RAW_FILEINFO_ALT_NAME_INFO failed");
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "RAW_FILEINFO_ALT_NAME_INFO failed");
 
        internal_info.generic.level = RAW_FILEINFO_INTERNAL_INFORMATION;
        internal_info.generic.in.file.handle = h2;
        status = smb2_getinfo_file(tree, tctx, &internal_info);
-       torture_assert_ntstatus_ok(tctx, status,
-                                  "RAW_FILEINFO_INTERNAL_INFORMATION failed");
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "RAW_FILEINFO_INTERNAL_INFORMATION "
+                                       "failed");
 
 #define CHECK_VAL(name, sname1, field1, v, sname2, field2) do { \
        s = find(name); \
        if (s) { \
                if ((s->sname1.field1) != (v.sname2.out.field2)) { \
-                       printf("(%s) %s/%s [0x%x] != %s/%s [0x%x]\n", \
-                               __location__, \
-                               #sname1, #field1, (int)s->sname1.field1, \
-                               #sname2, #field2, (int)v.sname2.out.field2); \
+                       torture_result(tctx, TORTURE_FAIL, \
+                           "(%s) %s/%s [0x%x] != %s/%s [0x%x]\n", \
+                           __location__, \
+                           #sname1, #field1, (int)s->sname1.field1, \
+                           #sname2, #field2, (int)v.sname2.out.field2); \
                        ret = false; \
                } \
        }} while (0)
@@ -480,12 +479,13 @@ static bool test_one_file(struct torture_context *tctx,
        if (s) { \
                if (s->sname1.field1 != \
                    (~1 & nt_time_to_unix(v.sname2.out.field2))) { \
-                       printf("(%s) %s/%s [%s] != %s/%s [%s]\n", \
-                               __location__, \
-                               #sname1, #field1, \
-                               timestring(tctx, s->sname1.field1), \
-                               #sname2, #field2, \
-                               nt_time_string(tctx, v.sname2.out.field2)); \
+                       torture_result(tctx, TORTURE_FAIL, \
+                           "(%s) %s/%s [%s] != %s/%s [%s]\n", \
+                           __location__, \
+                           #sname1, #field1, \
+                           timestring(tctx, s->sname1.field1), \
+                           #sname2, #field2, \
+                           nt_time_string(tctx, v.sname2.out.field2)); \
                        ret = false; \
                } \
        }} while (0)
@@ -494,12 +494,13 @@ static bool test_one_file(struct torture_context *tctx,
        s = find(name); \
        if (s) { \
                if (s->sname1.field1 != v.sname2.out.field2) { \
-                       printf("(%s) %s/%s [%s] != %s/%s [%s]\n", \
-                               __location__, \
-                               #sname1, #field1, \
-                               nt_time_string(tctx, s->sname1.field1), \
-                               #sname2, #field2, \
-                               nt_time_string(tctx, v.sname2.out.field2)); \
+                       torture_result(tctx, TORTURE_FAIL, \
+                           "(%s) %s/%s [%s] != %s/%s [%s]\n", \
+                           __location__, \
+                           #sname1, #field1, \
+                           nt_time_string(tctx, s->sname1.field1), \
+                           #sname2, #field2, \
+                           nt_time_string(tctx, v.sname2.out.field2)); \
                        ret = false; \
                } \
        }} while (0)
@@ -509,10 +510,11 @@ static bool test_one_file(struct torture_context *tctx,
        if (s) { \
                if (!s->sname1.field1 || \
                    strcmp(s->sname1.field1, v.sname2.out.field2.s)) { \
-                       printf("(%s) %s/%s [%s] != %s/%s [%s]\n", \
-                               __location__, \
-                               #sname1, #field1, s->sname1.field1, \
-                               #sname2, #field2, v.sname2.out.field2.s); \
+                       torture_result(tctx, TORTURE_FAIL, \
+                           "(%s) %s/%s [%s] != %s/%s [%s]\n", \
+                           __location__, \
+                           #sname1, #field1, s->sname1.field1, \
+                           #sname2, #field2, v.sname2.out.field2.s); \
                        ret = false; \
                } \
        }} while (0)
@@ -522,10 +524,11 @@ static bool test_one_file(struct torture_context *tctx,
        if (s) { \
                if (!s->sname1.field1.s || \
                    strcmp(s->sname1.field1.s, v.sname2.out.field2.s)) { \
-                       printf("(%s) %s/%s [%s] != %s/%s [%s]\n", \
-                               __location__, \
-                               #sname1, #field1, s->sname1.field1.s, \
-                               #sname2, #field2, v.sname2.out.field2.s); \
+                       torture_result(tctx, TORTURE_FAIL, \
+                           "(%s) %s/%s [%s] != %s/%s [%s]\n", \
+                           __location__, \
+                           #sname1, #field1, s->sname1.field1.s, \
+                           #sname2, #field2, v.sname2.out.field2.s); \
                        ret = false; \
                } \
        }} while (0)
@@ -535,10 +538,10 @@ static bool test_one_file(struct torture_context *tctx,
        if (s) { \
                if (!s->sname1.field1.s || \
                    strcmp(s->sname1.field1.s, fname)) { \
-                       printf("(%s) %s/%s [%s] != %s\n", \
-                               __location__, \
-                               #sname1, #field1, s->sname1.field1.s, \
-                               fname); \
+                       torture_result(tctx, TORTURE_FAIL, \
+                           "(%s) %s/%s [%s] != %s\n", \
+                           __location__, \
+                           #sname1, #field1, s->sname1.field1.s, fname); \
                        ret = false; \
                } \
        }} while (0)
@@ -548,10 +551,10 @@ static bool test_one_file(struct torture_context *tctx,
        if (s) { \
                if (!s->sname1.field1 || \
                    strcmp(s->sname1.field1, fname)) { \
-                       printf("(%s) %s/%s [%s] != %s\n", \
-                               __location__, \
-                               #sname1, #field1, s->sname1.field1, \
-                               fname); \
+                       torture_result(tctx, TORTURE_FAIL, \
+                          "(%s) %s/%s [%s] != %s\n", \
+                           __location__, \
+                           #sname1, #field1, s->sname1.field1, fname); \
                        ret = false; \
                } \
        }} while (0)
@@ -574,6 +577,7 @@ static bool test_one_file(struct torture_context *tctx,
        CHECK_NTTIME("SMB2_FIND_BOTH_DIRECTORY_INFO",    both_directory_info,   
 create_time, all_info2, all_info2, create_time);
        CHECK_NTTIME("SMB2_FIND_ID_FULL_DIRECTORY_INFO", 
id_full_directory_info, create_time, all_info2, all_info2, create_time);
        CHECK_NTTIME("SMB2_FIND_ID_BOTH_DIRECTORY_INFO", 
id_both_directory_info, create_time, all_info2, all_info2, create_time);
+
        CHECK_NTTIME("SMB2_FIND_DIRECTORY_INFO",         directory_info,        
 access_time, all_info2, all_info2, access_time);
        CHECK_NTTIME("SMB2_FIND_FULL_DIRECTORY_INFO",    full_directory_info,   
 access_time, all_info2, all_info2, access_time);
        CHECK_NTTIME("SMB2_FIND_BOTH_DIRECTORY_INFO",    both_directory_info,   
 access_time, all_info2, all_info2, access_time);
@@ -603,16 +607,16 @@ static bool test_one_file(struct torture_context *tctx,
        CHECK_VAL("SMB2_FIND_ID_FULL_DIRECTORY_INFO",    
id_full_directory_info, ea_size, all_info2, all_info2, ea_size);
        CHECK_VAL("SMB2_FIND_ID_BOTH_DIRECTORY_INFO",    
id_both_directory_info, ea_size, all_info2, all_info2, ea_size);
 
-       CHECK_WSTR("SMB2_FIND_BOTH_DIRECTORY_INFO",      both_directory_info,   
 short_name, alt_info, alt_name_info, fname, STR_UNICODE);
-
        CHECK_NAME("SMB2_FIND_DIRECTORY_INFO",           directory_info,        
 name, fname, STR_TERMINATE_ASCII);
        CHECK_NAME("SMB2_FIND_FULL_DIRECTORY_INFO",      full_directory_info,   
 name, fname, STR_TERMINATE_ASCII);
        CHECK_NAME("SMB2_FIND_NAME_INFO",                name_info,             
 name, fname, STR_TERMINATE_ASCII);
        CHECK_NAME("SMB2_FIND_BOTH_DIRECTORY_INFO",      both_directory_info,   
 name, fname, STR_TERMINATE_ASCII);
        CHECK_NAME("SMB2_FIND_ID_FULL_DIRECTORY_INFO",   
id_full_directory_info, name, fname, STR_TERMINATE_ASCII);
        CHECK_NAME("SMB2_FIND_ID_BOTH_DIRECTORY_INFO",   
id_both_directory_info, name, fname, STR_TERMINATE_ASCII);
-       CHECK_VAL("SMB2_FIND_ID_FULL_DIRECTORY_INFO",    
id_full_directory_info, file_id, internal_info, internal_information, file_id);
 
+       CHECK_WSTR("SMB2_FIND_BOTH_DIRECTORY_INFO",      both_directory_info,   
 short_name, alt_info, alt_name_info, fname, STR_UNICODE);
+
+       CHECK_VAL("SMB2_FIND_ID_FULL_DIRECTORY_INFO",    
id_full_directory_info, file_id, internal_info, internal_information, file_id);
        CHECK_VAL("SMB2_FIND_ID_BOTH_DIRECTORY_INFO",    
id_both_directory_info, file_id, internal_info, internal_information, file_id);
 
 done:
@@ -685,7 +689,7 @@ static NTSTATUS multiple_smb2_search(struct smb2_tree *tree,
                status = smb2_find_level(tree, tree, &f, &count, &d);
                if (NT_STATUS_EQUAL(status, STATUS_NO_MORE_FILES))


-- 
Samba Shared Repository

Reply via email to