s3:tests: Fix smbget test
authorAndreas Schneider <asn@samba.org>
Thu, 7 Dec 2023 08:47:14 +0000 (09:47 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 10 Dec 2023 21:24:38 +0000 (21:24 +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>
selftest/target/Samba3.pm
source3/script/tests/test_smbget.sh

index 01b6c5fc38eb6a6bace761ae21c65f757188812d..0e4ef168f4c6e35d68066a8adb6409d4abf80b54 100755 (executable)
@@ -3597,6 +3597,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