]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture:libsmbclient: make use of PROTOCOL_* enum values instead of of hardcoded...
authorStefan Metzmacher <metze@samba.org>
Fri, 9 Jul 2021 12:58:24 +0000 (14:58 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Jul 2021 00:06:31 +0000 (00:06 +0000)
We should also test protocol versions which are not our default.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/libsmbclient/libsmbclient.c
testdata/samba3/smb_new.conf

index 1ae7c4ee6fc3c939b366d797cd339baa30fda5dc..669189d77851a20de430b8850e7c79de7ca3161e 100644 (file)
@@ -26,6 +26,7 @@
 #include "torture/libsmbclient/proto.h"
 #include "lib/param/loadparm.h"
 #include "lib/param/param_global.h"
+#include "libcli/smb/smb_constants.h"
 #include "dynconfig.h"
 #include "lib/util/time.h"
 
@@ -210,10 +211,10 @@ static bool torture_libsmbclient_setConfiguration(struct torture_context *tctx)
                        "NEW_WORKGROUP",
                        "smbc_setConfiguration failed, "
                        "'workgroup' not updated");
-       torture_assert_int_equal(tctx, global_config->client_min_protocol, 7,
+       torture_assert_int_equal(tctx, global_config->client_min_protocol, PROTOCOL_NT1,
                        "smbc_setConfiguration failed, 'client min protocol' "
                        "not updated");
-       torture_assert_int_equal(tctx, global_config->_client_max_protocol, 13,
+       torture_assert_int_equal(tctx, global_config->_client_max_protocol, PROTOCOL_SMB3_00,
                        "smbc_setConfiguration failed, 'client max protocol' "
                        "not updated");
        torture_assert_int_equal(tctx, global_config->client_signing, 1,
index 727e18ba7c9dae41adad6866a7beeace3b08cf24..d82c48c75af318936860778d24f3833b896e5e89 100644 (file)
@@ -1,7 +1,7 @@
 [global]
    workgroup = NEW_WORKGROUP
-   client min protocol = SMB2
-   client max protocol = SMB3
+   client min protocol = NT1
+   client max protocol = SMB3_00
    client signing = 1
    deadtime = 5
    netbios name = BEDWYR
\ No newline at end of file