diff options
-rwxr-xr-x | source4/scripting/bin/setup_dns.sh | 7 | ||||
-rwxr-xr-x | testprogs/blackbox/test_chgdcpass.sh | 7 | ||||
-rwxr-xr-x | testprogs/blackbox/test_export_keytab.sh | 6 | ||||
-rwxr-xr-x | testprogs/blackbox/test_kinit.sh | 12 | ||||
-rwxr-xr-x | testprogs/blackbox/test_ktpass.sh | 6 | ||||
-rwxr-xr-x | testprogs/blackbox/test_passwords.sh | 12 | ||||
-rwxr-xr-x | testprogs/blackbox/test_pkinit.sh | 12 | ||||
-rwxr-xr-x | testprogs/blackbox/test_samba_upgradedns.sh | 6 |
8 files changed, 57 insertions, 11 deletions
diff --git a/source4/scripting/bin/setup_dns.sh b/source4/scripting/bin/setup_dns.sh index bc2ae96b845..166a2b84351 100755 --- a/source4/scripting/bin/setup_dns.sh +++ b/source4/scripting/bin/setup_dns.sh @@ -18,10 +18,15 @@ RSUFFIX=$(echo $DOMAIN | sed s/[\.]/,DC=/g) OBJECTGUID=$(bin/ldbsearch -s base -H "$PRIVATEDIR/sam.ldb" -b "CN=NTDS Settings,CN=$HOSTNAME,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=$RSUFFIX" objectguid|grep ^objectGUID| cut -d: -f2) +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=bin/samba4kinit +fi + echo "Found objectGUID $OBJECTGUID" echo "Running kinit for $HOSTNAME\$@$DOMAIN" -bin/samba4kinit -e arcfour-hmac-md5 -k -t "$PRIVATEDIR/secrets.keytab" $HOSTNAME\$@$DOMAIN || exit 1 +$samba4kinit -e arcfour-hmac-md5 -k -t "$PRIVATEDIR/secrets.keytab" $HOSTNAME\$@$DOMAIN || exit 1 echo "Adding $HOSTNAME.$DOMAIN" scripting/bin/nsupdate-gss --noverify $HOSTNAME $DOMAIN $IP 300 || { echo "Failed to add A record" diff --git a/testprogs/blackbox/test_chgdcpass.sh b/testprogs/blackbox/test_chgdcpass.sh index d4734ea0286..35161251716 100755 --- a/testprogs/blackbox/test_chgdcpass.sh +++ b/testprogs/blackbox/test_chgdcpass.sh @@ -23,7 +23,12 @@ failed=0 samba4bindir="$BINDIR" samba4srcdir="$SRCDIR/source4" -samba4kinit="$samba4bindir/samba4kinit" + +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=bin/samba4kinit +fi + machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache" diff --git a/testprogs/blackbox/test_export_keytab.sh b/testprogs/blackbox/test_export_keytab.sh index a72c5484782..736c7af099f 100755 --- a/testprogs/blackbox/test_export_keytab.sh +++ b/testprogs/blackbox/test_export_keytab.sh @@ -20,10 +20,14 @@ shift 6 failed=0 samba4bindir="$BINDIR" -samba4kinit="$samba4bindir/samba4kinit" samba_tool="$samba4bindir/samba-tool" newuser="$samba_tool user create" +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=$BINDIR/samba4kinit +fi + . `dirname $0`/subunit.sh test_smbclient() { diff --git a/testprogs/blackbox/test_kinit.sh b/testprogs/blackbox/test_kinit.sh index adfed782555..000303ac71f 100755 --- a/testprogs/blackbox/test_kinit.sh +++ b/testprogs/blackbox/test_kinit.sh @@ -23,10 +23,18 @@ failed=0 samba4bindir="$BINDIR" samba4srcdir="$SRCDIR/source4" -samba4kinit="$samba4bindir/samba4kinit" +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=$BINDIR/samba4kinit +fi + samba_tool="$samba4bindir/samba-tool" rkpty="$samba4bindir/rkpty" -samba4kpasswd="$samba4bindir/samba4kpasswd" +samba4kpasswd=kpasswd +if test -x $BINDIR/samba4kpasswd; then + samba4kpasswd=$BINDIR/samba4kpasswd +fi + enableaccount="$samba_tool user enable" machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache" diff --git a/testprogs/blackbox/test_ktpass.sh b/testprogs/blackbox/test_ktpass.sh index f9672facabf..8a43eb31a0a 100755 --- a/testprogs/blackbox/test_ktpass.sh +++ b/testprogs/blackbox/test_ktpass.sh @@ -16,7 +16,11 @@ shift 1 samba_tool="$BINDIR/samba-tool" samba4bindir="$BINDIR" samba4srcdir="$SRCDIR/source4" -samba4kinit="$samba4bindir/samba4kinit" +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=$BINDIR/samba4kinit +fi + CONFIG="--configfile=$PREFIX/dc/etc/smb.conf" TESTUSER="ktpassUser" diff --git a/testprogs/blackbox/test_passwords.sh b/testprogs/blackbox/test_passwords.sh index ab546a63084..4810177d127 100755 --- a/testprogs/blackbox/test_passwords.sh +++ b/testprogs/blackbox/test_passwords.sh @@ -21,11 +21,19 @@ shift 7 failed=0 samba4bindir="$BINDIR" -samba4kinit="$samba4bindir/samba4kinit" +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=$BINDIR/samba4kinit +fi + samba_tool="$samba4bindir/samba-tool" smbpasswd="$samba4bindir/smbpasswd" rkpty="$samba4bindir/rkpty" -samba4kpasswd="$samba4bindir/samba4kpasswd" +samba4kpasswd=kpasswd +if test -x $BINDIR/samba4kpasswd; then + samba4kpasswd=$BINDIR/samba4kpasswd +fi + newuser="$samba_tool user create" . `dirname $0`/subunit.sh diff --git a/testprogs/blackbox/test_pkinit.sh b/testprogs/blackbox/test_pkinit.sh index 8fab26158b4..78c888bb6c3 100755 --- a/testprogs/blackbox/test_pkinit.sh +++ b/testprogs/blackbox/test_pkinit.sh @@ -23,10 +23,18 @@ failed=0 samba4bindir="$BINDIR" samba4srcdir="$SRCDIR/source4" -samba4kinit="$samba4bindir/samba4kinit" +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=$BINDIR/samba4kinit +fi + samba_tool="$samba4bindir/samba-tool" rkpty="$samba4bindir/rkpty" -samba4kpasswd="$samba4bindir/samba4kpasswd" +samba4kpasswd=kpasswd +if test -x $BINDIR/samba4kpasswd; then + samba4passwd=$BINDIR/samba4kpasswd +fi + enableaccount="$samba_tool user enable" machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache" diff --git a/testprogs/blackbox/test_samba_upgradedns.sh b/testprogs/blackbox/test_samba_upgradedns.sh index a080f735ea4..cd5b833b21b 100755 --- a/testprogs/blackbox/test_samba_upgradedns.sh +++ b/testprogs/blackbox/test_samba_upgradedns.sh @@ -19,7 +19,11 @@ failed=0 samba4bindir="$BINDIR" samba4srcdir="$SRCDIR/source4" -samba4kinit="$samba4bindir/samba4kinit" +samba4kinit=kinit +if test -x $BINDIR/samba4kinit; then + samba4kinit=$BINDIR/samba4kinit +fi + . `dirname $0`/subunit.sh |