summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorcvs2svn Import User <samba-bugs@samba.org>2001-06-28 05:57:57 +0000
committercvs2svn Import User <samba-bugs@samba.org>2001-06-28 05:57:57 +0000
commit8e7f3fb4f8e83509c5cf91e4b7398360501c5de7 (patch)
tree3a03267d2206bf86171b8f67144643c6b9d0aca8 /testsuite
parentd743c48c9ca851dd6f0239435cb2167eb02b63d7 (diff)
parent0d112d7960353b33e9c5015c39a107a47e6f690d (diff)
downloadsamba-8e7f3fb4f8e83509c5cf91e4b7398360501c5de7.tar.gz
samba-8e7f3fb4f8e83509c5cf91e4b7398360501c5de7.tar.xz
samba-8e7f3fb4f8e83509c5cf91e4b7398360501c5de7.zip
This commit was manufactured by cvs2svn to create branch 'SAMBA_2_2'.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/build_farm/basicsmb.fns63
-rw-r--r--testsuite/build_farm/basicsmb.smb.conf.template37
2 files changed, 100 insertions, 0 deletions
diff --git a/testsuite/build_farm/basicsmb.fns b/testsuite/build_farm/basicsmb.fns
new file mode 100644
index 00000000000..3929c48a399
--- /dev/null
+++ b/testsuite/build_farm/basicsmb.fns
@@ -0,0 +1,63 @@
+test_smb_conf_setup() {
+ cat basicsmb.smb.conf.template | \
+ sed "s|PREFIX|$prefix|g" | \
+ sed "s|BUILD_FARM|$pwd|g" | \
+ sed "s|WHOAMI|$whoami|g" \
+ > $prefix/lib/smb.conf
+
+ echo "127.0.0.1 localhost">$prefix/lib/lmhosts
+ echo "127.0.0.1 SHARE">>$prefix/lib/lmhosts
+ echo "127.0.0.1 USER">>$prefix/lib/lmhosts
+ echo "127.0.0.1 SERVER">>$prefix/lib/lmhosts
+ echo "127.0.0.1 DOMAIN">>$prefix/lib/lmhosts
+ cp -f basicsmb.smb.conf.share $prefix/lib/smb.conf.share
+ cp -f basicsmb.smb.conf.user $prefix/lib/smb.conf.user
+ cp -f basicsmb.smb.conf.server $prefix/lib/smb.conf.server
+ cp -f basicsmb.smb.conf.domain $prefix/lib/smb.conf.domain
+ touch $prefix/lib/smb.conf.
+ touch $prefix/lib/smb.conf.localhost
+}
+
+test_smbpasswd() {
+ test_smbpasswd_password="$1"
+ rm -f $prefix/private/smbpasswd
+ echo "( echo $test_smbpasswd_password ; echo $test_smbpasswd_password; ) | $prefix/bin/smbpasswd -L -s -a $whoami"
+ ( echo $password ; echo $password; ) | $prefix/bin/smbpasswd -L -s -a $whoami
+ status=$?
+ if [ $status = 0 ]; then
+ echo "smbpasswd correctly set inital password ($test_smbpasswd_password)"
+ else
+ echo "smbpasswd failed to set inital password ($test_smbpasswd_password)! (status $status)"
+ return 1
+ fi
+ return 0
+}
+
+test_listfilesauth() {
+ remote_name="$1"
+ echo $prefix/bin/smbclient//$remote_name/samba -n buildclient -U$whoami%$password -c 'ls'
+ $prefix/bin/smbclient //$remote_name/samba -n buildclient -U$whoami%$password -c 'ls'
+ status=$?
+ if [ $status = 0 ]; then
+ echo "listed files OK"
+ else
+ echo "listing files with smbd failed with status $status"
+ return 1
+ fi
+ return 0
+}
+
+test_listfilesnpw() {
+ remote_name="$1"
+ echo $prefix/bin/smbclient //$remote_name/samba -n buildclient -U$whoami% -c 'ls'
+ $prefix/bin/smbclient //$remote_name/samba -n buildclient -U$whoami% -c 'ls'
+ status=$?
+ if [ $status = 0 ]; then
+ echo "smbd listed files with NO PASSWORD on an authenticated share!"
+ return 1
+ else
+ echo "listing files with smbd failed with status $status (correct)"
+ fi
+ return 0
+}
+
diff --git a/testsuite/build_farm/basicsmb.smb.conf.template b/testsuite/build_farm/basicsmb.smb.conf.template
new file mode 100644
index 00000000000..78f1da3d4ef
--- /dev/null
+++ b/testsuite/build_farm/basicsmb.smb.conf.template
@@ -0,0 +1,37 @@
+[global]
+ netbios name = BUILDFARM
+ workgroup = TESTWG
+ log level = 3
+ debug timestamp = no
+ encrypt passwords = yes
+ server string = Samba %v Build Farm Tests
+ name resolve order = lmhosts
+ guest account = WHOAMI
+ domain logons = yes
+
+ include = PREFIX/lib/smb.conf.%L
+
+[test]
+ path = PREFIX/testdir
+ read only = no
+
+[samba]
+ path = BUILD_FARM/samba
+ read only = yes
+ comment = Samba HEAD Sources
+
+[samba_2_2]
+ path = BUILD_FARM/samba_2_2
+ read only = yes
+ comment = Samba 2.2. Sources
+
+[rsync]
+ path = BUILD_FARM/rsync
+ read only = yes
+ comment = Rsync Sources
+
+[guest_share]
+ path = PREFIX
+ guest ok = yes
+ read only = yes
+ comment = Unauthenticated share for use in share level test \ No newline at end of file