tombstones-expunge: Add a test for deleting links to recycled objects
[Samba.git] / source3 / script / tests / test_shareenum.sh
blob3904b519d549b8d63af1c72962052165766641f0
1 #!/bin/sh
3 # this tests share enumeration with "access based share enum"
5 if [ $# -lt 4 ]; then
6 cat <<EOF
7 Usage: $0 SERVER USERNAME PASSWORD RPCCLIENT
8 EOF
9 exit 1;
12 SERVER="$1"
13 USERNAME="$2"
14 PASSWORD="$3"
15 RPCCLIENT="$4"
16 RPCCLIENT="$VALGRIND ${RPCCLIENT}"
18 incdir=`dirname $0`/../../../testprogs/blackbox
19 . $incdir/subunit.sh
21 user_see_share() {
22 local user=$1
23 local share=$2
24 $RPCCLIENT //$SERVER -U$user%$PASSWORD -c "netshareenumall" | grep $share > /dev/null 2>&1
27 testit "$USERNAME sees tmp" user_see_share $USERNAME tmp
28 testit "$USERNAME sees valid-users-tmp" user_see_share $USERNAME valid-users-tmp
29 testit "force_user sees tmp" user_see_share force_user tmp
30 testit_expect_failure "force_user does not see valid-users-tmp" user_see_share force_user valid-users-tmp