From: Andreas Schneider Date: Mon, 13 Jun 2022 13:47:20 +0000 (+0200) Subject: testprogs: Fix shellcheck errors in test_kinit_mit.sh X-Git-Tag: talloc-2.4.0~1353 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ce5d8df254ae565a179c5c41e672538a8ded663;p=thirdparty%2Fsamba.git testprogs: Fix shellcheck errors in test_kinit_mit.sh testprogs/blackbox/test_kinit_mit.sh:54:62: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:110:107: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:114:126: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:128:126: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:130:154: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:132:118: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:164:195: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:201:154: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:263:122: error: Double quote array expansions to avoid re-splitting elements. [SC2068] testprogs/blackbox/test_kinit_mit.sh:301:116: error: Double quote array expansions to avoid re-splitting elements. [SC2068] Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- diff --git a/testprogs/blackbox/test_kinit_mit.sh b/testprogs/blackbox/test_kinit_mit.sh index bde140a41f3..8901148898f 100755 --- a/testprogs/blackbox/test_kinit_mit.sh +++ b/testprogs/blackbox/test_kinit_mit.sh @@ -51,7 +51,7 @@ test_smbclient() shift shift echo "test: $name" - $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" $@ + $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" "$@" status=$? if [ x$status = x0 ]; then echo "success: $name" @@ -107,11 +107,11 @@ $samba_kdestroy ########################################################### testit "kinit with password" $samba_texpect $PREFIX/tmpkinitscript $samba_kinit $USERNAME@$REALM || failed=$(expr $failed + 1) -testit "check time with kerberos ccache" $VALGRIND $PYTHON $samba_tool time $SERVER $CONFIGURATION -k yes $@ || failed=$(expr $failed + 1) +testit "check time with kerberos ccache" $VALGRIND $PYTHON $samba_tool time $SERVER $CONFIGURATION -k yes "$@" || failed=$(expr $failed + 1) USERPASS="testPass@12%" -testit "add user with kerberos ccache" $VALGRIND $PYTHON $samba_tool user create nettestuser $USERPASS $CONFIGURATION -k yes $@ || failed=$(expr $failed + 1) +testit "add user with kerberos ccache" $VALGRIND $PYTHON $samba_tool user create nettestuser $USERPASS $CONFIGURATION -k yes "$@" || failed=$(expr $failed + 1) echo "Getting defaultNamingContext" BASEDN=$($ldbsearch $options --basedn='' -H ldap://$SERVER --scope=base DUMMY=x defaultNamingContext | grep defaultNamingContext | awk '{print $2}') @@ -125,11 +125,11 @@ replace: userPrincipalName userPrincipalName: nettest@$REALM EOF -testit "modify servicePrincipalName and userPrincpalName" $VALGRIND $ldbmodify -H ldap://$SERVER $PREFIX/tmpldbmodify -k yes $@ || failed=$(expr $failed + 1) +testit "modify servicePrincipalName and userPrincpalName" $VALGRIND $ldbmodify -H ldap://$SERVER $PREFIX/tmpldbmodify -k yes "$@" || failed=$(expr $failed + 1) -testit "set user password with kerberos ccache" $VALGRIND $PYTHON $samba_tool user setpassword nettestuser --newpassword=$USERPASS $CONFIGURATION -k yes $@ || failed=$(expr $failed + 1) +testit "set user password with kerberos ccache" $VALGRIND $PYTHON $samba_tool user setpassword nettestuser --newpassword=$USERPASS $CONFIGURATION -k yes "$@" || failed=$(expr $failed + 1) -testit "enable user with kerberos cache" $VALGRIND $PYTHON $samba_enableaccount nettestuser -H ldap://$SERVER -k yes $@ || failed=$(expr $failed + 1) +testit "enable user with kerberos cache" $VALGRIND $PYTHON $samba_enableaccount nettestuser -H ldap://$SERVER -k yes "$@" || failed=$(expr $failed + 1) ########################################################### ### Test kinit with canonicalization @@ -161,7 +161,7 @@ test_smbclient "Test login with user kerberos ccache" 'ls' --use-krb5-ccache=$KR ### Change password NEWUSERPASS="testPaSS@34%" -testit "change user password with 'samba-tool user password' (rpc)" $VALGRIND $PYTHON $samba_tool user password -W$DOMAIN -Unettestuser%$USERPASS $CONFIGURATION -k no --newpassword=$NEWUSERPASS $@ || failed=$(expr $failed + 1) +testit "change user password with 'samba-tool user password' (rpc)" $VALGRIND $PYTHON $samba_tool user password -W$DOMAIN -Unettestuser%$USERPASS $CONFIGURATION -k no --newpassword=$NEWUSERPASS "$@" || failed=$(expr $failed + 1) cat >$PREFIX/tmpkinituserpassscript <$PREFIX/tmpkinituserpassscript <