]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-selftest: test netsamlogoncache entry expiry
authorGünther Deschner <gd@samba.org>
Tue, 10 Feb 2026 09:21:06 +0000 (10:21 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 22 Jul 2026 12:42:55 +0000 (12:42 +0000)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Jul 22 12:42:55 UTC 2026 on atb-devel-224

source3/script/tests/test_net_cache_samlogon.sh

index 671806a5e876a7da96aebaf258be4ebea013c67e..7e8103bc582b65190746075888db179e575e85bb 100755 (executable)
@@ -40,4 +40,13 @@ tmp=$($BINDIR/net cache samlogon ndrdump $usersid | head -n 1 | grep "netr_SamIn
 retval=$?
 testit "net cache samlogon ndrdump returns netr_SamInfo3 structure" test $retval -eq 0 || failed=$(expr $failed + 1)
 
+# Test that we can expire a samlogon cache entry
+timeout=1
+sleep $(($timeout + 1 ))
+
+testit_expect_failure "net cache samlogon show $usersid --option=netsamlogoncache:timeout=$timeout" \
+       $BINDIR/net cache samlogon show $usersid \
+       --option=netsamlogoncache:timeout=$timeout ||
+       failed=$(expr $failed + 1)
+
 testok $0 $failed