selftest: Test for bug 15062 -- list "username" in netshareenum
[Samba.git] / source3 / script / tests / test_user_in_sharelist.sh
blob1abd554f90b535ac95bc09e2331ddfbc2c7995df
1 #!/bin/bash
3 if [ $# -lt 2 ]; then
4 echo Usage: $0 RPCCLIENT SERVER
5 exit 1
6 fi
8 incdir=$(dirname $0)/../../../testprogs/blackbox
9 . $incdir/subunit.sh
11 failed=0
13 RPCCLIENT="$1"; shift 1
14 SERVER="$1"; shift 1
16 "${RPCCLIENT}" "${SERVER}" -U"${USER}"%"${PASSWORD}" -c netshareenum |
17 grep "^netname: $USER\$"
18 RC=$?
19 testit "Verify username is listed in netshareenum due to [homes]" \
20 test $RC = 0 || failed=$((failed+1))
22 testok $0 $failed