s3:tests: Fix smbget test
authorAndreas Schneider <asn@samba.org>
Thu, 7 Dec 2023 08:47:14 +0000 (09:47 +0100)
committerJule Anger <janger@samba.org>
Tue, 12 Dec 2023 09:02:18 +0000 (09:02 +0000)
Time to fix the smget share to not have `guest ok = yes` set. A new
[smbget_guest] will be used for guest only tests. This way we can
correctly test different authentication mechanisms.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15532

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit c46769f3f10d21ed802e17aa79ae17e345168e63)

selftest/target/Samba3.pm
source3/script/tests/test_smbget.sh

index 8755d0a2f1f73059a0f272d7abfeca96409d21fa..2c69993c56ad0884ef8430d35b920d11480b3489 100755 (executable)
@@ -3587,6 +3587,10 @@ sub provision($$)
 [smbget]
        path = $smbget_sharedir
        comment = smb username is [%U]
+
+[smbget_guest]
+       path = $smbget_sharedir
+       comment = smb username is [%U]
        guest ok = yes
 
 include = $aliceconfdir/%U.conf
index 1956fc5b38e3c8b0840922c293aec55c621fd375..0af28c6ff89f303a016c4ac76f2456f041dce253 100755 (executable)
@@ -57,8 +57,8 @@ clear_download_area()
 test_singlefile_guest()
 {
        clear_download_area
-       echo "$SMBGET --verbose --guest smb://$SERVER_IP/smbget/testfile"
-       $SMBGET --verbose --guest smb://$SERVER_IP/smbget/testfile
+       echo "$SMBGET --verbose --guest smb://$SERVER_IP/smbget_guest/testfile"
+       $SMBGET --verbose --guest smb://$SERVER_IP/smbget_guest/testfile
        if [ $? -ne 0 ]; then
                echo 'ERROR: RC does not match, expected: 0'
                return 1
@@ -376,9 +376,9 @@ test_msdfs_link_upn()
 test_limit_rate()
 {
        clear_download_area
-       echo "$SMBGET --verbose --guest --limit-rate 100 smb://$SERVER_IP/smbget/testfile"
+       echo "$SMBGET --verbose --guest --limit-rate 100 smb://$SERVER_IP/smbget_guest/testfile"
        time_begin=$(date +%s)
-       $SMBGET --verbose --guest --limit-rate 100 smb://$SERVER_IP/smbget/testfile
+       $SMBGET --verbose --guest --limit-rate 100 smb://$SERVER_IP/smbget_guest/testfile
        if [ $? -ne 0 ]; then
                echo 'ERROR: RC does not match, expected: 0'
                return 1