[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Thu Feb 24 10:14:02 UTC 2022


The branch, master has been updated
       via  38498024974 packaging: Reformat shell scripts
       via  d42f08d16b9 nsswitch: Reformat shell scripts
       via  5b70f21d15e lib:tevent: Reformat shell scripts
       via  7fab6d53737 lib:tdb: Reformat shell scripts
       via  59b9639e8dc lib:replace: Reformat shell scripts
       via  9b0273faa7a lib:ldb: Reformat shell scripts
       via  1e880641703 lib:fuzzing: Reformat shell scripts
      from  8246ccc23d0 s3:winbind: Use the canonical principal name to renew the credentials

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


- Log -----------------------------------------------------------------
commit 38498024974455f02a99171f10d30a583e7208b6
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 21 13:53:56 2022 +0100

    packaging: Reformat shell scripts
    
    shfmt -f packaging/ | 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): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Feb 24 10:13:36 UTC 2022 on sn-devel-184

commit d42f08d16b95a7a5e0073577fe540c0923511a72
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 21 11:20:53 2022 +0100

    nsswitch: Reformat shell scripts
    
    shfmt -f nsswitch/ | 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 5b70f21d15e3879673a09a35906f04e934934d2c
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 21 11:18:40 2022 +0100

    lib:tevent: Reformat shell scripts
    
    shfmt -f lib/tevent/ | 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 7fab6d53737dd66f941a6877b86e059e7bc5bc63
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 21 11:17:52 2022 +0100

    lib:tdb: Reformat shell scripts
    
    shfmt -f lib/tdb/ | 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 59b9639e8dc96d30d4b1acfc7a52589446aff57a
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Feb 21 11:16:58 2022 +0100

    lib:replace: Reformat shell scripts
    
    shfmt -f lib/replace/ | 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 9b0273faa7ae6c04124ab50587c7b13296d9fb89
Author: Andreas Schneider <asn at samba.org>
Date:   Sat Feb 19 16:09:04 2022 +0100

    lib:ldb: Reformat shell scripts
    
    shfmt -f lib/ldb/ | 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 1e8806417037f977c73f41d036968f74a6126641
Author: Andreas Schneider <asn at samba.org>
Date:   Sat Feb 19 16:08:16 2022 +0100

    lib:fuzzing: Reformat shell scripts
    
    shfmt -f lib/fuzzing/ | xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 lib/fuzzing/oss-fuzz/build_image.sh            |   2 +-
 lib/fuzzing/oss-fuzz/check_build.sh            |  53 +++----
 lib/fuzzing/oss-fuzz/do_build.sh               |  77 +++++----
 lib/ldb/configure                              |   2 +-
 lib/ldb/docs/builddocs.sh                      |  60 +++----
 lib/ldb/docs/installdocs.sh                    |  10 +-
 lib/ldb/tests/init_slapd.sh                    |  27 ++--
 lib/ldb/tests/kill_slapd.sh                    |  12 +-
 lib/ldb/tests/ldapi_url.sh                     |   4 +-
 lib/ldb/tests/start_slapd.sh                   |   6 +-
 lib/ldb/tests/test-extended.sh                 |  22 +--
 lib/ldb/tests/test-generic.sh                  | 123 ++++++++-------
 lib/ldb/tests/test-ldap.sh                     |  52 +++---
 lib/ldb/tests/test-schema.sh                   |   3 +-
 lib/ldb/tests/test-soloading.sh                |   5 +-
 lib/ldb/tests/test-sqlite3.sh                  |   6 +-
 lib/ldb/tests/test-tdb-features.sh             |  45 +++---
 lib/ldb/tests/test-tdb-subunit.sh              |   4 +-
 lib/ldb/tests/test-tdb.sh                      |   4 +-
 lib/replace/configure                          |   2 +-
 lib/talloc/configure                           |   2 +-
 lib/tdb/configure                              |   2 +-
 lib/tdb/test/test_tdbbackup.sh                 |  29 ++--
 lib/tevent/configure                           |   2 +-
 nsswitch/tests/test_idmap_ad.sh                |  38 ++---
 nsswitch/tests/test_idmap_nss.sh               |  18 +--
 nsswitch/tests/test_idmap_rfc2307.sh           |  82 +++++-----
 nsswitch/tests/test_idmap_rid.sh               |  86 +++++-----
 nsswitch/tests/test_rfc2307_mapping.sh         | 109 ++++++-------
 nsswitch/tests/test_ticket_expiry.sh           |  24 +--
 nsswitch/tests/test_wbinfo.sh                  | 210 +++++++++++++------------
 nsswitch/tests/test_wbinfo_name_lookup.sh      |  22 +--
 nsswitch/tests/test_wbinfo_sids_to_xids.sh     |   6 +-
 nsswitch/tests/test_wbinfo_simple.sh           |   8 +-
 nsswitch/tests/test_wbinfo_user_info.sh        |  10 +-
 nsswitch/tests/test_wbinfo_user_info_cached.sh |   4 +-
 packaging/Example/package-prep                 |  14 +-
 packaging/NetworkManager/30-winbind-systemd    |  16 +-
 packaging/bin/fill-templates                   |  22 +--
 packaging/bin/update-pkginfo                   |  18 +--
 packaging/printing/smbprint                    |  22 +--
 41 files changed, 633 insertions(+), 630 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/fuzzing/oss-fuzz/build_image.sh b/lib/fuzzing/oss-fuzz/build_image.sh
