3 # Blackbox test for valid users.
8 Usage: valid_users SERVER SERVER_IP DOMAIN USERNAME PASSWORD PREFIX SMBCLIENT
21 SMBCLIENT
="$VALGRIND ${SMBCLIENT}"
24 incdir
=$
(dirname $0)/..
/..
/..
/testprogs
/blackbox
29 # Test listing a share with valid users succeeds
30 test_valid_users_access
()
32 tmpfile
=$PREFIX/smbclient.
in.$$
39 cmd
='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT -U$USERNAME%$PASSWORD "//$SERVER/$1" -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
45 if [ $ret != 0 ]; then
47 echo "failed accessing share with valid users with error $ret"
53 echo "$out" |
grep "$prompt" >/dev
/null
2>&1
57 # got the correct prompt .. succeed
61 echo "failed listing share with valid users"
66 testit
"accessing a valid users share succeeds" \
67 test_valid_users_access valid-users-access ||
68 failed
=$
(expr $failed + 1)