2 # Bootstrap Samba and run a number of tests against it.
3 # Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org>
4 # Published under the GNU GPL, v3 or later.
13 my ($classname, $bindir, $binary_mapping,$ldap, $srcdir, $exeext, $server_maxtime) = @_;
16 samba3
=> new Samba3
($bindir,$binary_mapping, $srcdir, $exeext, $server_maxtime),
17 samba4
=> new Samba4
($bindir,$binary_mapping, $ldap, $srcdir, $exeext, $server_maxtime),
25 my ($self, $envname, $path) = @_;
27 $ENV{ENVNAME
} = $envname;
29 my $env = $self->{samba4
}->setup_env($envname, $path);
31 if (not defined($env->{target
})) {
32 $env->{target
} = $self->{samba4
};
35 $env = $self->{samba3
}->setup_env($envname, $path);
37 if (not defined($env->{target
})) {
38 $env->{target
} = $self->{samba3
};
42 if (not defined $env) {
43 warn("Samba can't provide environment '$envname'");
50 my ($object, $path) = @_;
52 if (defined($object->{binary_mapping
}->{$path})) {
53 $path = $object->{binary_mapping
}->{$path};
56 my $valpath = "$object->{bindir}/$path$object->{exeext}";
58 return $valpath if (-f
$valpath);
66 unless (open(KRB5CONF
, ">$ctx->{krb5_conf}")) {
67 warn("can't open $ctx->{krb5_conf}$?");
71 #Generated krb5.conf for $ctx->{realm}
74 default_realm = $ctx->{realm}
75 dns_lookup_realm = false
76 dns_lookup_kdc = false
79 allow_weak_crypto = yes
83 kdc = $ctx->{kdc_ipv4}:88
84 admin_server = $ctx->{kdc_ipv4}:88
85 default_domain = $ctx->{dnsname}
88 kdc = $ctx->{kdc_ipv4}:88
89 admin_server = $ctx->{kdc_ipv4}:88
90 default_domain = $ctx->{dnsname}
93 kdc = $ctx->{kdc_ipv4}:88
94 admin_server = $ctx->{kdc_ipv4}:88
95 default_domain = $ctx->{dnsname}
99 .$ctx->{dnsname} = $ctx->{realm}
102 if (defined($ctx->{tlsdir
})) {
106 pkinit_anchors = FILE:$ctx->{tlsdir}/ca.pem
110 pkinit_identity = FILE:$ctx->{tlsdir}/kdc.pem,$ctx->{tlsdir}/key.pem
111 pkinit_anchors = FILE:$ctx->{tlsdir}/ca.pem