index 5d5e27e716d..62a626bdff5 100755
--- a/lib/fuzzing/oss-fuzz/build_image.sh
+++ b/lib/fuzzing/oss-fuzz/build_image.sh
@@ -1,7 +1,7 @@
 #!/bin/sh -e
 
 DIST=ubuntu2004
-SCRIPT_DIR=`dirname $0`
+SCRIPT_DIR=$(dirname $0)
 
 $SCRIPT_DIR/../../../bootstrap/generated-dists/$DIST/bootstrap.sh
 $SCRIPT_DIR/../../../bootstrap/generated-dists/$DIST/locale.sh
diff --git a/lib/fuzzing/oss-fuzz/check_build.sh b/lib/fuzzing/oss-fuzz/check_build.sh
index 98b83a81bbf..6523bf32ace 100755
--- a/lib/fuzzing/oss-fuzz/check_build.sh
+++ b/lib/fuzzing/oss-fuzz/check_build.sh
@@ -16,34 +16,33 @@ OUT=$1
 
 seeds_found=no
 
-for bin in $OUT/fuzz_*
-do
-    # we only want to look at the elf files, not the zips
-    if [ ${bin%_seed_corpus.zip} != $bin ]; then
-        continue
-    fi
-    # Confirm that the chrpath was reset to lib/ in the same directory
-    # as the binary.  RPATH (not RUNPATH) is critical, otherwise
-    # libraries used by libraries won't be found on the oss-fuzz
-    # target host.
-    chrpath -l $bin | grep 'RPATH=$ORIGIN/lib'
-
-    # Confirm that we link to at least some libraries in this
-    # directory (shows that the libraries were found and copied).
-    ldd $bin | grep "$OUT/lib"
-    num_libs=$(ldd $bin | grep -v ld-linux | grep -v linux-vdso | grep -v "$OUT/lib"| wc -l)
-
-    if [ 0$num_libs -ne 0 ]; then
-	echo "some libraries not linked to $ORIGIN/lib, oss-fuzz will fail!"
-	exit 1
-    fi
-
-    if [ -f ${bin}_seed_corpus.zip ]; then
-        seeds_found=yes
-    fi
+for bin in $OUT/fuzz_*; do
+	# we only want to look at the elf files, not the zips
+	if [ ${bin%_seed_corpus.zip} != $bin ]; then
+		continue
+	fi
+	# Confirm that the chrpath was reset to lib/ in the same directory
+	# as the binary.  RPATH (not RUNPATH) is critical, otherwise
+	# libraries used by libraries won't be found on the oss-fuzz
+	# target host.
+	chrpath -l $bin | grep 'RPATH=$ORIGIN/lib'
+
+	# Confirm that we link to at least some libraries in this
+	# directory (shows that the libraries were found and copied).
+	ldd $bin | grep "$OUT/lib"
+	num_libs=$(ldd $bin | grep -v ld-linux | grep -v linux-vdso | grep -v "$OUT/lib" | wc -l)
+
+	if [ 0$num_libs -ne 0 ]; then
+		echo "some libraries not linked to $ORIGIN/lib, oss-fuzz will fail!"
+		exit 1
+	fi
+
+	if [ -f ${bin}_seed_corpus.zip ]; then
+		seeds_found=yes
+	fi
 done
 
 if [ $seeds_found = no ]; then
