summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-03-29 11:15:29 +0200
committerStefan Metzmacher <metze@samba.org>2015-04-09 16:58:23 +0200
commit85827c5292fca0eef565b0361948405aa662c59b (patch)
tree43de5abfb9a488338222f452aaf99c8c8a0fbb31 /selftest
parentff5f46682566452dc28123e052bb32216ebf1e14 (diff)
downloadsamba-85827c5292fca0eef565b0361948405aa662c59b.tar.gz
selftest/Samba4: use 'testallowed account' instead of 'test allowed'
local.nss test might print lines starting with 'test allowed:...' and that confused the subunit parser. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'selftest')
-rwxr-xr-xselftest/target/Samba4.pm17
1 files changed, 10 insertions, 7 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 9d765c43577..26f6ddaf9de 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -816,8 +816,9 @@ sub provision_raw_step2($$$)
return undef;
}
+ my $testallowed_account = "testallowed";
my $samba_tool_cmd = Samba::bindir_path($self, "samba-tool")
- . " user add --configfile=$ctx->{smb_conf} testallowed $ctx->{password}";
+ . " user add --configfile=$ctx->{smb_conf} $testallowed_account $ctx->{password}";
unless (system($samba_tool_cmd) == 0) {
warn("Unable to add testallowed user: \n$samba_tool_cmd\n");
return undef;
@@ -830,12 +831,13 @@ sub provision_raw_step2($$$)
$base_dn = "DC=$ctx->{netbiosname}";
}
- my $user_dn = "cn=testallowed,cn=users,$base_dn";
+ my $user_dn = "cn=$testallowed_account,cn=users,$base_dn";
+ $testallowed_account = "testallowed account";
open(LDIF, "|$ldbmodify -H $ctx->{privatedir}/sam.ldb");
print LDIF "dn: $user_dn
changetype: modify
replace: samAccountName
-samAccountName: test allowed
+samAccountName: $testallowed_account
-
";
close(LDIF);
@@ -869,9 +871,9 @@ userPrincipalName: testdenied_upn\@$ctx->{realm}.upn
close(LDIF);
$samba_tool_cmd = Samba::bindir_path($self, "samba-tool")
- . " group addmembers --configfile=$ctx->{smb_conf} 'Allowed RODC Password Replication Group' 'test allowed'";
+ . " group addmembers --configfile=$ctx->{smb_conf} 'Allowed RODC Password Replication Group' '$testallowed_account'";
unless (system($samba_tool_cmd) == 0) {
- warn("Unable to add 'test allowed' user to 'Allowed RODC Password Replication Group': \n$samba_tool_cmd\n");
+ warn("Unable to add '$testallowed_account' user to 'Allowed RODC Password Replication Group': \n$samba_tool_cmd\n");
return undef;
}
@@ -1637,10 +1639,11 @@ sub provision_rodc($$$)
return undef;
}
- # This ensures deterministic behaviour for tests that want to have the 'test allowed'
+ # This ensures deterministic behaviour for tests that want to have the 'testallowed account'
# user password verified on the RODC
+ my $testallowed_account = "testallowed account";
$cmd = "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
- $cmd .= "$samba_tool rodc preload 'test allowed' $ret->{CONFIGURATION}";
+ $cmd .= "$samba_tool rodc preload '$testallowed_account' $ret->{CONFIGURATION}";
$cmd .= " --server=$dcvars->{DC_SERVER}";
unless (system($cmd) == 0) {