[SCM] Samba Shared Repository - branch master updated
Pavel Filipensky
pfilipensky at samba.org
Mon Aug 22 15:16:01 UTC 2022
The branch, master has been updated
via b7a024e4ef8 s4:selftest: Fix shellcheck errors in wintest_net.sh
via b1e80d02c76 s4:setup: Fix shellcheck errors in provision_fileperms.sh
via 6c2871429f8 s4:selftest: Fix shellcheck errors in wintest_2k3_dc.sh
via 4b2f4189491 s4:selftest: Fix shellcheck errors in test_w2k3.sh
via d85a2dbfd78 s4:script: Fix shellcheck errors in find_unused_options.sh
via 866b8dcb547 s4:client: Fix shellcheck errors in test_smbclient.sh
via a82301d5f2c testprogs: Fix shellcheck errors in common_test_fns.inc
via 25e9a74e2eb s3:script: Fix shellcheck errors in test_smbstatus.sh
via a8b19ebfc81 s3:script: Fix shellcheck errors in test_smbspool.sh
via 47eacce86be s3:script: Fix shellcheck errors in test_smbclient_s3.sh
via ae67e068be9 s3:script: Fix shellcheck errors in test_rpcclient_samlogon.sh
via 4abfa262b23 s3:script: Fix shellcheck errors in test_preserve_case.sh
via 4edb4d979bf s3:script: Fix shellcheck errors in test_net_registry_roundtrip.sh
via 6f65ecfe5a3 s3:script: Fix shellcheck errors in test_net_registry_check.sh
via 4c02eb4df34 s3:script: Fix shellcheck errors in test_net_lookup.sh
via 8b359fa4df8 s3:script: Fix shellcheck errors in test_net_cred_change.sh
via 249b8e8af8c s3:script: Fix shellcheck errors in test_dfree_quota.sh
via 8c23b829a12 s3:script: Fix shellcheck errors in test_dfree_command.sh
via 3f080f7db6f s3:script: Fix shellcheck errors in dlopen.sh
via 4b87e58fe43 s3:script: Fix shellcheck errors in mksyms.sh
from 75e03ea021a libcli/smb: Set error status if 'iov' pointer is NULL
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b7a024e4ef8f0cbc40a125f91d03e5ce526f1052
Author: Andreas Schneider <asn at samba.org>
Date: Mon Jun 13 11:26:38 2022 +0200
s4:selftest: Fix shellcheck errors in wintest_net.sh
source4/selftest/win/wintest_net.sh:57:27: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky at samba.org>
Autobuild-Date(master): Mon Aug 22 15:15:11 UTC 2022 on sn-devel-184
commit b1e80d02c761879ef526d7d80195e3a812b6bffc
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 10 13:29:19 2022 +0200
s4:setup: Fix shellcheck errors in provision_fileperms.sh
source4/setup/tests/provision_fileperms.sh:27:14: error: Iterating over
ls output is fragile. Use globs. [SC2045]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 6c2871429f8cfc7b480fcae9e944d75709ff74ee
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 10 13:22:00 2022 +0200
s4:selftest: Fix shellcheck errors in wintest_2k3_dc.sh
source4/selftest/win/wintest_2k3_dc.sh:57:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
source4/selftest/win/wintest_2k3_dc.sh:62:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
source4/selftest/win/wintest_2k3_dc.sh:85:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
source4/selftest/win/wintest_2k3_dc.sh:101:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 4b2f4189491dfe5fc5d31689a87694730986b71d
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 10 13:10:07 2022 +0200
s4:selftest: Fix shellcheck errors in test_w2k3.sh
source4/selftest/test_w2k3.sh:40:67: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
source4/selftest/test_w2k3.sh:46:66: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
source4/selftest/test_w2k3.sh:48:66: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit d85a2dbfd78ed58219f6572b7a5ae08d2422464d
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 10 13:07:49 2022 +0200
s4:script: Fix shellcheck errors in find_unused_options.sh
source4/script/find_unused_options.sh:20:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
source4/script/find_unused_options.sh:30:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 866b8dcb54750304371fa2457c1b1f859328049e
Author: Andreas Schneider <asn at samba.org>
Date: Fri Jun 10 13:05:37 2022 +0200
s4:client: Fix shellcheck errors in test_smbclient.sh
source4/client/tests/test_smbclient.sh:31:99: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]
source4/client/tests/test_smbclient.sh:41:116: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]
source4/client/tests/test_smbclient.sh:43:94: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit a82301d5f2cb3a5b6269e46f36e51d17da825a6a
Author: Andreas Schneider <asn at samba.org>
Date: Wed Jun 8 14:55:28 2022 +0200
testprogs: Fix shellcheck errors in common_test_fns.inc
common_test_fns.inc:13:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]
common_test_fns.inc:32:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]
common_test_fns.inc:53:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]
common_test_fns.inc:80:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]
common_test_fns.inc:106:61: error: Double quote array expansions to
avoid re-splitting elements. [SC2068]
common_test_fns.inc:110:32: error: Double quote array expansions to
avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 25e9a74e2eb95e67620d506b45d91c9a817b4843
Author: Andreas Schneider <asn at samba.org>
Date: Wed Jun 8 14:47:20 2022 +0200
s3:script: Fix shellcheck errors in test_smbstatus.sh
test_smbstatus.sh:78:22: error: Use braces when expanding arrays, e.g.
${array[idx]} (or ${var}[.. to quiet). [SC1087]
test_smbstatus.sh:135:22: error: Use braces when expanding arrays, e.g.
${array[idx]} (or ${var}[.. to quiet). [SC1087]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit a8b19ebfc81ff4257f410671eb77cfd65c5f1630
Author: Andreas Schneider <asn at samba.org>
Date: Wed Jun 8 14:42:48 2022 +0200
s3:script: Fix shellcheck errors in test_smbspool.sh
test_smbspool.sh:124:24: error: Couldn't parse this test expression. Fix
to allow more checks. [SC1073]
test_smbspool.sh:124:44: error: If grouping expressions inside [..], use
\( ..\). [SC1026]
test_smbspool.sh:124:46: error: Expected test to end here (don't wrap
commands in []/[[]]). Fix any mentioned problems and try again. [SC1072]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 47eacce86be0c0bc3da84d8c327e49659044fb51
Author: Andreas Schneider <asn at samba.org>
Date: Fri Mar 4 12:08:28 2022 +0100
s3:script: Fix shellcheck errors in test_smbclient_s3.sh
source3/script/tests/test_smbclient_s3.sh:270:5: error: Couldn't parse
this test expression. Fix to allow more checks. [SC1073]
source3/script/tests/test_smbclient_s3.sh:270:11: error: Expected test
to end here (don't wrap commands in []/[[]]). Fix any mentioned problems
and try again. [SC1072]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit ae67e068be9d0816072f21e71f8fd201968965a6
Author: Andreas Schneider <asn at samba.org>
Date: Fri Mar 4 12:05:06 2022 +0100
s3:script: Fix shellcheck errors in test_rpcclient_samlogon.sh
source3/script/tests/test_rpcclient_samlogon.sh:17:114: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 4abfa262b230fcb9f9cf107e37d3c84ace0d353a
Author: Andreas Schneider <asn at samba.org>
Date: Fri Mar 4 12:03:19 2022 +0100
s3:script: Fix shellcheck errors in test_preserve_case.sh
source3/script/tests/test_preserve_case.sh:42:59: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 4edb4d979bf720b70387c6f347eab17943df933c
Author: Andreas Schneider <asn at samba.org>
Date: Thu Mar 3 15:25:14 2022 +0100
s3:script: Fix shellcheck errors in test_net_registry_roundtrip.sh
source3/script/tests/test_net_registry_roundtrip.sh:51:2: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]
source3/script/tests/test_net_registry_roundtrip.sh:55:16: error:
Argument mixes string and array. Use * or separate argument. [SC2145]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 6f65ecfe5a3bffe88796aa467206ece050c6d69a
Author: Andreas Schneider <asn at samba.org>
Date: Thu Mar 3 15:23:25 2022 +0100
s3:script: Fix shellcheck errors in test_net_registry_check.sh
source3/script/tests/test_net_registry_check.sh:33:32: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 4c02eb4df34f389125a768b6ce13a5002caf607e
Author: Andreas Schneider <asn at samba.org>
Date: Thu Mar 3 15:21:33 2022 +0100
s3:script: Fix shellcheck errors in test_net_lookup.sh
source3/script/tests/test_net_lookup.sh:37:9: error: Remove spaces
around = to assign (or use [ ] to compare, or quote '=' if literal).
[SC2283]
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 8b359fa4df803a8e5790865476f217e15a31c3d1
Author: Andreas Schneider <asn at samba.org>
Date: Thu Mar 3 15:18:45 2022 +0100
s3:script: Fix shellcheck errors in test_net_cred_change.sh
source3/script/tests/test_net_cred_change.sh:13:64: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 249b8e8af8c20f28005cdd56deda919aaddaec05
Author: Andreas Schneider <asn at samba.org>
Date: Thu Feb 24 11:41:14 2022 +0100
s3:script: Fix shellcheck errors in test_dfree_quota.sh
source3/script/tests/test_dfree_quota.sh:125:65: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 8c23b829a12417fa859205b8a6f482941aad70ec
Author: Andreas Schneider <asn at samba.org>
Date: Thu Feb 24 11:39:24 2022 +0100
s3:script: Fix shellcheck errors in test_dfree_command.sh
source3/script/tests/test_dfree_command.sh:38:59: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 3f080f7db6f68adf882d9d71840cf1e09a707802
Author: Andreas Schneider <asn at samba.org>
Date: Thu Feb 24 11:36:58 2022 +0100
s3:script: Fix shellcheck errors in dlopen.sh
source3/script/tests/dlopen.sh:51:12: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
commit 4b87e58fe4394dde6b9024c7ca666e8f60f7ce8b
Author: Andreas Schneider <asn at samba.org>
Date: Thu Feb 24 11:32:53 2022 +0100
s3:script: Fix shellcheck errors in mksyms.sh
source3/script/mksyms.sh:33:19: error: Double quote array expansions to
avoid re-splitting elements. [SC2068]
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/script/mksyms.sh | 2 +-
source3/script/tests/dlopen.sh | 2 +-
source3/script/tests/test_dfree_command.sh | 2 +-
source3/script/tests/test_dfree_quota.sh | 6 +++---
source3/script/tests/test_net_cred_change.sh | 4 ++--
source3/script/tests/test_net_lookup.sh | 6 +++---
source3/script/tests/test_net_registry_check.sh | 2 +-
source3/script/tests/test_net_registry_roundtrip.sh | 4 ++--
source3/script/tests/test_preserve_case.sh | 2 +-
source3/script/tests/test_rpcclient_samlogon.sh | 4 ++--
source3/script/tests/test_smbclient_s3.sh | 2 +-
source3/script/tests/test_smbspool.sh | 2 +-
source3/script/tests/test_smbstatus.sh | 4 ++--
source4/client/tests/test_smbclient.sh | 6 +++---
source4/script/find_unused_options.sh | 4 ++--
source4/selftest/test_w2k3.sh | 6 +++---
source4/selftest/win/wintest_2k3_dc.sh | 8 ++++----
source4/selftest/win/wintest_net.sh | 2 +-
source4/setup/tests/provision_fileperms.sh | 8 +++-----
testprogs/blackbox/common_test_fns.inc | 12 ++++++------
20 files changed, 43 insertions(+), 45 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/script/mksyms.sh b/source3/script/mksyms.sh
index 2a412ec8bdf..9a0868510e6 100755
--- a/source3/script/mksyms.sh
+++ b/source3/script/mksyms.sh
@@ -30,7 +30,7 @@ symsfile="$1"
shift
symsfile_tmp="$symsfile.$$.tmp~"
-proto_src="$(echo $@ | tr ' ' '\n' | sort | uniq)"
+proto_src="$(echo "$@" | tr ' ' '\n' | sort | uniq)"
echo creating $symsfile
diff --git a/source3/script/tests/dlopen.sh b/source3/script/tests/dlopen.sh
index de54d6dde39..a1299b20fb1 100755
--- a/source3/script/tests/dlopen.sh
+++ b/source3/script/tests/dlopen.sh
@@ -48,7 +48,7 @@ int main(int argc, char **argv)
}
_EOF
-for arg in $@; do
+for arg in "$@"; do
case "$arg" in
"") ;;
diff --git a/source3/script/tests/test_dfree_command.sh b/source3/script/tests/test_dfree_command.sh
index 39f516d30bf..423d6276a09 100755
--- a/source3/script/tests/test_dfree_command.sh
+++ b/source3/script/tests/test_dfree_command.sh
@@ -35,7 +35,7 @@ test_smbclient_dfree()
shift
shift
subunit_start_test "$name"
- output=$($VALGRIND $smbclient //$SERVER/$share -c "$cmd" $@ 2>&1)
+ output=$($VALGRIND $smbclient //$SERVER/$share -c "$cmd" "$@" 2>&1)
status=$?
if [ x$status = x0 ]; then
received=$(echo "$output" | awk '/blocks of size/ {print $1, $5, $6}')
diff --git a/source3/script/tests/test_dfree_quota.sh b/source3/script/tests/test_dfree_quota.sh
index e14f6349201..bd036184c33 100755
--- a/source3/script/tests/test_dfree_quota.sh
+++ b/source3/script/tests/test_dfree_quota.sh
@@ -122,7 +122,7 @@ test_smbclient_dfree()
shift
subunit_start_test "$name"
setup_conf $confs
- output=$($VALGRIND $smbclient //$SERVER/$share -c "cd $dir; l" $@ 2>&1)
+ output=$($VALGRIND $smbclient //$SERVER/$share -c "cd $dir; l" "$@" 2>&1)
status=$?
if [ "$status" = "0" ]; then
received=$(echo "$output" | awk '/blocks of size/ {print $1, $5, $6}')
@@ -150,7 +150,7 @@ test_smbclient_dfree_2()
subunit_start_test "$name"
setup_conf $confs
output=$($VALGRIND $smbclient //$SERVER/$share \
- -c "cd $dir1; du; cd ..; cd $dir2 ; du" $@ 2>&1)
+ -c "cd $dir1; du; cd ..; cd $dir2 ; du" "$@" 2>&1)
status=$?
if [ "$status" = "0" ]; then
received=$(echo "$output" |
@@ -187,7 +187,7 @@ test_smbcquotas()
mproto="-m SMB1"
fi
- output=$($VALGRIND $smbcquotas $mproto //$SERVER/dfq $@ 2>/dev/null | tr '\\' '/')
+ output=$($VALGRIND $smbcquotas $mproto //$SERVER/dfq "$@" 2>/dev/null | tr '\\' '/')
status=$?
if [ "$status" = "0" ]; then
received=$(echo "$output" | awk "/$SERVER\\/$user/ {printf \"%s%s%s\", \$3, \$4, \$5}")
diff --git a/source3/script/tests/test_net_cred_change.sh b/source3/script/tests/test_net_cred_change.sh
index 86d95dde60e..7b01673c132 100755
--- a/source3/script/tests/test_net_cred_change.sh
+++ b/source3/script/tests/test_net_cred_change.sh
@@ -10,8 +10,8 @@ fi
incdir=$(dirname $0)/../../../testprogs/blackbox
. $incdir/subunit.sh
testit "1: change machine secret" $VALGRIND $BINDIR/wbinfo --change-secret || failed=$(expr $failed + 1)
-testit "1: validate secret" $VALGRIND $BINDIR/net rpc testjoin $@ || failed=$(expr $failed + 1)
+testit "1: validate secret" $VALGRIND $BINDIR/net rpc testjoin "$@" || failed=$(expr $failed + 1)
testit "2: change machine secret" $VALGRIND $BINDIR/wbinfo --change-secret || failed=$(expr $failed + 1)
-testit "2: validate secret" $VALGRIND $BINDIR/net rpc testjoin $@ || failed=$(expr $failed + 1)
+testit "2: validate secret" $VALGRIND $BINDIR/net rpc testjoin "$@" || failed=$(expr $failed + 1)
testok $0 $failed
diff --git a/source3/script/tests/test_net_lookup.sh b/source3/script/tests/test_net_lookup.sh
index 161c1c99262..ee183335550 100755
--- a/source3/script/tests/test_net_lookup.sh
+++ b/source3/script/tests/test_net_lookup.sh
@@ -34,15 +34,15 @@ $SAMBATOOL dns add "$SERVER" -U "$USERNAME"%"$PASSWORD" \
# global lookup
testit_grep global 10.53.57.30:389 $NET lookup ldap "$DNSZONE" ||
- failed = $(expr $failed + 1)
+ failed=$(expr $failed + 1)
# correct site-aware lookup
testit_grep site-aware 1.2.3.4:389 $NET lookup ldap "$DNSZONE" "$SITE" ||
- failed = $(expr $failed + 1)
+ failed=$(expr $failed + 1)
# lookup with nonexisting site -- global fallback
testit_grep global 10.53.57.30:389 $NET lookup ldap "$DNSZONE" nosite ||
- failed = $(expr $failed + 1)
+ failed=$(expr $failed + 1)
$SAMBATOOL dns delete "$SERVER" -U "$USERNAME"%"$PASSWORD" \
"$DNSZONE" mydc \
diff --git a/source3/script/tests/test_net_registry_check.sh b/source3/script/tests/test_net_registry_check.sh
index 3555af05306..07ccf86cdae 100755
--- a/source3/script/tests/test_net_registry_check.sh
+++ b/source3/script/tests/test_net_registry_check.sh
@@ -30,7 +30,7 @@ failed=0
regcheck()
{
ALLOWEDERR="Check database:|INFO: version ="
- ERRSTR=$(${NETREG} check $REG $@ 2>&1 | egrep -v "$ALLOWEDERR")
+ ERRSTR=$(${NETREG} check $REG "$@" 2>&1 | egrep -v "$ALLOWEDERR")
}
# try to repair registry
diff --git a/source3/script/tests/test_net_registry_roundtrip.sh b/source3/script/tests/test_net_registry_roundtrip.sh
index 6aeed0cd5a1..e1974c229e8 100755
--- a/source3/script/tests/test_net_registry_roundtrip.sh
+++ b/source3/script/tests/test_net_registry_roundtrip.sh
@@ -48,11 +48,11 @@ REGPATH="HKLM\Software\Samba"
conf_roundtrip_step()
{
echo "CMD: $*" >>$LOG
- $@ 2>>$LOG
+ "$@" 2>>$LOG
RC=$?
echo "RC: $RC" >>$LOG
test "x$RC" = "x0" || {
- echo "ERROR: $@ failed (RC=$RC)" | tee -a $LOG
+ echo "ERROR: $* failed (RC=$RC)" | tee -a $LOG
}
return $RC
# echo -n .
diff --git a/source3/script/tests/test_preserve_case.sh b/source3/script/tests/test_preserve_case.sh
index bafc50f2d8b..c9ca79ab4d5 100755
--- a/source3/script/tests/test_preserve_case.sh
+++ b/source3/script/tests/test_preserve_case.sh
@@ -39,7 +39,7 @@ test_smbclient()
shift
shift
subunit_start_test "$name"
- output=$($VALGRIND $smbclient //$SERVER/$share -c "$cmd" $@ 2>&1)
+ output=$($VALGRIND $smbclient //$SERVER/$share -c "$cmd" "$@" 2>&1)
status=$?
if [ x$status = x0 ]; then
subunit_pass_test "$name"
diff --git a/source3/script/tests/test_rpcclient_samlogon.sh b/source3/script/tests/test_rpcclient_samlogon.sh
index 9b3f1427995..ff73be5958e 100755
--- a/source3/script/tests/test_rpcclient_samlogon.sh
+++ b/source3/script/tests/test_rpcclient_samlogon.sh
@@ -14,12 +14,12 @@ ADDARGS="$@"
rpcclient_samlogon_schannel_seal()
{
- $VALGRIND $BINDIR/rpcclient -U% -c "schannel;samlogon '$USERNAME' '$PASSWORD';samlogon '$USERNAME' '$PASSWORD'" $@
+ $VALGRIND $BINDIR/rpcclient -U% -c "schannel;samlogon '$USERNAME' '$PASSWORD';samlogon '$USERNAME' '$PASSWORD'" "$@"
}
rpcclient_samlogon_schannel_sign()
{
- $VALGRIND $BINDIR/rpcclient -U% -c "schannelsign;samlogon '$USERNAME' '$PASSWORD';samlogon '$USERNAME' '$PASSWORD'" $@
+ $VALGRIND $BINDIR/rpcclient -U% -c "schannelsign;samlogon '$USERNAME' '$PASSWORD';samlogon '$USERNAME' '$PASSWORD'" "$@"
}
incdir=$(dirname $0)/../../../testprogs/blackbox
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index 33737b22273..fed1723a531 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -267,7 +267,7 @@ EOF
return 1
fi
- if [ cmp $PREFIX/message_out.$$ $tmpfile != 0 ]; then
+ if cmp $PREFIX/message_out.$$ $tmpfile; then
echo "failed comparison of message from $SERVER"
return 1
fi
diff --git a/source3/script/tests/test_smbspool.sh b/source3/script/tests/test_smbspool.sh
index 1c3c02e2502..1fcc9a8cc01 100755
--- a/source3/script/tests/test_smbspool.sh
+++ b/source3/script/tests/test_smbspool.sh
@@ -121,7 +121,7 @@ test_vlp_verify()
fi
jobid=$(echo "$out" | awk '/[0-9]+/ { print $1 };')
- if [ -z "$jobid" ] || [ $jobid -lt 100 || [ $jobid -gt 2000 ]; then
+ if [ -z "$jobid" ] || [ $jobid -lt 100 ] || [ $jobid -gt 2000 ]; then
echo "Invalid jobid: $jobid"
echo "$out"
return 1
diff --git a/source3/script/tests/test_smbstatus.sh b/source3/script/tests/test_smbstatus.sh
index b24fe735aa5..30ca2398fa1 100755
--- a/source3/script/tests/test_smbstatus.sh
+++ b/source3/script/tests/test_smbstatus.sh
@@ -75,7 +75,7 @@ EOF
return
fi
- echo "$out" | grep "$userid[ ]*DENY_NONE"
+ echo "$out" | grep "${userid}[ ]*DENY_NONE"
ret=$?
if [ $ret != 0 ]; then
echo "Failed to find userid in smbstatus locked file output"
@@ -132,7 +132,7 @@ EOF
return
fi
- echo "$out" | grep "$USERNAME[ ]*DENY_NONE"
+ echo "$out" | grep "${USERNAME}[ ]*DENY_NONE"
ret=$?
if [ $ret != 0 ]; then
echo "Failed to find userid in smbstatus locked file output"
diff --git a/source4/client/tests/test_smbclient.sh b/source4/client/tests/test_smbclient.sh
index 1d87f90e601..121de173063 100755
--- a/source4/client/tests/test_smbclient.sh
+++ b/source4/client/tests/test_smbclient.sh
@@ -28,7 +28,7 @@ runcmd()
shift
shift
echo "test: $name"
- $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@
+ $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" -W "$DOMAIN" -U"$USERNAME%$PASSWORD" "$@"
status=$?
if [ x$status = x0 ]; then
echo "success: $name"
@@ -38,9 +38,9 @@ runcmd()
return $status
}
-testit "share and server list" $VALGRIND $smbclient -L $SERVER $CONFIGURATION -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=$(expr $failed + 1)
+testit "share and server list" $VALGRIND $smbclient -L $SERVER $CONFIGURATION -W "$DOMAIN" -U"$USERNAME%$PASSWORD" "$@" || failed=$(expr $failed + 1)
-testit "share and server list anonymously" $VALGRIND $smbclient -N -L $SERVER $CONFIGURATION $@ || failed=$(expr $failed + 1)
+testit "share and server list anonymously" $VALGRIND $smbclient -N -L $SERVER $CONFIGURATION "$@" || failed=$(expr $failed + 1)
# Use the smbclient binary as our test file
cat $smbclient >$PREFIX/tmpfile
diff --git a/source4/script/find_unused_options.sh b/source4/script/find_unused_options.sh
index 36e97710488..ad56fabed26 100755
--- a/source4/script/find_unused_options.sh
+++ b/source4/script/find_unused_options.sh
@@ -17,7 +17,7 @@ for i in $LIST_GLOBAL; do
key=$(echo $i | cut -d ':' -f1)
val=$(echo $i | cut -d ':' -f2)
- found=$(grep "$key[ ]*()" $CFILES)
+ found=$(grep "${key}[ ]*()" $CFILES)
if test -z "$found"; then
echo "Not Used Global: $key() -> $val"
fi
@@ -27,7 +27,7 @@ for i in $LIST_LOCAL; do
key=$(echo $i | cut -d ':' -f1)
val=$(echo $i | cut -d ':' -f2)
- found=$(grep "$key[ ]*(" $CFILES)
+ found=$(grep "${key}[ ]*(" $CFILES)
if test -z "$found"; then
echo "Not Used LOCAL: $key() -> $val"
diff --git a/source4/selftest/test_w2k3.sh b/source4/selftest/test_w2k3.sh
index 20d4e5dbe78..c2767ce96af 100755
--- a/source4/selftest/test_w2k3.sh
+++ b/source4/selftest/test_w2k3.sh
@@ -37,12 +37,12 @@ for bindoptions in padcheck connect sign seal ntlm,sign ntlm,seal $VALIDATE bige
esac
for t in $tests; do
name="$t on $transport with $bindoptions"
- testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" $OPTIONS $t "$*"
+ testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"${server}[${bindoptions}]" $OPTIONS $t "$*"
done
done
done
name="RPC-DRSUAPI on ncacn_ip_tcp with seal"
-testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS ncacn_ip_tcp:"$server[seal]" $OPTIONS RPC-DRSUAPI "$*"
+testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS ncacn_ip_tcp:"${server}[seal]" $OPTIONS RPC-DRSUAPI "$*"
name="RPC-DRSUAPI on ncacn_ip_tcp with seal,bigendian"
-testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS ncacn_ip_tcp:"$server[seal,bigendian]" $OPTIONS RPC-DRSUAPI "$*"
+testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS ncacn_ip_tcp:"${server}[seal,bigendian]" $OPTIONS RPC-DRSUAPI "$*"
diff --git a/source4/selftest/win/wintest_2k3_dc.sh b/source4/selftest/win/wintest_2k3_dc.sh
index 4852e22a01c..e77c2e22229 100755
--- a/source4/selftest/win/wintest_2k3_dc.sh
+++ b/source4/selftest/win/wintest_2k3_dc.sh
@@ -54,12 +54,12 @@ drsuapi_tests()
name="RPC-DRSUAPI on ncacn_ip_tcp with seal"
bin/smbtorture \
- ncacn_ip_tcp:$server[seal] $OPTIONS \
+ ncacn_ip_tcp:${server}[seal] $OPTIONS \
RPC-DRSUAPI || on_error "$name"
name="RPC-DRSUAPI on ncacn_ip_tcp with seal,bigendian"
bin/smbtorture \
- ncacn_ip_tcp:$server[seal,bigendian] $OPTIONS \
+ ncacn_ip_tcp:${server}[seal,bigendian] $OPTIONS \
RPC-DRSUAPI || on_error "$name"
}
@@ -82,7 +82,7 @@ ncacn_ip_tcp_tests()
for t in $tests; do
name="$t on $transport with $bindoptions"
bin/smbtorture $TORTURE_OPTIONS \
- $transport:$server[$bindoptions] \
+ $transport:${server}[$bindoptions] \
$OPTIONS $t || on_error "$name"
done
done
@@ -98,7 +98,7 @@ ncacn_np_tests()
for t in $tests; do
name="$t on $transport with $bindoptions"
bin/smbtorture $TORTURE_OPTIONS \
- $transport:$server[$bindoptions] \
+ $transport:${server}[$bindoptions] \
$OPTIONS $t || on_error "$name"
done
done
diff --git a/source4/selftest/win/wintest_net.sh b/source4/selftest/win/wintest_net.sh
index 429be6cd792..852b0874292 100755
--- a/source4/selftest/win/wintest_net.sh
+++ b/source4/selftest/win/wintest_net.sh
@@ -54,7 +54,7 @@ for o in $bind_options; do
for t in $net_test; do
test_name="$t on $transport with $o"
$SMBTORTURE_BIN_PATH -U $username%$password \
- -W $domain $transport:$server[$o] \
+ -W $domain ${transport}:${server}[$o] \
$t || on_error "\n$test_name failed."
done
done
diff --git a/source4/setup/tests/provision_fileperms.sh b/source4/setup/tests/provision_fileperms.sh
index c69b73ff84c..7e917ad3172 100755
--- a/source4/setup/tests/provision_fileperms.sh
+++ b/source4/setup/tests/provision_fileperms.sh
@@ -24,16 +24,14 @@ check_private_file_perms()
target_dir="$1/private"
result=0
- for file in $(ls $target_dir/); do
- filepath="$target_dir/$file"
-
+ for file in "${target_dir}"/*; do
# skip directories/sockets for now
- if [ ! -f $filepath ]; then
+ if [ ! -f $file ]; then
continue
fi
# use stat to get the file permissions, i.e. -rw-------
- file_perm=$(stat -c "%A" $filepath)
+ file_perm=$(stat -c "%A" $file)
# then use cut to drop the first 4 chars containing the file type
# and owner permissions. What's left is the group and other users
diff --git a/testprogs/blackbox/common_test_fns.inc b/testprogs/blackbox/common_test_fns.inc
index a25313054c0..68465e1e61a 100755
--- a/testprogs/blackbox/common_test_fns.inc
+++ b/testprogs/blackbox/common_test_fns.inc
@@ -10,7 +10,7 @@ test_smbclient()
shift
shift
subunit_start_test "$name"
- output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@ 2>&1)
+ output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" "$@" 2>&1)
status=$?
if [ x$status = x0 ]; then
subunit_pass_test "$name"
@@ -29,7 +29,7 @@ test_smbclient_expect_failure()
shift
shift
subunit_start_test "$name"
- output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@ 2>&1)
+ output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" "$@" 2>&1)
status=$?
if [ x$status = x0 ]; then
printf '%s' "$output" | subunit_fail_test "$name"
@@ -50,7 +50,7 @@ test_rpcclient_grep()
shift
shift
subunit_start_test "$name"
- output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" $@ 2>&1)
+ output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" "$@" 2>&1)
status=$?
if [ x$status != x0 ]; then
printf '%s' "$output" | subunit_fail_test "$name"
@@ -77,7 +77,7 @@ test_rpcclient_expect_failure_grep()
shift
shift
subunit_start_test "$name"
- output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" $@ 2>&1)
+ output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" "$@" 2>&1)
status=$?
if [ x$status = x0 ]; then
printf '%s' "$output" | subunit_fail_test "$name"
@@ -103,11 +103,11 @@ kerberos_kinit()
if [ "${kbase}" = "samba4kinit" ]; then
kpassfile=$(mktemp)
echo $password >${kpassfile}
- $kinit_tool -c ${KRB5CCNAME} --password-file=${kpassfile} $@ $principal
+ $kinit_tool -c ${KRB5CCNAME} --password-file=${kpassfile} "$@" $principal
status=$?
rm -f ${kpassfile}
else
- echo $password | $kinit_tool $@ $principal
+ echo $password | $kinit_tool "$@" $principal
status=$?
fi
return $status
--
Samba Shared Repository
More information about the samba-cvs
mailing list