[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Fri Jun 10 14:52:01 UTC 2022


The branch, master has been updated
       via  6f3e03a6e34 s3:tests: Reformat test_smbclient_ntlm.sh
       via  f5ecc95876f s3:tests: Reformat test_smbclient_netbios_aliases.sh
       via  c4d0c741ebe s3:tests: Reformat test_smbclient_mget.sh
       via  07d07b70eb8 s3:tests: Reformat test_smbclient_machine_auth.sh
       via  58e815f2a2f s3:tests: Reformat test_smbclient_log_basename.sh
       via  3b672457da5 s3:tests: Reformat test_smbclient_list_servers.sh
       via  b828964f5f0 s3:tests: Reformat test_smbclient_large_file.sh
       via  20e0fef9e45 s3:tests: Reformat test_smbclient_krb5.sh
       via  6513aa1d8d5 s3:tests: Reformat test_smbclient_kerberos.sh
       via  6990e65555c s3:tests: Reformat test_smbclient_iconv.sh
       via  bb626437f7a s3:tests: Reformat test_smbclient_encryption_off.sh
       via  144f17928f6 s3:tests: Reformat test_smbclient_encryption.sh
       via  c112b07337e s3:tests: Reformat test_smbclient_basic.sh
       via  c0e1566e25e s3:tests: Reformat test_smbclient_auth.sh
       via  ec0291264c4 s3:tests: Reformat test_smbXsrv_client_dead_rec.sh
       via  a63c7e7ed5a s3:tests: Reformat test_smb2_not_casesensitive.sh
       via  13795515eb2 s3:tests: Reformat test_smb1_system_security.sh
       via  d637255f6bf s3:tests: Reformat test_smb1_shadow_copy_torture.sh
       via  f1a8afe650e s3:tests: Reformat test_sharesec.sh
       via  a4ff172feec s3:tests: Reformat test_shareenum.sh
       via  6395813ca09 s3:tests: Reformat test_shadow_copy_torture.sh
       via  b1cddccf12c s3:tests: Reformat test_sacl_set_get.sh
      from  b22ddf5ee9c gitlab-ci: Add jq

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6f3e03a6e3404bcdd80e9a867588af5ccc2b2526
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_smbclient_ntlm.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Fri Jun 10 14:51:39 UTC 2022 on sn-devel-184

commit f5ecc95876f7a3d7883063f6228af21b6a3ed14f
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_smbclient_netbios_aliases.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit c4d0c741ebea571776d4686fe3e46c54c2727995
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_smbclient_mget.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 07d07b70eb8e91c333969962c46b29241b0e98e9
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_smbclient_machine_auth.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 58e815f2a2f65da094acf1a769aed3dbfcc44c76
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_smbclient_log_basename.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 3b672457da5d99b8d6dfff97739a40a4a1d73e6d
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_smbclient_list_servers.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit b828964f5f01289dfe98c3908f57ccfd0ec89f1e
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_smbclient_large_file.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 20e0fef9e454b44d357035934d7cf37b5cfd883f
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smbclient_krb5.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 6513aa1d8d5cad2e6be207594f82e59d6eba58c5
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smbclient_kerberos.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 6990e65555c553e1db01e79fb3052fd272fa7b08
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smbclient_iconv.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit bb626437f7a546360b480ad4932af0013fd057af
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smbclient_encryption_off.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 144f17928f62cfb08978a6b86d8fcb7507caa588
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smbclient_encryption.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit c112b07337ea1aba43802529c71fa9aec708bcf3
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smbclient_basic.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit c0e1566e25e221d50b987c4c350308ca820b6ccc
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smbclient_auth.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit ec0291264c4f048d952fba83fdc2b1aedf26cbb8
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smbXsrv_client_dead_rec.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit a63c7e7ed5a8aece9381cb02d2bca3d66257c2dc
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smb2_not_casesensitive.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 13795515eb25f02334853299941f820102fe85d0
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smb1_system_security.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit d637255f6bf100c18f3171126d72e5ba570e54fd
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_smb1_shadow_copy_torture.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit f1a8afe650eb8e645d7a940ec89cf789436affb1
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_sharesec.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit a4ff172feecf33c16b9360aeaefc7b801371cab3
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_shareenum.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 6395813ca092228c3e28ad624c385c519efa5f92
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_shadow_copy_torture.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit b1cddccf12c45e48570242c6c6a03ff5974c93d8
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:10 2022 +0200

    s3:tests: Reformat test_sacl_set_get.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/script/tests/test_sacl_set_get.sh          |  27 +--
 source3/script/tests/test_shadow_copy_torture.sh   | 239 ++++++++++-----------
 source3/script/tests/test_shareenum.sh             |  15 +-
 source3/script/tests/test_sharesec.sh              |  74 +++----
 .../script/tests/test_smb1_shadow_copy_torture.sh  |  46 ++--
 source3/script/tests/test_smb1_system_security.sh  |  27 +--
 .../script/tests/test_smb2_not_casesensitive.sh    |  25 ++-
 .../script/tests/test_smbXsrv_client_dead_rec.sh   |  19 +-
 source3/script/tests/test_smbclient_auth.sh        |  32 +--
 source3/script/tests/test_smbclient_basic.sh       |  16 +-
 source3/script/tests/test_smbclient_encryption.sh  |  46 ++--
 .../script/tests/test_smbclient_encryption_off.sh  |  42 ++--
 source3/script/tests/test_smbclient_iconv.sh       |  36 ++--
 source3/script/tests/test_smbclient_kerberos.sh    |  67 +++---
 source3/script/tests/test_smbclient_krb5.sh        |   8 +-
 source3/script/tests/test_smbclient_large_file.sh  |  52 ++---
 .../script/tests/test_smbclient_list_servers.sh    |  32 +--
 .../script/tests/test_smbclient_log_basename.sh    |  10 +-
 .../script/tests/test_smbclient_machine_auth.sh    |   6 +-
 source3/script/tests/test_smbclient_mget.sh        |  34 +--
 .../script/tests/test_smbclient_netbios_aliases.sh |   8 +-
 source3/script/tests/test_smbclient_ntlm.sh        |  12 +-
 22 files changed, 439 insertions(+), 434 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_sacl_set_get.sh b/source3/script/tests/test_sacl_set_get.sh
index 68a9057d4ce..3d36f57d2e2 100755
--- a/source3/script/tests/test_sacl_set_get.sh
+++ b/source3/script/tests/test_sacl_set_get.sh
@@ -6,8 +6,8 @@
 #
 
 if [ $# -lt 7 ]; then
-    echo "Usage: $0 SERVER SERVER_IP USERNAME PASSWORD SMBTORTURE3 NET SHARE"
-    exit 1
+	echo "Usage: $0 SERVER SERVER_IP USERNAME PASSWORD SMBTORTURE3 NET SHARE"
+	exit 1
 fi
 
 SERVER="$1"
@@ -20,25 +20,26 @@ SHARE="$7"
 
 failed=0
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
-sacl_set_get() {
-    out=$($SMBTORTURE3 //$SERVER_IP/$SHARE -U $USERNAME%$PASSWORD SMB2-SACL)
-    if [ $? -ne 0 ] ; then
-	echo "SMB2-SACL failed"
-	echo "$out"
-	return 1
-    fi
+sacl_set_get()
+{
+	out=$($SMBTORTURE3 //$SERVER_IP/$SHARE -U $USERNAME%$PASSWORD SMB2-SACL)
+	if [ $? -ne 0 ]; then
+		echo "SMB2-SACL failed"
+		echo "$out"
+		return 1
+	fi
 }
 
 # Grant SeSecurityPrivilege to the user
-testit "grant SeSecurityPrivilege" $NET rpc rights grant $USERNAME SeSecurityPrivilege -U $USERNAME%$PASSWORD -I $SERVER_IP || failed=`expr $failed + 1`
+testit "grant SeSecurityPrivilege" $NET rpc rights grant $USERNAME SeSecurityPrivilege -U $USERNAME%$PASSWORD -I $SERVER_IP || failed=$(expr $failed + 1)
 
 # Run the tests.
-testit "SACL set_get" sacl_set_get || failed=`expr $failed + 1`
+testit "SACL set_get" sacl_set_get || failed=$(expr $failed + 1)
 
 # Revoke SeSecurityPrivilege
-testit "revoke SeSecurityPrivilege" $NET rpc rights revoke $USERNAME SeSecurityPrivilege -U $USERNAME%$PASSWORD -I $SERVER_IP || failed=`expr $failed + 1`
+testit "revoke SeSecurityPrivilege" $NET rpc rights revoke $USERNAME SeSecurityPrivilege -U $USERNAME%$PASSWORD -I $SERVER_IP || failed=$(expr $failed + 1)
 
 exit $failed
diff --git a/source3/script/tests/test_shadow_copy_torture.sh b/source3/script/tests/test_shadow_copy_torture.sh
index 8f9d1be6927..f21e98044c3 100755
--- a/source3/script/tests/test_shadow_copy_torture.sh
+++ b/source3/script/tests/test_shadow_copy_torture.sh
@@ -4,10 +4,10 @@
 #
 
 if [ $# -lt 7 ]; then
-cat <<EOF
+	cat <<EOF
 Usage: test_shadow_copy SERVER SERVER_IP DOMAIN USERNAME PASSWORD WORKDIR SMBTORTURE SMBCLIENT
 EOF
-exit 1;
+	exit 1
 fi
 
 SERVER=${1}
@@ -20,7 +20,7 @@ SMBTORTURE="$VALGRIND ${7}"
 SMBCLIENT="$VALGRIND ${8}"
 shift 7
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 SNAPSHOT="@GMT-2015.10.31-19.40.30"
@@ -32,182 +32,181 @@ cd $SELFTEST_TMPDIR || exit 1
 # build a hierarchy of files, symlinks, and directories
 build_files()
 {
-    local destdir
-    destdir=$1
+	local destdir
+	destdir=$1
 
-    echo "$content" > $destdir/foo
+	echo "$content" >$destdir/foo
 
-    mkdir -p $WORKDIR/subdir/
-    touch $WORKDIR/subdir/hardlink
+	mkdir -p $WORKDIR/subdir/
+	touch $WORKDIR/subdir/hardlink
 }
 
 # build a snapshots directory
 build_snapshots()
 {
-    local snapdir
+	local snapdir
 
-    snapdir=$WORKDIR/.snapshots
+	snapdir=$WORKDIR/.snapshots
 
-    mkdir -p $snapdir/$SNAPSHOT
+	mkdir -p $snapdir/$SNAPSHOT
 
-    build_files $snapdir/$SNAPSHOT
+	build_files $snapdir/$SNAPSHOT
 
-    mkdir -p $snapdir/$SNAPSHOT/subdir
-    ln "$WORKDIR"/subdir/hardlink "$snapdir"/$SNAPSHOT/subdir/hardlink
+	mkdir -p $snapdir/$SNAPSHOT/subdir
+	ln "$WORKDIR"/subdir/hardlink "$snapdir"/$SNAPSHOT/subdir/hardlink
 }
 
 build_stream_on_snapshot()
 {
-    file=$WORKDIR/.snapshots/$SNAPSHOT/foo
+	file=$WORKDIR/.snapshots/$SNAPSHOT/foo
 
-    setfattr -n 'user.DosStream.bar:$DATA' -v baz $file || return 1
+	setfattr -n 'user.DosStream.bar:$DATA' -v baz $file || return 1
 }
 
 test_shadow_copy_write()
 {
-    local msg
-
-    msg=$1
-
-    #delete snapshots from previous tests
-    find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
-    build_snapshots
-
-    testit "writing to shadow copy of a file" \
-	   $SMBTORTURE \
-	   -U$USERNAME%$PASSWORD \
-	   "//$SERVER/shadow_write" \
-	   --option="torture:twrp_file=foo" \
-	   --option="torture:twrp_snapshot=$SNAPSHOT" \
-	   smb2.twrp.write || \
-        failed=`expr $failed + 1`
+	local msg
+
+	msg=$1
+
+	#delete snapshots from previous tests
+	find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
+	build_snapshots
+
+	testit "writing to shadow copy of a file" \
+		$SMBTORTURE \
+		-U$USERNAME%$PASSWORD \
+		"//$SERVER/shadow_write" \
+		--option="torture:twrp_file=foo" \
+		--option="torture:twrp_snapshot=$SNAPSHOT" \
+		smb2.twrp.write ||
+		failed=$(expr $failed + 1)
 }
 
-
 test_shadow_copy_stream()
 {
-    local msg
+	local msg
 
-    msg=$1
+	msg=$1
 
-    #delete snapshots from previous tests
-    find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
-    build_snapshots
-    build_stream_on_snapshot || {
-	subunit_start_test msg
-	subunit_skip_test msg <<EOF
+	#delete snapshots from previous tests
+	find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
+	build_snapshots
+	build_stream_on_snapshot || {
+		subunit_start_test msg
+		subunit_skip_test msg <<EOF
 test_shadow_copy_stream needs an fs with xattrs
 EOF
-	return 0
-    }
-
-    testit "reading stream of a shadow copy of a file" \
-	   $SMBTORTURE \
-	   -U$USERNAME%$PASSWORD \
-	   "//$SERVER/shadow_write" \
-	   --option="torture:twrp_file=foo" \
-	   --option="torture:twrp_stream=bar" \
-	   --option="torture:twrp_stream_size=3" \
-	   --option="torture:twrp_snapshot=$SNAPSHOT" \
-	   smb2.twrp.stream || \
-        failed=`expr $failed + 1`
+		return 0
+	}
+
+	testit "reading stream of a shadow copy of a file" \
+		$SMBTORTURE \
+		-U$USERNAME%$PASSWORD \
+		"//$SERVER/shadow_write" \
+		--option="torture:twrp_file=foo" \
+		--option="torture:twrp_stream=bar" \
+		--option="torture:twrp_stream_size=3" \
+		--option="torture:twrp_snapshot=$SNAPSHOT" \
+		smb2.twrp.stream ||
+		failed=$(expr $failed + 1)
 }
 
 test_shadow_copy_openroot()
 {
-    local msg
+	local msg
 
-    msg=$1
+	msg=$1
 
-    #delete snapshots from previous tests
-    find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
-    build_snapshots
+	#delete snapshots from previous tests
+	find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
+	build_snapshots
 
-    testit "opening shadow copy root of share" \
-	   $SMBTORTURE \
-	   -U$USERNAME%$PASSWORD \
-	   "//$SERVER/shadow_write" \
-	   --option="torture:twrp_snapshot=$SNAPSHOT" \
-	   smb2.twrp.openroot || \
-        failed=`expr $failed + 1`
+	testit "opening shadow copy root of share" \
+		$SMBTORTURE \
+		-U$USERNAME%$PASSWORD \
+		"//$SERVER/shadow_write" \
+		--option="torture:twrp_snapshot=$SNAPSHOT" \
+		smb2.twrp.openroot ||
+		failed=$(expr $failed + 1)
 }
 
 test_shadow_copy_fix_inodes()
 {
-    local msg
+	local msg
 
-    msg=$1
+	msg=$1
 
-    #delete snapshots from previous tests
-    find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
-    build_snapshots
+	#delete snapshots from previous tests
+	find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
+	build_snapshots
 
-    out=$($SMBCLIENT \
-	   -U $USERNAME%$PASSWORD \
-	   "//$SERVER/shadow_write" \
-	   -c "open $SNAPSHOT/subdir/hardlink") || failed=`expr $failed + 1`
-    echo $out
-    echo $out | grep "hardlink: for read/write fnum 1" || return 1
+	out=$($SMBCLIENT \
+		-U $USERNAME%$PASSWORD \
+		"//$SERVER/shadow_write" \
+		-c "open $SNAPSHOT/subdir/hardlink") || failed=$(expr $failed + 1)
+	echo $out
+	echo $out | grep "hardlink: for read/write fnum 1" || return 1
 }
 
 build_hiddenfile()
 {
-    local snapdir
+	local snapdir
 
-    snapdir=$WORKDIR/.snapshots
+	snapdir=$WORKDIR/.snapshots
 
-    #delete snapshots from previous tests
-    find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
-    build_snapshots
+	#delete snapshots from previous tests
+	find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
+	build_snapshots
 
-    touch $WORKDIR/hiddenfile
+	touch $WORKDIR/hiddenfile
 
-    # Create a file with hidden attribute
-    $SMBCLIENT -U $USERNAME%$PASSWORD \
-	       "//$SERVER/shadow_write" \
-	       -c "put $WORKDIR/hiddenfile hiddenfile; setmode hiddenfile +h"
-    # ...and move it to the snapshot directory
-    mv $WORKDIR/hiddenfile $snapdir/$SNAPSHOT/
+	# Create a file with hidden attribute
+	$SMBCLIENT -U $USERNAME%$PASSWORD \
+		"//$SERVER/shadow_write" \
+		-c "put $WORKDIR/hiddenfile hiddenfile; setmode hiddenfile +h"
+	# ...and move it to the snapshot directory
+	mv $WORKDIR/hiddenfile $snapdir/$SNAPSHOT/
 }
 
 test_hiddenfile()
 {
-    build_hiddenfile
-
-    out=$($SMBCLIENT \
-	   -U $USERNAME%$PASSWORD \
-	   "//$SERVER/shadow_write" \
-	   -c "allinfo $SNAPSHOT/hiddenfile") || return 1
-    echo $out
-    echo $out | grep "attributes: HA (22)" || return 1
-
-    out=$($SMBCLIENT \
-	   -U $USERNAME%$PASSWORD \
-	   "//$SERVER/shadow_write" \
-	   -c "ls $SNAPSHOT/hiddenfile") || return 1
-    echo $out
-    echo $out | grep "hiddenfile[[:blank:]]*AH" || return 1
-
-    return 0
+	build_hiddenfile
+
+	out=$($SMBCLIENT \
+		-U $USERNAME%$PASSWORD \
+		"//$SERVER/shadow_write" \
+		-c "allinfo $SNAPSHOT/hiddenfile") || return 1
+	echo $out
+	echo $out | grep "attributes: HA (22)" || return 1
+
+	out=$($SMBCLIENT \
+		-U $USERNAME%$PASSWORD \
+		"//$SERVER/shadow_write" \
+		-c "ls $SNAPSHOT/hiddenfile") || return 1
+	echo $out
+	echo $out | grep "hiddenfile[[:blank:]]*AH" || return 1
+
+	return 0
 }
 
 test_shadow_copy_listdir_fix_inodes()
 {
-    local msg
+	local msg
 
-    msg=$1
+	msg=$1
 
-    #delete snapshots from previous tests
-    find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
-    build_snapshots
+	#delete snapshots from previous tests
+	find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
+	build_snapshots
 
-    testit "$msg" \
-	   $SMBTORTURE \
-	   -U$USERNAME%$PASSWORD \
-	   "//$SERVER/shadow_write" \
-	   --option="torture:twrp_snapshot=$SNAPSHOT" \
-	   smb2.twrp.listdir || \
-        failed=`expr $failed + 1`
+	testit "$msg" \
+		$SMBTORTURE \
+		-U$USERNAME%$PASSWORD \
+		"//$SERVER/shadow_write" \
+		--option="torture:twrp_snapshot=$SNAPSHOT" \
+		smb2.twrp.listdir ||
+		failed=$(expr $failed + 1)
 }
 
 build_files $WORKDIR
@@ -219,9 +218,9 @@ test_shadow_copy_stream "reading stream of snapshotted file"
 
 test_shadow_copy_openroot "opening root of shadow copy share"
 
-testit "fix inodes with hardlink" test_shadow_copy_fix_inodes || failed=`expr $failed + 1`
+testit "fix inodes with hardlink" test_shadow_copy_fix_inodes || failed=$(expr $failed + 1)
 
-testit "Test reading DOS attribute" test_hiddenfile || failed=`expr $failed + 1`
+testit "Test reading DOS attribute" test_hiddenfile || failed=$(expr $failed + 1)
 
 test_shadow_copy_listdir_fix_inodes "fix inodes when listing directory"
 
diff --git a/source3/script/tests/test_shareenum.sh b/source3/script/tests/test_shareenum.sh
index 3904b519d54..0334243edc6 100755
--- a/source3/script/tests/test_shareenum.sh
+++ b/source3/script/tests/test_shareenum.sh
@@ -3,10 +3,10 @@
 # this tests share enumeration with "access based share enum"
 
 if [ $# -lt 4 ]; then
-cat <<EOF
+	cat <<EOF
 Usage: $0 SERVER USERNAME PASSWORD RPCCLIENT
 EOF
-exit 1;
+	exit 1
 fi
 
 SERVER="$1"
@@ -15,13 +15,14 @@ PASSWORD="$3"
 RPCCLIENT="$4"
 RPCCLIENT="$VALGRIND ${RPCCLIENT}"
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
-user_see_share() {
-    local user=$1
-    local share=$2
-    $RPCCLIENT //$SERVER -U$user%$PASSWORD -c "netshareenumall" | grep $share > /dev/null 2>&1
+user_see_share()
+{
+	local user=$1
+	local share=$2
+	$RPCCLIENT //$SERVER -U$user%$PASSWORD -c "netshareenumall" | grep $share >/dev/null 2>&1
 }
 
 testit "$USERNAME sees tmp" user_see_share $USERNAME tmp
diff --git a/source3/script/tests/test_sharesec.sh b/source3/script/tests/test_sharesec.sh
index ce1ada53e36..a083a56545a 100755
--- a/source3/script/tests/test_sharesec.sh
+++ b/source3/script/tests/test_sharesec.sh
@@ -11,7 +11,7 @@
 
 if [ $# -lt 4 ]; then
 	echo Usage: test_sharesec.sh SERVERCONFFILE SHARESEC NET SHARE
-exit 1
+	exit 1
 fi
 
 CONF=$1
@@ -27,7 +27,7 @@ incdir=$(dirname $0)/../../../testprogs/blackbox
 
 failed=0
 
-testit "Set new ACL" $CMD --replace  S-1-1-0:ALLOWED/0x0/READ || \
+testit "Set new ACL" $CMD --replace S-1-1-0:ALLOWED/0x0/READ ||
 	failed=$(expr $failed + 1)
 testit "Query new ACL" $CMD --view || failed=$(expr $failed + 1)
 COUNT=$($CMD --view | grep ACL: | sed -e 's/^ACL://' | wc -l)
@@ -36,105 +36,105 @@ ACL=$($CMD --view | grep ACL: | sed -e 's/^ACL://')
 testit "Verify new ACL" test $ACL = S-1-1-0:ALLOWED/0x0/READ
 
 OWNER=$($CMD --view | grep OWNER:)
-testit "Verify empty OWNER" test "$OWNER" = "OWNER:" || \
+testit "Verify empty OWNER" test "$OWNER" = "OWNER:" ||
 	failed=$(expr $failed + 1)
 GROUP=$($CMD --view | grep GROUP:)
-testit "Verify empty GROUP" test "$GROUP" = "GROUP:" || \
+testit "Verify empty GROUP" test "$GROUP" = "GROUP:" ||
 	failed=$(expr $failed + 1)
 CONTROL=$($CMD --view | grep CONTROL: | sed -e 's/^CONTROL://')
-testit "Verify control flags" test "$CONTROL" = "SR|DP" || \
+testit "Verify control flags" test "$CONTROL" = "SR|DP" ||
 	failed=$(expr $failed + 1)
 
-testit "Add second ACL entry" $CMD --add S-1-5-32-544:ALLOWED/0x0/FULL || \
+testit "Add second ACL entry" $CMD --add S-1-5-32-544:ALLOWED/0x0/FULL ||
 	failed=$(expr $failed + 1)
-testit "Query ACL with two entries" $CMD --view || \
+testit "Query ACL with two entries" $CMD --view ||
 	failed=$(expr $failed + 1)
 COUNT=$($CMD --view | grep ACL: | sed -e 's/^ACL://' | wc -l)
-testit "Verify ACL count with two entries" test $COUNT -eq 2 || \
+testit "Verify ACL count with two entries" test $COUNT -eq 2 ||
 	failed=$(expr $failed + 1)
 ACL=$($CMD --view | grep S-1-5-32-544 | sed -e 's/^ACL://')
-testit "Verify second ACL entry" test $ACL = S-1-5-32-544:ALLOWED/0x0/FULL || \
+testit "Verify second ACL entry" test $ACL = S-1-5-32-544:ALLOWED/0x0/FULL ||
 	failed=$(expr $failed + 1)
 
-testit "Modify ACL entry" $CMD --modify S-1-5-32-544:ALLOWED/0x0/CHANGE || \
+testit "Modify ACL entry" $CMD --modify S-1-5-32-544:ALLOWED/0x0/CHANGE ||
 	failed=$(expr $failed + 1)
-testit "Verify ACL with two entries after modify" $CMD --view || \
+testit "Verify ACL with two entries after modify" $CMD --view ||
 	failed=$(expr $failed + 1)
 COUNT=$($CMD --view | grep ACL: | sed -e 's/^ACL://' | wc -l)
-testit "Verify ACL count with two entries after modify" test $COUNT -eq 2 || \
+testit "Verify ACL count with two entries after modify" test $COUNT -eq 2 ||
 	failed=$(expr $failed + 1)
 ACL=$($CMD --view | grep S-1-5-32-544 | sed -e 's/^ACL://')
-testit "Verify modified entry" test $ACL = S-1-5-32-544:ALLOWED/0x0/CHANGE || \
+testit "Verify modified entry" test $ACL = S-1-5-32-544:ALLOWED/0x0/CHANGE ||
 	failed=$(expr $failed + 1)
 
-testit "Add deny ACL entry" $CMD --add S-1-5-32-545:DENIED/0x0/CHANGE || \
+testit "Add deny ACL entry" $CMD --add S-1-5-32-545:DENIED/0x0/CHANGE ||
 	failed=$(expr $failed + 1)
-testit "Query ACL with three entries" $CMD --view || \
+testit "Query ACL with three entries" $CMD --view ||
 	failed=$(expr $failed + 1)
 COUNT=$($CMD --view | grep ACL: | sed -e 's/^ACL://' | wc -l)


-- 
Samba Shared Repository



More information about the samba-cvs mailing list