summaryrefslogtreecommitdiffstats
path: root/debian/tests/smbclient-share-access
blob: b124c0c3bdefa37b11c6ddae279cfef95326627c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -x
set -e

. debian/tests/util

username="smbtest$$"
password="$$"
add_user "${username}" "${password}"

myshare="myshare$$"
add_share "${myshare}"

echo "Creating file with random data and computing its md5"
populate_share "${myshare}" "${username}"

rm -f downloaded-data
echo "Downloading file and comparing its md5"
smbclient //localhost/"${myshare}" -U "${username}"%"${password}" -c "get data downloaded-data"

mv -f downloaded-data data
md5sum -c data.md5