-    echo "no seed zip files were found!"
-    exit 1
+	echo "no seed zip files were found!"
+	exit 1
 fi
diff --git a/lib/fuzzing/oss-fuzz/do_build.sh b/lib/fuzzing/oss-fuzz/do_build.sh
index 159e9579155..3b2fdd0da94 100755
--- a/lib/fuzzing/oss-fuzz/do_build.sh
+++ b/lib/fuzzing/oss-fuzz/do_build.sh
@@ -56,13 +56,13 @@ export PYTHON
 # correctly
 
 case "$SANITIZER" in
-    address)
+address)
 	SANITIZER_ARG='--address-sanitizer'
 	;;
-    undefined)
+undefined)
 	SANITIZER_ARG='--undefined-sanitizer'
 	;;
-    coverage)
+coverage)
 	# Thankfully clang operating as ld has no objection to the
 	# cc style options, so we can just set ADDITIONAL_LDFLAGS
 	# to ensure the coverage build is done, despite waf splitting
@@ -71,7 +71,7 @@ case "$SANITIZER" in
 	export ADDITIONAL_LDFLAGS
 
 	SANITIZER_ARG=''
-       ;;
+	;;
 esac
 
 # $LIB_FUZZING_ENGINE is provided by the oss-fuzz "compile" command
@@ -81,14 +81,14 @@ esac
 # header instead of RUNPATH header. Modern linkers use RUNPATH by
 # default.
 ./configure -C --without-gettext --enable-debug --enable-developer \
-            --enable-libfuzzer \
-	    $SANITIZER_ARG \
-	    --disable-warnings-as-errors \
-	    --abi-check-disable \
-	    "--fuzz-target-ldflags=-Wl,--disable-new-dtags $LIB_FUZZING_ENGINE" \
-	    --nonshared-binary=ALL \
-	    "$@" \
-	    LINK_CC="$CXX"
+	--enable-libfuzzer \
+	$SANITIZER_ARG \
+	--disable-warnings-as-errors \
+	--abi-check-disable \
+	"--fuzz-target-ldflags=-Wl,--disable-new-dtags $LIB_FUZZING_ENGINE" \
+	--nonshared-binary=ALL \
+	"$@" \
+	LINK_CC="$CXX"
 
 make -j
 
@@ -236,37 +236,36 @@ mkdir -p $OUT/lib
 # See how the runtime linker seems to honour the RPATH for
 # dependencies of dependencies in this case.  This helps us us lot.
 
-for x in bin/fuzz_*
-do
-    # Copy any system libraries needed by this fuzzer to $OUT/lib.
+for x in bin/fuzz_*; do
+	# Copy any system libraries needed by this fuzzer to $OUT/lib.
 
