[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Tue May 3 00:11:01 UTC 2022


The branch, master has been updated
       via  45b648486b9 s3:tests: Reformat test_deadtime.sh
       via  0d29cbf0413 s3:tests: Reformat test_close_denied_share.sh
       via  9d32559fb11 s3:tests: Reformat test_chdir_cache.sh
       via  a3d0655ee09 s3:tests: Reformat test_async_req.sh
       via  6aaf527fc8a s3:tests: Reformat test_aio_outstanding.sh
       via  facc2c002c7 s3:tests: Reformat test_acl_xattr.sh
       via  b4ee11d083d s3:tests: Reformat printing_var_exp_lpr_cmd.sh
       via  bfbae4f94c9 s3:tests: Reformat dlopen.sh
       via  e93d73b6187 docs: Explain the impact of "ntlm auth = disabled" on simple bind forwarding
      from  54c6cf8666b libcli/smb: allow SMB2 Negotiate responses with security_offset = 0 and security_length = 0

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


- Log -----------------------------------------------------------------
commit 45b648486b9751beba7500c25294b4f7671caf44
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:08 2022 +0200

    s3:tests: Reformat test_deadtime.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Tue May  3 00:10:53 UTC 2022 on sn-devel-184

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

    s3:tests: Reformat test_close_denied_share.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

    s3:tests: Reformat test_chdir_cache.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

    s3:tests: Reformat test_async_req.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

    s3:tests: Reformat test_aio_outstanding.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

    s3:tests: Reformat test_acl_xattr.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

    s3:tests: Reformat printing_var_exp_lpr_cmd.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

    s3:tests: Reformat dlopen.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit e93d73b618797565dec66b31de961dc062264bd2
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 12 12:23:54 2022 +1200

    docs: Explain the impact of "ntlm auth = disabled" on simple bind forwarding
    
    An RODC will forward an LDAP Simple bind, just like any other authentication,
    when the password is not present locally.
    
    If the full DC does not support NTLMv2 authentication this forwarded password
    will be rejected.  A future Samba version should prefer Kerberos or send the
    plaintext, but we can not change the MS Windows behaviour, so we document this.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13879
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

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

Summary of changes:
 docs-xml/smbdotconf/security/ntlmauth.xml          |   7 +
 source3/script/tests/dlopen.sh                     |  20 +-
 .../tests/printing/printing_var_exp_lpr_cmd.sh     |   4 +-
 source3/script/tests/test_acl_xattr.sh             | 211 +++++++++++----------
 source3/script/tests/test_aio_outstanding.sh       |  19 +-
 source3/script/tests/test_async_req.sh             |   4 +-
 source3/script/tests/test_chdir_cache.sh           |  38 ++--
 source3/script/tests/test_close_denied_share.sh    |  33 ++--
 source3/script/tests/test_deadtime.sh              |  14 +-
 9 files changed, 185 insertions(+), 165 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/security/ntlmauth.xml b/docs-xml/smbdotconf/security/ntlmauth.xml
index 9fa3d5c1ce5..84b3488e411 100644
--- a/docs-xml/smbdotconf/security/ntlmauth.xml
+++ b/docs-xml/smbdotconf/security/ntlmauth.xml
@@ -55,6 +55,13 @@
           <para><constant>disabled</constant> - Do not accept NTLM (or
           LanMan) authentication of any level, nor permit
           NTLM password changes.</para>
+
+	  <para><emphasis>WARNING:</emphasis> Both Microsoft Windows
+	  and Samba <emphasis>Read Only Domain Controllers</emphasis>
+	  (RODCs) convert a plain-text LDAP Simple Bind into an NTLMv2
+	  authentication to forward to a full DC.  Setting this option
+	  to <constant>disabled</constant> will cause these forwarded
+	  authentications to fail.</para>
         </listitem>
 
     </itemizedlist>
diff --git a/source3/script/tests/dlopen.sh b/source3/script/tests/dlopen.sh
index 6412bc5fcd4..de54d6dde39 100755
--- a/source3/script/tests/dlopen.sh
+++ b/source3/script/tests/dlopen.sh
@@ -15,9 +15,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
-tempdir=`mktemp -d /tmp/dlopenXXXXXX`
+tempdir=$(mktemp -d /tmp/dlopenXXXXXX)
 test -n "$tempdir" || exit 1
-cat >> $tempdir/dlopen.c << _EOF
+cat >>$tempdir/dlopen.c <<_EOF
 #include <dlfcn.h>
 #include <stdio.h>
 #include <limits.h>
@@ -48,14 +48,14 @@ int main(int argc, char **argv)
 }
 _EOF
 
