5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright 2010 Sun Microsystems, Inc. All rights reserved.
31 # Verify smbmount can mount 2 private shares
34 # 1. run "mount -F smbfs -o dirperms=777,fileperms=666
35 # //$AUSER:$APASS@$server/$AUSER $TMNT"
36 # 2 mount successfully
37 # 3. run "mount -F smbfs -o dirperms=777,fileperms=666
38 # //$BUSER:$BPASS@$server/$BUSER $TMNT2"
39 # 4 mount successfully
42 .
$STF_SUITE/include
/libtest.ksh
45 tc_desc
="Verify smbmount can mount 2 private shares"
46 print_test_case
$tc_id - $tc_desc
48 if [[ $STC_CIFS_CLIENT_DEBUG == 1 ]] || \
49 [[ *:${STC_CIFS_CLIENT_DEBUG}:* == *:$tc_id:* ]]; then
53 server
=$
(server_name
) ||
return
55 # SKIP for now (mount priv issues)
64 cmd
="mount -F smbfs -o noprompt,dirperms=777,fileperms=666
65 //$AUSER:$APASS@$server/a_share $TMNT"
66 cti_execute
-i '' FAIL
$cmd
67 if [[ $?
!= 0 ]]; then
68 cti_fail
"FAIL: smbmount can't mount the share a_share"
71 cti_report
"PASS: smbmount can mount the share a_share"
74 smbmount_check
$TMNT ||
return
76 cmd
="cp /usr/bin/ls $TMNT/ls_file"
77 cti_execute FAIL sudo
-n -u $AUSER $cmd
79 cmd
="diff /usr/bin/ls $TMNT/ls_file"
80 cti_execute FAIL sudo
-n -u $AUSER $cmd
82 cmd
="mount -F smbfs -o noprompt,dirperms=777,fileperms=666
83 //$BUSER:$BPASS@$server/$BUSER $TMNT2"
84 cti_execute
-i '' FAIL
$cmd
86 smbmount_check
$TMNT ||
return
88 cmd
="cp /usr/bin/ls $TMNT/ls_file"
89 cti_execute FAIL sudo
-n -u $AUSER $cmd
91 cmd
="diff /usr/bin/ls $TMNT/ls_file"
92 cti_execute FAIL sudo
-n -u $AUSER $cmd
96 if [[ $?
!= 0 ]]; then
97 cti_fail
"FAIL: failed to umount the $TMNT"
100 cti_report
"PASS: umount the $TMNT successfully"
105 if [[ $?
!= 0 ]]; then
106 cti_fail
"FAIL: failed to umount the $TMNT2"
108 cti_report
"PASS: umount the $TMNT2 successfully"
112 smbmount_clean
$TMNT2
114 cti_pass
"${tc_id}: PASS"