-    # We run ldd on $x, the fuzz_binary in bin/ which has not yet had
-    # the RPATH altered.  This is clearer for debugging in local
-    # development builds as $OUT is not cleaned between runs.
-    #
-    # Otherwise trying to re-run this can see cp can fail with:
-    # cp: '/out/lib/libgcc_s.so.1' and '/out/lib/libgcc_s.so.1' are the same file
-    # which is really confusing!
+	# We run ldd on $x, the fuzz_binary in bin/ which has not yet had
+	# the RPATH altered.  This is clearer for debugging in local
+	# development builds as $OUT is not cleaned between runs.
+	#
+	# Otherwise trying to re-run this can see cp can fail with:
+	# cp: '/out/lib/libgcc_s.so.1' and '/out/lib/libgcc_s.so.1' are the same file
+	# which is really confusing!
 
-    # The cut for ( and ' ' removes the special case references to:
-    # 	linux-vdso.so.1 =>  (0x00007ffe8f2b2000)
-    #   /lib64/ld-linux-x86-64.so.2 (0x00007fc63ea6f000)
+	# The cut for ( and ' ' removes the special case references to:
+	# 	linux-vdso.so.1 =>  (0x00007ffe8f2b2000)
+	#   /lib64/ld-linux-x86-64.so.2 (0x00007fc63ea6f000)
 