-for arg in $@ ; do
+for arg in $@; do
 	case "$arg" in
-	"")
-		;;
-	-I*|-D*|-f*|-m*|-g*|-O*|-W*)
+	"") ;;
+
+	-I* | -D* | -f* | -m* | -g* | -O* | -W*)
 		cflags="$cflags $arg"
 		;;
-	-l*|-L*)
+	-l* | -L*)
 		ldflags="$ldflags $arg"
 		;;
 	/*)
@@ -70,10 +70,10 @@ done
 ${CC:-gcc} $RPM_OPT_FLAGS $CFLAGS -o $tempdir/dlopen $cflags $tempdir/dlopen.c $ldflags
 
 retval=0
-for module in $modules ; do
+for module in $modules; do
 	case "$module" in
-	"")
-		;;
+	"") ;;
+
 	/*)
 		$tempdir/dlopen "$module"
 		retval=$?
diff --git a/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh b/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
index ce039bb8fb3..8259f375a40 100755
--- a/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
+++ b/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
@@ -4,6 +4,6 @@ logfile="${SELFTEST_TMPDIR}/${USER}_printing_var_exp.log"
 
 rm -f "$logfile"
 
-for i in $(seq 1 $#) ; do
-    eval echo "arg $i: \$$i" >> "$logfile"
+for i in $(seq 1 $#); do
+	eval echo "arg $i: \$$i" >>"$logfile"
 done
diff --git a/source3/script/tests/test_acl_xattr.sh b/source3/script/tests/test_acl_xattr.sh
index 8abd7476244..d0eec66252b 100755
--- a/source3/script/tests/test_acl_xattr.sh
+++ b/source3/script/tests/test_acl_xattr.sh
@@ -3,10 +3,10 @@
 # this tests acl_xattr config parameter "ignore system acl"
 
 if [ $# -lt 6 ]; then
-cat <<EOF
+	cat <<EOF
 Usage: $0 SERVER USERNAME PASSWORD PREFIX SMBCLIENT SMBCACLS
 EOF
-exit 1;
+	exit 1
 fi
 
 SERVER="$1"
@@ -20,120 +20,125 @@ ADDARGS="$*"
 SMBCLIENT="$VALGRIND ${SMBCLIENT} ${ADDARGS}"
 SMBCACLS="$VALGRIND ${SMBCACLS} ${ADDARGS}"
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
-setup_remote_file() {
-    local share=$1
-    local fname="$share.$$"
-    local local_fname=$PREFIX/$fname
-    touch $local_fname
-    $SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "rm $fname"
-    $SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "ls" | grep "$fname" && exit 1
-    $SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "lcd $PREFIX; put $fname" || exit 1
+setup_remote_file()
+{
+	local share=$1
+	local fname="$share.$$"
+	local local_fname=$PREFIX/$fname
+	touch $local_fname
+	$SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "rm $fname"
+	$SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "ls" | grep "$fname" && exit 1
+	$SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "lcd $PREFIX; put $fname" || exit 1
 }
 
-smbcacls_x() {
-    local share=$1
-    local fname="$share.$$"
+smbcacls_x()
+{
+	local share=$1
+	local fname="$share.$$"
 
-    # skip with SMB1
-    echo "$ADDARGS" | grep mNT1 && exit 0
+	# skip with SMB1
+	echo "$ADDARGS" | grep mNT1 && exit 0
 
-    $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD "$fname" -x || exit 1
-    mxac=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD "$fname" -x | awk '/Maximum access/ {print $3}')
+	$SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD "$fname" -x || exit 1
+	mxac=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD "$fname" -x | awk '/Maximum access/ {print $3}')
 
-    echo "mxac: $mxac"
-    if test "$mxac" != "0x1f01ff" ; then
-        exit 1
-    fi
+	echo "mxac: $mxac"
+	if test "$mxac" != "0x1f01ff"; then
+		exit 1
+	fi
 }
 
-nt_affects_posix() {
-    local share=$1
-    local expected=$2
-    local b4
-    local af
-    local fname="$share.$$"
-    b4=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
-    $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "ACL:$SERVER\force_user:ALLOWED/0x0/READ" 2>/dev/null || exit 1
-    af=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
-    echo "before: $b4"
-    echo "after: $af"
-    echo "${b4}" | grep -q "^# owner:" || exit 1
-    echo "${af}" | grep -q "^# owner:" || exit 1
-    if test "$expected" = "true" ; then
-        test "$b4" != "$af"
-    else
-        test "$b4" = "$af"
-    fi
+nt_affects_posix()
+{
+	local share=$1
+	local expected=$2
+	local b4
+	local af
+	local fname="$share.$$"
+	b4=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
+	$SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "ACL:$SERVER\force_user:ALLOWED/0x0/READ" 2>/dev/null || exit 1
+	af=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
+	echo "before: $b4"
+	echo "after: $af"
+	echo "${b4}" | grep -q "^# owner:" || exit 1
+	echo "${af}" | grep -q "^# owner:" || exit 1
+	if test "$expected" = "true"; then
+		test "$b4" != "$af"
+	else
+		test "$b4" = "$af"
+	fi
 }
 
-nt_affects_chown() {
-    local share=$1
-    local b4_expected
-    local af_expected
-    local b4_actual
-    local af_actual
-    local fname="$share.$$"
-
-    echo -n "determining uid of $USERNAME..."
-    b4_expected=$(getent passwd $USERNAME) || exit 1
-    b4_expected=$(echo "$b4_expected" | awk -F: '{print $3}')
-    echo "$b4_expected"
-
-    echo -n "determining uid of force_user..."
-    af_expected=$(getent passwd force_user) || exit 1
-    af_expected=$(echo "$af_expected" | awk -F: '{print $3}')
-    echo "$af_expected"
-
-    #basic sanity...
-    test "$b4_expected != $af_expected" || exit 1
-
-    b4_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
-    echo "${b4_actual}" | grep -q "^# owner:" || exit 1
-    b4_actual=$(echo "$b4_actual" | sed -rn 's/^# owner: (.*)/\1/p')
-    $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "ACL:$SERVER\force_user:ALLOWED/0x0/FULL" || exit 1
-    $SMBCACLS //$SERVER/$share $fname -U force_user%$PASSWORD -C force_user 2>/dev/null || exit 1
-    af_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
-    echo "${af_actual}" | grep -q "^# owner:" || exit 1
-    af_actual=$(echo "$af_actual" | sed -rn 's/^# owner: (.*)/\1/p')
-    echo "before: $b4_actual"
-    echo "after: $af_actual"
-    test "$b4_expected" = "$b4_actual" && test "$af_expected" = "$af_actual"
+nt_affects_chown()
+{
+	local share=$1
+	local b4_expected
+	local af_expected
+	local b4_actual
+	local af_actual
+	local fname="$share.$$"
+
+	echo -n "determining uid of $USERNAME..."
+	b4_expected=$(getent passwd $USERNAME) || exit 1
+	b4_expected=$(echo "$b4_expected" | awk -F: '{print $3}')
+	echo "$b4_expected"
+
+	echo -n "determining uid of force_user..."
+	af_expected=$(getent passwd force_user) || exit 1
+	af_expected=$(echo "$af_expected" | awk -F: '{print $3}')
+	echo "$af_expected"
+
+	#basic sanity...
+	test "$b4_expected != $af_expected" || exit 1
+
+	b4_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
+	echo "${b4_actual}" | grep -q "^# owner:" || exit 1
+	b4_actual=$(echo "$b4_actual" | sed -rn 's/^# owner: (.*)/\1/p')
+	$SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "ACL:$SERVER\force_user:ALLOWED/0x0/FULL" || exit 1
+	$SMBCACLS //$SERVER/$share $fname -U force_user%$PASSWORD -C force_user 2>/dev/null || exit 1
+	af_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
+	echo "${af_actual}" | grep -q "^# owner:" || exit 1
+	af_actual=$(echo "$af_actual" | sed -rn 's/^# owner: (.*)/\1/p')
+	echo "before: $b4_actual"
+	echo "after: $af_actual"
+	test "$b4_expected" = "$b4_actual" && test "$af_expected" = "$af_actual"
 }
 
-nt_affects_chgrp() {
-    local share=$1
-    local b4_expected
-    local af_expected
-    local b4_actual
-    local af_actual
-    local fname="$share.$$"
-
-    echo -n "determining gid of domusers..."
-    b4_expected=$(getent group domusers) || exit 1
-    b4_expected=$(echo "$b4_expected" | awk -F: '{print $3}')
-    echo "$b4_expected"
-
-    echo -n "determining gid of domadmins..."
-    af_expected=$(getent group domadmins) || exit 1
-    af_expected=$(echo "$af_expected" | awk -F: '{print $3}')
-    echo "$af_expected"
-
-    #basic sanity...
-    test "$b4_expected" != "$af_expected" || exit 1
-
-    b4_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
-    echo "${b4_actual}" | grep -q "^# group:" || exit 1
-    b4_actual=$(echo "$b4_actual" | sed -rn 's/^# group: (.*)/\1/p')
-    $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -G domadmins 2>/dev/null || exit 1
-    af_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
-    echo "${af_actual}" | grep -q "^# group:" || exit 1
-    af_actual=$(echo "$af_actual" | sed -rn 's/^# group: (.*)/\1/p')
-    echo "before: $b4_actual"
-    echo "after: $af_actual"
-    test "$af_expected" != "$b4_actual" && test "$af_expected" = "$af_actual"
+nt_affects_chgrp()
+{
+	local share=$1
+	local b4_expected
+	local af_expected
+	local b4_actual
+	local af_actual
+	local fname="$share.$$"
+
+	echo -n "determining gid of domusers..."
+	b4_expected=$(getent group domusers) || exit 1
+	b4_expected=$(echo "$b4_expected" | awk -F: '{print $3}')
+	echo "$b4_expected"
+
+	echo -n "determining gid of domadmins..."
+	af_expected=$(getent group domadmins) || exit 1
+	af_expected=$(echo "$af_expected" | awk -F: '{print $3}')
+	echo "$af_expected"
+
+	#basic sanity...
+	test "$b4_expected" != "$af_expected" || exit 1
+
+	b4_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
+	echo "${b4_actual}" | grep -q "^# group:" || exit 1
+	b4_actual=$(echo "$b4_actual" | sed -rn 's/^# group: (.*)/\1/p')
+	$SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -G domadmins 2>/dev/null || exit 1
+	af_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "posix; getfacl $fname" 2>/dev/null) || exit 1
+	echo "${af_actual}" | grep -q "^# group:" || exit 1
+	af_actual=$(echo "$af_actual" | sed -rn 's/^# group: (.*)/\1/p')
+	echo "before: $b4_actual"
+	echo "after: $af_actual"
+	test "$af_expected" != "$b4_actual" && test "$af_expected" = "$af_actual"
 }
 
 testit "setup remote file tmp" setup_remote_file tmp
diff --git a/source3/script/tests/test_aio_outstanding.sh b/source3/script/tests/test_aio_outstanding.sh
index 4f68d3bb620..66616e99000 100755
--- a/source3/script/tests/test_aio_outstanding.sh
+++ b/source3/script/tests/test_aio_outstanding.sh
@@ -8,9 +8,9 @@
 # with 2 second delays on pread/pwrite.
 
 if [ $# -lt 4 ]; then
-    echo Usage: test_aio_outstanding.sh \
-	 SERVERCONFFILE SMBCLIENT IP aio_delay_inject_sharename
-exit 1
+	echo Usage: test_aio_outstanding.sh \
+		SERVERCONFFILE SMBCLIENT IP aio_delay_inject_sharename
+	exit 1
 fi
 
 CONF=$1
@@ -42,15 +42,16 @@ mkfifo smbclient-stdin smbclient-stdout smbclient-stderr
 rm aio_outstanding_testfile
 head -c 20MB /dev/zero >aio_outstanding_testfile
 
-CLI_FORCE_INTERACTIVE=1; export CLI_FORCE_INTERACTIVE
+CLI_FORCE_INTERACTIVE=1
+export CLI_FORCE_INTERACTIVE
 
 ${SMBCLIENT} //${SERVER}/${SHARE} ${CONF} -U${USER}%${PASSWORD} \
-	     < smbclient-stdin > smbclient-stdout 2>smbclient-stderr &
+	<smbclient-stdin >smbclient-stdout 2>smbclient-stderr &
 CLIENT_PID=$!
 
 sleep 1
 
-exec 100>smbclient-stdin  101<smbclient-stdout 102<smbclient-stderr
+exec 100>smbclient-stdin 101<smbclient-stdout 102<smbclient-stderr
 
 # consume the smbclient startup messages
 head -n 1 <&101
@@ -79,11 +80,11 @@ rm -f smbclient-stdin smbclient-stdout smbclient-stderr aio_outstanding_testfile
 mkfifo smbclient-stdin smbclient-stdout
 
 ${SMBCLIENT} //${SERVER}/${SHARE} ${CONF} -U${USER}%${PASSWORD} \
-	     < smbclient-stdin > smbclient-stdout &
+	<smbclient-stdin >smbclient-stdout &
 
 sleep 1
 
-exec 100>smbclient-stdin  101<smbclient-stdout
+exec 100>smbclient-stdin 101<smbclient-stdout
 
 echo "del aio_outstanding_testfile" >&100
 echo "exit" >&100
@@ -93,6 +94,6 @@ sleep 2
 rm -f smbclient-stdin smbclient-stdout aio_outstanding_testfile
 
 testit "check_panic" test $panic_count_0 -eq $panic_count_1 ||
-        failed=$(expr $failed + 1)
+	failed=$(expr $failed + 1)
 
 testok $0 $failed
diff --git a/source3/script/tests/test_async_req.sh b/source3/script/tests/test_async_req.sh
index fdbcb59f13d..27b4680a850 100755
--- a/source3/script/tests/test_async_req.sh
+++ b/source3/script/tests/test_async_req.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 failed=0
@@ -9,6 +9,6 @@ SOCKET_WRAPPER_IPV4_NETWORK="127.0.0.0"
 export SOCKET_WRAPPER_IPV4_NETWORK
 
 testit "async_connect_send" $VALGRIND $BINDIR/async_connect_send_test ||
-	failed=`expr $failed + 1`
+	failed=$(expr $failed + 1)
 
 testok $0 $failed
diff --git a/source3/script/tests/test_chdir_cache.sh b/source3/script/tests/test_chdir_cache.sh
index 6287d17354a..ae244acdd58 100755
--- a/source3/script/tests/test_chdir_cache.sh
+++ b/source3/script/tests/test_chdir_cache.sh
@@ -8,16 +8,21 @@
 # Copyright (C) 2021 Jeremy Allison
 
 if [ $# -lt 5 ]; then
-    echo Usage: test_chdir_user.sh \
-	 --configfile=SERVERCONFFILE SMBCLIENT SMBCONTROL SERVER SHARE
-exit 1
+	echo Usage: test_chdir_user.sh \
+		--configfile=SERVERCONFFILE SMBCLIENT SMBCONTROL SERVER SHARE
+	exit 1
 fi
 
-CONF=$1; shift 1
-SMBCLIENT=$1; shift 1
-SMBCONTROL=$1; shift 1
-SERVER=$1; shift 1
-SHARE=$1; shift 1
+CONF=$1
+shift 1
+SMBCLIENT=$1
+shift 1
+SMBCONTROL=$1
+shift 1
+SERVER=$1
+shift 1
+SHARE=$1
+shift 1
 
 # Do not let deprecated option warnings muck this up
 SAMBA_DEPRECATED_SUPPRESS=1
@@ -28,7 +33,7 @@ conf_dir=$(dirname ${SERVERCONFFILE})
 log_file=${conf_dir}/../smbd_test.log
 
 error_inject_conf=${conf_dir}/error_inject.conf
-> ${error_inject_conf}
+>${error_inject_conf}
 
 incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
@@ -40,15 +45,16 @@ cd $SELFTEST_TMPDIR || exit 1
 rm -f smbclient-stdin smbclient-stdout smbclient-stderr
 mkfifo smbclient-stdin smbclient-stdout smbclient-stderr
 
-CLI_FORCE_INTERACTIVE=1; export CLI_FORCE_INTERACTIVE
+CLI_FORCE_INTERACTIVE=1
+export CLI_FORCE_INTERACTIVE
 
 ${SMBCLIENT} //${SERVER}/${SHARE} ${CONF} -U${USER}%${PASSWORD} \
-	     < smbclient-stdin > smbclient-stdout 2>smbclient-stderr &
+	<smbclient-stdin >smbclient-stdout 2>smbclient-stderr &
 CLIENT_PID=$!
 
 # Count the number of chdir_current_service: vfs_ChDir.*failed: Permission denied
 # errors that are already in the log (should be zero).
-num_errs=`grep "chdir_current_service: vfs_ChDir.*failed: Permission denied" ${log_file} | wc -l`
+num_errs=$(grep "chdir_current_service: vfs_ChDir.*failed: Permission denied" ${log_file} | wc -l)
 
 sleep 1
 
@@ -73,7 +79,7 @@ echo "tcon ${SHARE}" >&100
 head -n 4 <&101
 
 # Ensure any chdir will give EACCESS.
-echo "error_inject:chdir = EACCES" > ${error_inject_conf}
+echo "error_inject:chdir = EACCES" >${error_inject_conf}
 ${SMBCONTROL} ${CONF} 0 reload-config
 
 sleep 1
@@ -88,15 +94,15 @@ kill ${CLIENT_PID}
 rm -f smbclient-stdin smbclient-stdout smbclient-stderr
 
 # Remove the chdir inject.
-> ${error_inject_conf}
+>${error_inject_conf}
 ${SMBCONTROL} ${CONF} 0 reload-config
 
 # Now look for chdir_current_service: vfs_ChDir.*failed: Permission denied
 # in the smb log. There should be one more than before.
 
-num_errs1=`grep "chdir_current_service: vfs_ChDir.*failed: Permission denied" ${log_file} | wc -l`
+num_errs1=$(grep "chdir_current_service: vfs_ChDir.*failed: Permission denied" ${log_file} | wc -l)
 
 testit "Verify we got at least one chdir error" \
-       test $num_errs1 -gt $num_errs || failed=$(expr $failed + 1)
+	test $num_errs1 -gt $num_errs || failed=$(expr $failed + 1)
 
 testok $0 $failed
diff --git a/source3/script/tests/test_close_denied_share.sh b/source3/script/tests/test_close_denied_share.sh
index 58850e754e3..056b8cf30df 100755
--- a/source3/script/tests/test_close_denied_share.sh
+++ b/source3/script/tests/test_close_denied_share.sh
@@ -5,9 +5,9 @@


-- 
Samba Shared Repository



More information about the samba-cvs mailing list