mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
7ba732bac1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14765 RN: add new smb.conf parameter "volume serial number" to allow overriding the generated default value Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed=by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jun 6 17:42:37 UTC 2022 on sn-devel-184
38 lines
859 B
Bash
Executable File
38 lines
859 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# This verifies setting the volume serial number parameter for a share works.
|
|
#
|
|
|
|
if [ $# -lt 5 ]; then
|
|
echo "Usage: $0 SERVER_IP USERNAME PASSWORD SHARENAME SMBCLIENT"
|
|
exit 1
|
|
fi
|
|
|
|
SERVER_IP="$1"
|
|
USERNAME="$2"
|
|
PASSWORD="$3"
|
|
SHARENAME="$4"
|
|
SMBCLIENT="$5"
|
|
|
|
SMBCLIENT="$VALGRIND ${SMBCLIENT}"
|
|
failed=0
|
|
|
|
incdir=$(dirname "$0")/../../../testprogs/blackbox
|
|
. "$incdir/subunit.sh"
|
|
|
|
test_serial_number() {
|
|
|
|
output=$($SMBCLIENT "//$SERVER_IP/$SHARENAME" -U "$USERNAME%$PASSWORD" -c "volume") || return 1
|
|
echo "smbclient volume on $SHARENAME returned: \"$output\""
|
|
|
|
expected="0xdeadbeef"
|
|
echo "$output" | grep $expected || {
|
|
echo "Expected output containing \"$expected\", got: \"$output\""
|
|
return 1
|
|
}
|
|
}
|
|
|
|
testit "volume serial number for share $SHARENAME" test_serial_number || failed=$((failed+1))
|
|
|
|
exit "$failed"
|