summaryrefslogtreecommitdiff
path: root/testsuite/build_farm/basicsmb-hostsequiv.test
blob: 0df086e910e5d28cb814ed6e5b805c9c33427b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if [ $whoami = "root" ]; then
	exit 0;
fi

. basicsmb.fns

test_listfilesrootnpw() {
	remote_name="$1"
	echo $prefix/bin/smbclient //$remote_name/samba -n buildclient -Uroot%  -c 'ls'
	$prefix/bin/smbclient //$remote_name/samba -n buildclient -Uroot% -c 'ls'
	status=$?
	if [ $status = 0 ]; then
		echo "smbd listed files AS ROOT with NO PASSWORD (hosts equiv test)!"
		return 1
	else 
		echo "listing files with smbd failed with status $status (correct)"
	fi
	return 0
}

password="not-a-valid-password"
security="hostsequiv"
(test_smb_conf_setup ) || exit 1

(test_listfilesauth $security) || exit 1
# (test_listfilesrootnpw $security) || exit 1
# Unfortuetly we map to guest, and this is allowed access due to a BUG.  This
# test disabled till we fix it.