"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "testprogs/blackbox/test_net_ads.sh" between
samba-4.12.3.tar.gz and samba-4.12.5.tar.gz

About: Samba is the standard Windows interoperability suite of programs for Linux and Unix providing secure, stable and fast file and print services for all clients using the SMB/CIFS protocol. 4.12 series.

test_net_ads.sh  (samba-4.12.3):test_net_ads.sh  (samba-4.12.5)
skipping to change at line 44 skipping to change at line 44
ldbadd="ldbadd" ldbadd="ldbadd"
if [ -x "$BINDIR/ldbadd" ]; then if [ -x "$BINDIR/ldbadd" ]; then
ldbadd="$BINDIR/ldbadd" ldbadd="$BINDIR/ldbadd"
fi fi
ldbdel="ldbdel" ldbdel="ldbdel"
if [ -x "$BINDIR/ldbdel" ]; then if [ -x "$BINDIR/ldbdel" ]; then
ldbdel="$BINDIR/ldbdel" ldbdel="$BINDIR/ldbdel"
fi fi
ldbmodify="ldbmodify"
if [ -x "$BINDIR/ldbmodify" ]; then
ldbmodify="$BINDIR/ldbmodify"
fi
# Load test functions # Load test functions
. `dirname $0`/subunit.sh . `dirname $0`/subunit.sh
testit "join" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD || failed =`expr $failed + 1` testit "join" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD || failed =`expr $failed + 1`
testit "testjoin" $VALGRIND $net_tool ads testjoin -kP || failed=`expr $failed + 1` testit "testjoin" $VALGRIND $net_tool ads testjoin -kP || failed=`expr $failed + 1`
netbios=$(grep "netbios name" $BASEDIR/$WORKDIR/client.conf | cut -f2 -d= | awk '{$1=$1};1') netbios=$(grep "netbios name" $BASEDIR/$WORKDIR/client.conf | cut -f2 -d= | awk '{$1=$1};1')
testit "test setspn list $netbios" $VALGRIND $net_tool ads setspn list $netbios -U$DC_USERNAME%$DC_PASSWORD || failed=`expr $failed + 1` testit "test setspn list $netbios" $VALGRIND $net_tool ads setspn list $netbios -U$DC_USERNAME%$DC_PASSWORD || failed=`expr $failed + 1`
skipping to change at line 219 skipping to change at line 224
testit_grep "check dNSHostName" $fqdn $VALGRIND $net_tool ads search -P samaccou ntname=$netbios\$ dNSHostName || failed=`expr $failed + 1` testit_grep "check dNSHostName" $fqdn $VALGRIND $net_tool ads search -P samaccou ntname=$netbios\$ dNSHostName || failed=`expr $failed + 1`
testit_grep "check SPN" ${uc_netbios}.${lc_realm} $VALGRIND $net_tool ads search -P samaccountname=$netbios\$ servicePrincipalName || failed=`expr $failed + 1` testit_grep "check SPN" ${uc_netbios}.${lc_realm} $VALGRIND $net_tool ads search -P samaccountname=$netbios\$ servicePrincipalName || failed=`expr $failed + 1`
testit_grep "dns alias SPN" $dns_alias1 $VALGRIND $net_tool ads search -P samacc ountname=$netbios\$ servicePrincipalName || failed=`expr $failed + 1` testit_grep "dns alias SPN" $dns_alias1 $VALGRIND $net_tool ads search -P samacc ountname=$netbios\$ servicePrincipalName || failed=`expr $failed + 1`
testit_grep "dns alias SPN" $dns_alias2 $VALGRIND $net_tool ads search -P samacc ountname=$netbios\$ servicePrincipalName || failed=`expr $failed + 1` testit_grep "dns alias SPN" $dns_alias2 $VALGRIND $net_tool ads search -P samacc ountname=$netbios\$ servicePrincipalName || failed=`expr $failed + 1`
testit_grep "dns alias addl" $dns_alias1 $VALGRIND $net_tool ads search -P samac countname=$netbios\$ msDS-AdditionalDnsHostName || failed=`expr $failed + 1` testit_grep "dns alias addl" $dns_alias1 $VALGRIND $net_tool ads search -P samac countname=$netbios\$ msDS-AdditionalDnsHostName || failed=`expr $failed + 1`
testit_grep "dns alias addl" $dns_alias2 $VALGRIND $net_tool ads search -P samac countname=$netbios\$ msDS-AdditionalDnsHostName || failed=`expr $failed + 1` testit_grep "dns alias addl" $dns_alias2 $VALGRIND $net_tool ads search -P samac countname=$netbios\$ msDS-AdditionalDnsHostName || failed=`expr $failed + 1`
# Test binary msDS-AdditionalDnsHostName like ones added by Windows DC
short_alias_file="$PREFIX_ABS/short_alias_file"
printf 'short_alias\0$' > $short_alias_file
cat > $PREFIX_ABS/tmpldbmodify <<EOF
dn: CN=$HOSTNAME,$computers_dn
changetype: modify
add: msDS-AdditionalDnsHostName
msDS-AdditionalDnsHostName:< file://$short_alias_file
EOF
testit "add binary msDS-AdditionalDnsHostName" $VALGRIND $ldbmodify -k yes -U$DC
_USERNAME%$DC_PASSWORD -H ldap://$SERVER.$REALM $PREFIX_ABS/tmpldbmodify || fail
ed=`expr $failed + 1`
testit_grep "addl short alias" short_alias $ldbsearch --show-binary -U$DC_USERNA
ME%$DC_PASSWORD -H ldap://$SERVER.$REALM -s base -b "CN=$HOSTNAME,CN=Computers,$
base_dn" msDS-AdditionalDnsHostName || failed=`expr $failed + 1`
rm -f $PREFIX_ABS/tmpldbmodify $short_alias_file
dedicated_keytab_file="$PREFIX_ABS/test_dns_aliases_dedicated_krb5.keytab"
testit "dns alias create_keytab" $VALGRIND $net_tool ads keytab create --option=
"kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab
_file" || failed=`expr $failed + 1`
testit_grep "dns alias1 check keytab" "host/${dns_alias1}@$REALM" $net_tool ads
keytab list --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabf
ile=$dedicated_keytab_file" || failed=`expr $failed + 1`
testit_grep "dns alias2 check keytab" "host/${dns_alias2}@$REALM" $net_tool ads
keytab list --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabf
ile=$dedicated_keytab_file" || failed=`expr $failed + 1`
testit_grep "addl short check keytab" "host/short_alias@$REALM" $net_tool ads ke
ytab list --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfil
e=$dedicated_keytab_file" || failed=`expr $failed + 1`
rm -f $dedicated_keytab_file
##Goodbye...
testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || fail
ed=`expr $failed + 1`
# netbios aliases tests
testit "join nb_alias" $VALGRIND $net_tool --option=netbiosaliases=nb_alias1,nb_
alias2 ads join -U$DC_USERNAME%$DC_PASSWORD || failed=`expr $failed + 1`
testit "testjoin nb_alias" $VALGRIND $net_tool ads testjoin || failed=`expr $fai
led + 1`
testit_grep "nb_alias check dNSHostName" $fqdn $VALGRIND $net_tool ads search -P
samaccountname=$netbios\$ dNSHostName || failed=`expr $failed + 1`
testit_grep "nb_alias check main SPN" ${uc_netbios}.${lc_realm} $VALGRIND $net_t
ool ads search -P samaccountname=$netbios\$ servicePrincipalName || failed=`expr
$failed + 1`
testit_grep "nb_alias1 SPN" nb_alias1 $VALGRIND $net_tool ads search -P samaccou
ntname=$netbios\$ servicePrincipalName || failed=`expr $failed + 1`
testit_grep "nb_alias2 SPN" nb_alias2 $VALGRIND $net_tool ads search -P samaccou
ntname=$netbios\$ servicePrincipalName || failed=`expr $failed + 1`
##Goodbye... ##Goodbye...
testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || fail ed=`expr $failed + 1` testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || fail ed=`expr $failed + 1`
# #
# Test createcomputer option of 'net ads join' # Test createcomputer option of 'net ads join'
# #
testit "Create OU=Servers,$base_dn" $VALGRIND $ldbadd -U$DC_USERNAME%$DC_PASSWOR D -H ldap://$SERVER <<EOF testit "Create OU=Servers,$base_dn" $VALGRIND $ldbadd -U$DC_USERNAME%$DC_PASSWOR D -H ldap://$SERVER <<EOF
dn: OU=Servers,$base_dn dn: OU=Servers,$base_dn
objectClass: organizationalUnit objectClass: organizationalUnit
EOF EOF
skipping to change at line 256 skipping to change at line 301
dedicated_keytab_file="$PREFIX_ABS/test_net_create_dedicated_krb5.keytab" dedicated_keytab_file="$PREFIX_ABS/test_net_create_dedicated_krb5.keytab"
testit "create_keytab" $VALGRIND $net_tool ads keytab create --option="kerberosm ethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=`expr $failed + 1` testit "create_keytab" $VALGRIND $net_tool ads keytab create --option="kerberosm ethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keytab_file" || failed=`expr $failed + 1`
testit_grep "checkupn+keytab" "host/test-$HOSTNAME@$REALM" $net_tool ads keytab list --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$de dicated_keytab_file" || failed=`expr $failed + 1` testit_grep "checkupn+keytab" "host/test-$HOSTNAME@$REALM" $net_tool ads keytab list --option="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$de dicated_keytab_file" || failed=`expr $failed + 1`
rm -f $dedicated_keytab_file rm -f $dedicated_keytab_file
testit "leave+createupn" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWO RD || failed=`expr $failed + 1` testit "leave+createupn" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWO RD || failed=`expr $failed + 1`
#
# Test dnshostname option of 'net ads join'
#
testit "join+dnshostname" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWO
RD dnshostname="alt.hostname.$HOSTNAME" || failed=`expr $failed + 1`
testit_grep "check dnshostname opt" "dNSHostName: alt.hostname.$HOSTNAME" $ldbse
arch -U$DC_USERNAME%$DC_PASSWORD -H ldap://$SERVER.$REALM -s base -b "CN=$HOSTNA
ME,CN=Computers,$base_dn" || failed=`expr $failed + 1`
testit "create_keytab+dnshostname" $VALGRIND $net_tool ads keytab create --optio
n="kerberosmethod=dedicatedkeytab" --option="dedicatedkeytabfile=$dedicated_keyt
ab_file" || failed=`expr $failed + 1`
testit_grep "check dnshostname+keytab" "host/alt.hostname.$HOSTNAME@$REALM" $net
_tool ads keytab list --option="kerberosmethod=dedicatedkeytab" --option="dedica
tedkeytabfile=$dedicated_keytab_file" || failed=`expr $failed + 1`
rm -f $dedicated_keytab_file
testit "leave+dnshostname" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASS
WORD || failed=`expr $failed + 1`
rm -rf $BASEDIR/$WORKDIR rm -rf $BASEDIR/$WORKDIR
exit $failed exit $failed
 End of changes. 3 change blocks. 
0 lines changed or deleted 88 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)