selftest: Change testsuite to use a samAccountName with a space in it
authorAndrew Bartlett <abartlet@samba.org>
Thu, 12 Mar 2015 00:43:49 +0000 (13:43 +1300)
committerGünther Deschner <gd@samba.org>
Thu, 12 Mar 2015 16:13:42 +0000 (17:13 +0100)
This shows that the previous patch is correct

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
selftest/target/Samba4.pm
source4/selftest/tests.py

index 901fc62e8e38848ccd99d5d19d6a4c3a4443d7dc..5ac9a1ee0b5c1064d732202c5df2b35ce29ee8a3 100755 (executable)
@@ -834,6 +834,15 @@ sub provision_raw_step2($$$)
        open(LDIF, "|$ldbmodify -H $ctx->{privatedir}/sam.ldb");
        print LDIF "dn: $user_dn
 changetype: modify
+replace: samAccountName
+samAccountName: test allowed
+-
+";
+       close(LDIF);
+
+       open(LDIF, "|$ldbmodify -H $ctx->{privatedir}/sam.ldb");
+       print LDIF "dn: $user_dn
+changetype: modify
 replace: userPrincipalName
 userPrincipalName: testallowed upn\@$ctx->{realm}
 replace: servicePrincipalName
@@ -860,9 +869,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' testallowed";
+           . " group addmembers --configfile=$ctx->{smb_conf} 'Allowed RODC Password Replication Group' 'test allowed'";
        unless (system($samba_tool_cmd) == 0) {
-               warn("Unable to add testallowed user to 'Allowed RODC Password Replication Group': \n$samba_tool_cmd\n");
+               warn("Unable to add 'test allowed' user to 'Allowed RODC Password Replication Group': \n$samba_tool_cmd\n");
                return undef;
        }
 
@@ -1638,10 +1647,10 @@ sub provision_rodc($$$)
                return undef;
        }
 
-        # This ensures deterministic behaviour for tests that want to have the testallowed
+        # This ensures deterministic behaviour for tests that want to have the 'test allowed'
         # user password verified on the RODC
        $cmd = "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
-       $cmd .= "$samba_tool rodc preload testallowed $ret->{CONFIGURATION}";
+       $cmd .= "$samba_tool rodc preload 'test allowed' $ret->{CONFIGURATION}";
        $cmd .= " --server=$dcvars->{DC_SERVER}";
 
        unless (system($cmd) == 0) {
index cc67c206d57b79fed41e6fab35a166c15d3514b9..038513d9d10e9389888eff754c2930d9dbc1ebe3 100755 (executable)
@@ -572,7 +572,7 @@ for env in ["dc", "rodc", "promoted_dc", "plugin_s4_dc", "fl2000dc", "fl2003dc",
 
     plansmbtorture4testsuite('krb5.kdc', "%s:local" % env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-P', '--workgroup=$DOMAIN', '--realm=$REALM', '--option=torture:krb5-hostname=$SERVER', '--option=torture:expect_machine_account=true'] + extra_options,
                              "samba4.krb5.kdc with machine account")
-    plansmbtorture4testsuite('krb5.kdc', env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestallowed%$PASSWORD',
+    plansmbtorture4testsuite('krb5.kdc', env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestallowed%$PASSWORD',
                                                '--workgroup=$DOMAIN', '--realm=$REALM',
                                                '--option=torture:expect_machine_account=true',
                                                '--option=torture:krb5-upn=testallowed\ upn@$REALM',