summaryrefslogtreecommitdiffstats
path: root/debian/tests/smbclient-authenticated-share-list
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/smbclient-authenticated-share-list')
-rw-r--r--debian/tests/smbclient-authenticated-share-list18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/tests/smbclient-authenticated-share-list b/debian/tests/smbclient-authenticated-share-list
new file mode 100644
index 0000000..9fcaf43
--- /dev/null
+++ b/debian/tests/smbclient-authenticated-share-list
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -x
+set -e
+
+. debian/tests/util
+
+username="smbtest$$"
+password="$$"
+
+add_user "${username}" "${password}"
+
+echo "Testing with incorrect password: must fail"
+smbclient -L localhost -U "${username}"%wrongpass && exit 1
+
+echo "Testing with correct password: must work"
+smbclient -L localhost -U "${username}"%"${password}"
+