-    ldd $x | cut -f 2 -d '>' | cut -f 1 -d \( | cut -f 2 -d  ' ' | xargs -i cp \{\} $OUT/lib/
+	ldd $x | cut -f 2 -d '>' | cut -f 1 -d \( | cut -f 2 -d ' ' | xargs -i cp \{\} $OUT/lib/
 
-    cp $x $OUT/
-    bin=`basename $x`
+	cp $x $OUT/
+	bin=$(basename $x)
 
-    # This means the copied libraries are found on the runner.
-    #
-    # The binaries should we built with RPATH, not RUNPATH, to allow
-    # libraries used by libraries to be found. This command retains the
-    # RPATH/RUNPATH header and only changes the path. We later verify this
-    # in the check_build.sh script.
-    chrpath -r '$ORIGIN/lib' $OUT/$bin
+	# This means the copied libraries are found on the runner.
+	#
+	# The binaries should we built with RPATH, not RUNPATH, to allow
+	# libraries used by libraries to be found. This command retains the
+	# RPATH/RUNPATH header and only changes the path. We later verify this
+	# in the check_build.sh script.
+	chrpath -r '$ORIGIN/lib' $OUT/$bin
 
-    # Truncate the original binary to save space
-    echo -n > $x
+	# Truncate the original binary to save space
+	echo -n >$x
 
 done
 
@@ -288,8 +287,8 @@ chrpath -d $OUT/lib/*
 # beside their executables.
 
 wget https://gitlab.com/samba-team/samba-fuzz-seeds/-/jobs/artifacts/master/download?job=zips \
-     -O seeds.zip
+	-O seeds.zip
 
 # We might not have unzip, but we do have python
-$PYTHON -mzipfile -e seeds.zip  $OUT
+$PYTHON -mzipfile -e seeds.zip $OUT
 rm -f seeds.zip
diff --git a/lib/ldb/configure b/lib/ldb/configure
index 6c931bfbf5e..8979f07581b 100755
--- a/lib/ldb/configure
+++ b/lib/ldb/configure
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PREVPATH=`dirname $0`
+PREVPATH=$(dirname $0)
 
 if [ -f $PREVPATH/../../buildtools/bin/waf ]; then
 	WAF=../../buildtools/bin/waf
diff --git a/lib/ldb/docs/builddocs.sh b/lib/ldb/docs/builddocs.sh
index 449dcb26815..b7e11d31375 100755
--- a/lib/ldb/docs/builddocs.sh
+++ b/lib/ldb/docs/builddocs.sh
@@ -6,8 +6,8 @@ XSLTPROC="$1"
 SRCDIR="$2"
 
 if [ -z "$XSLTPROC" ] || [ ! -x "$XSLTPROC" ]; then
-    echo "xsltproc not installed"
-    exit 0
+	echo "xsltproc not installed"
+	exit 0
 fi
 
 MANXSL="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
@@ -16,37 +16,37 @@ HTMLXSL="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
 mkdir -p man
 
 for f in $SRCDIR/man/*.xml; do
-    base=`basename $f .xml`
-    out=man/"`basename $base`"
-    if [ ! -f "$out" ] || [ "$f" -nt "$out" ]; then
-	echo Processing manpage $f
-	$XSLTPROC --nonet -o "$out" "$MANXSL" $f
-	ret=$?
-	if [ "$ret" = "4" ]; then
-	    echo "ignoring stylesheet error 4 for $MANXSL"
-	    exit 0
+	base=$(basename $f .xml)
+	out=man/"$(basename $base)"
+	if [ ! -f "$out" ] || [ "$f" -nt "$out" ]; then
+		echo Processing manpage $f
+		$XSLTPROC --nonet -o "$out" "$MANXSL" $f
+		ret=$?
+		if [ "$ret" = "4" ]; then
+			echo "ignoring stylesheet error 4 for $MANXSL"
+			exit 0
+		fi
+		if [ "$ret" != "0" ]; then
+			echo "xsltproc failed with error $ret"
+			exit $ret
+		fi
 	fi
-	if [ "$ret" != "0" ]; then
-	    echo "xsltproc failed with error $ret"
-	    exit $ret
-	fi
-    fi
 done
 
 for f in $SRCDIR/man/*.xml; do
-    base=`basename $f .xml`
-    out=man/"`basename $base`".html
-    if [ ! -f "$out" ] || [ "$f" -nt "$out" ]; then
-	echo Processing html $f
-	$XSLTPROC --nonet -o "$out" "$HTMLXSL" $f
-	ret=$?
-	if [ "$ret" = "4" ]; then
-	    echo "ignoring stylesheet error 4 for $HTMLXSL"
-	    exit 0
-	fi
-	if [ "$ret" != "0" ]; then
-	    echo "xsltproc failed with error $ret"
-	    exit $ret
+	base=$(basename $f .xml)
+	out=man/"$(basename $base)".html
+	if [ ! -f "$out" ] || [ "$f" -nt "$out" ]; then
+		echo Processing html $f
+		$XSLTPROC --nonet -o "$out" "$HTMLXSL" $f
+		ret=$?
+		if [ "$ret" = "4" ]; then
+			echo "ignoring stylesheet error 4 for $HTMLXSL"
+			exit 0
+		fi
+		if [ "$ret" != "0" ]; then
+			echo "xsltproc failed with error $ret"
+			exit $ret
+		fi
 	fi
-    fi
 done
diff --git a/lib/ldb/docs/installdocs.sh b/lib/ldb/docs/installdocs.sh
index 6cc7b74ad51..90daf6f6154 100755
--- a/lib/ldb/docs/installdocs.sh
+++ b/lib/ldb/docs/installdocs.sh
@@ -4,14 +4,14 @@
 
 MANDIR="$1"
 
-MAN1="`/bin/ls man/*.1`"
-MAN3="`/bin/ls man/*.3`"
+MAN1="$(/bin/ls man/*.1)"
+MAN3="$(/bin/ls man/*.3)"
 
 if [ -z "$MAN1" ] && [ -z "$MAN3" ]; then
-    echo "No manpages have been built"
-    exit 0
+	echo "No manpages have been built"
+	exit 0
 fi
 
-mkdir -p "$MANDIR/man1" "$MANDIR/man3" 
+mkdir -p "$MANDIR/man1" "$MANDIR/man3"
 cp $MAN1 "$MANDIR/man1/" || exit 1
 cp $MAN3 "$MANDIR/man3/" || exit 1
diff --git a/lib/ldb/tests/init_slapd.sh b/lib/ldb/tests/init_slapd.sh
index cf06acd08b9..4629cf13974 100755
--- a/lib/ldb/tests/init_slapd.sh
+++ b/lib/ldb/tests/init_slapd.sh
@@ -1,20 +1,20 @@
-#!/bin/sh 
+#!/bin/sh
 
 if [ -z "$LDBDIR" ]; then
-    LDBDIR=`dirname $0`/..
-    export LDBDIR
+	LDBDIR=$(dirname $0)/..
+	export LDBDIR
 fi
 
 rm -rf tests/tmp/db
 mkdir -p tests/tmp/db
 
 if [ -f tests/tmp/slapd.pid ]; then
-    kill `cat tests/tmp/slapd.pid`
-    sleep 1
+	kill $(cat tests/tmp/slapd.pid)
+	sleep 1
 fi
 if [ -f tests/tmp/slapd.pid ]; then
-    kill -9 `cat tests/tmp/slapd.pid`
-    rm -f tests/tmp/slapd.pid
+	kill -9 $(cat tests/tmp/slapd.pid)
+	rm -f tests/tmp/slapd.pid
 fi
 
 # we don't consider a slapadd failure as a test suite failure, as it
@@ -24,18 +24,17 @@ MODCONF=tests/tmp/modules.conf
 rm -f $MODCONF
 touch $MODCONF || exit 1
 
-slaptest -u -f $LDBDIR/tests/slapd.conf > /dev/null 2>&1 || {
- echo "enabling sladp modules"
-cat > $MODCONF <<EOF
+slaptest -u -f $LDBDIR/tests/slapd.conf >/dev/null 2>&1 || {
+	echo "enabling sladp modules"
+	cat >$MODCONF <<EOF
 modulepath	/usr/lib/ldap
 moduleload	back_bdb
 EOF
 }
 
 slaptest -u -f $LDBDIR/tests/slapd.conf || {
-    echo "slaptest failed - skipping ldap tests"
-    exit 0
+	echo "slaptest failed - skipping ldap tests"
+	exit 0
 }
 
-slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 0
-
+slapadd -f $LDBDIR/tests/slapd.conf <$LDBDIR/tests/init.ldif || exit 0
diff --git a/lib/ldb/tests/kill_slapd.sh b/lib/ldb/tests/kill_slapd.sh
index 91beb108149..c60ae33a9c3 100755
--- a/lib/ldb/tests/kill_slapd.sh
+++ b/lib/ldb/tests/kill_slapd.sh
@@ -1,12 +1,12 @@
-#!/bin/sh 
+#!/bin/sh
 
 if [ -z "$LDBDIR" ]; then
-    LDBDIR=`dirname $0`/..
-    export LDBDIR
+	LDBDIR=$(dirname $0)/..
+	export LDBDIR
 fi
 
 if [ -f tests/tmp/slapd.pid ]; then
-    echo "killing slapd process `cat tests/tmp/slapd.pid`"
-    kill -9 `cat tests/tmp/slapd.pid`
-    rm -f tests/tmp/slapd.pid
+	echo "killing slapd process $(cat tests/tmp/slapd.pid)"
+	kill -9 $(cat tests/tmp/slapd.pid)
+	rm -f tests/tmp/slapd.pid
 fi
diff --git a/lib/ldb/tests/ldapi_url.sh b/lib/ldb/tests/ldapi_url.sh
index fef6c35f2be..bcda91752e4 100755
--- a/lib/ldb/tests/ldapi_url.sh
+++ b/lib/ldb/tests/ldapi_url.sh
@@ -2,10 +2,10 @@
 
 # aargh, did LDAP ever have to expose this crap to users ...
 
-BASE=`pwd`
+BASE=$(pwd)
 
 TMPDIR=$BASE/tests/tmp
 
-LDAPI_ESCAPE=`echo $TMPDIR/ldapi | sed 's|/|%2F|g'`
+LDAPI_ESCAPE=$(echo $TMPDIR/ldapi | sed 's|/|%2F|g')
 
 echo "ldapi://$LDAPI_ESCAPE"
diff --git a/lib/ldb/tests/start_slapd.sh b/lib/ldb/tests/start_slapd.sh
index 11679d47a3e..4a4a35ea9c6 100755
--- a/lib/ldb/tests/start_slapd.sh
+++ b/lib/ldb/tests/start_slapd.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 
 if [ -z "$LDBDIR" ]; then
-    LDBDIR=`dirname $0`/..
-    export LDBDIR
+	LDBDIR=$(dirname $0)/..
+	export LDBDIR
 fi
 
 mkdir -p $LDBDIR/tests/tmp/db
 
 # running slapd in the background (with &) means it stays in the same process group, so it can be
 # killed by timelimit
-slapd -d0 -f $LDBDIR/tests/slapd.conf -h "`$LDBDIR/tests/ldapi_url.sh`" $* &
+slapd -d0 -f $LDBDIR/tests/slapd.conf -h "$($LDBDIR/tests/ldapi_url.sh)" $* &
 
 sleep 2
diff --git a/lib/ldb/tests/test-extended.sh b/lib/ldb/tests/test-extended.sh
index 0599757cc5a..f4dabd67d7b 100755
--- a/lib/ldb/tests/test-extended.sh
+++ b/lib/ldb/tests/test-extended.sh
@@ -35,16 +35,17 @@ groupType: 2147483649
 samAccountType: 805306369
 EOF
 
-checkcount() {
-    count=$1
-    expression="$2"
-    n=`$VALGRIND ldbsearch "$expression" | grep '^dn' | wc -l`
-    if [ $n != $count ]; then
-	echo "Got $n but expected $count for $expression"
-	$VALGRIND ldbsearch "$expression"
-	exit 1
-    fi
-    echo "OK: $count $expression"
+checkcount()
+{
+	count=$1
+	expression="$2"
+	n=$($VALGRIND ldbsearch "$expression" | grep '^dn' | wc -l)
+	if [ $n != $count ]; then
+		echo "Got $n but expected $count for $expression"
+		$VALGRIND ldbsearch "$expression"
+		exit 1
+	fi
+	echo "OK: $count $expression"
 }
 
 checkcount 1 '(i3=1234)'
@@ -66,4 +67,3 @@ checkcount 1 '(i1:1.2.840.113556.1.4.804:=8388608)'
 
 # this is one that w2k gives
 checkcount 3 '(|(|(&(!(groupType:1.2.840.113556.1.4.803:=1))(groupType:1.2.840.113556.1.4.803:=2147483648)(groupType:1.2.840.113556.1.4.804:=10))(samAccountType=805306368))(samAccountType=805306369))'
-
diff --git a/lib/ldb/tests/test-generic.sh b/lib/ldb/tests/test-generic.sh
index 2774938b433..03ac91455eb 100755
--- a/lib/ldb/tests/test-generic.sh
+++ b/lib/ldb/tests/test-generic.sh
@@ -1,8 +1,8 @@
 #!/bin/sh
 
 if [ -z "$LDB_SPECIALS" ]; then
-    LDB_SPECIALS=1
-    export LDB_SPECIALS
+	LDB_SPECIALS=1
+	export LDB_SPECIALS
 fi
 
 echo "LDB_URL: $LDB_URL"
@@ -11,15 +11,15 @@ echo "Adding base elements"
 $VALGRIND ldbadd $LDBDIR/tests/test.ldif || exit 1
 
 echo "Adding again - should fail"
-$VALGRIND ldbadd $LDBDIR/tests/test.ldif 2> /dev/null && {
-    echo "Should have failed to add again - gave $?"
-    exit 1
+$VALGRIND ldbadd $LDBDIR/tests/test.ldif 2>/dev/null && {


-- 
Samba Shared Repository



More information about the samba-cvs mailing list