use target::Samba3;
use target::Samba4;
use POSIX;
+use Cwd qw(abs_path);
sub new($$$$$) {
my ($classname, $bindir, $binary_mapping,$ldap, $srcdir, $server_maxtime) = @_;
return $path;
}
+sub nss_wrapper_winbind_so_path($) {
+ my ($object) = @_;
+ my $ret = $ENV{NSS_WRAPPER_WINBIND_SO_PATH};
+ if (not defined($ret)) {
+ $ret = bindir_path($object, "shared/libnss_wrapper_winbind.so.2");
+ $ret = abs_path($ret);
+ }
+ return $ret;
+}
+
sub mk_krb5_conf($$)
{
my ($ctx, $other_realms_stanza) = @_;
$netbiosname = lc($netbiosname);
my %interfaces = ();
- $interfaces{"locals3dc2"} = 2;
- $interfaces{"localmember3"} = 3;
- $interfaces{"localshare4"} = 4;
- $interfaces{"localktest6"} = 6;
- $interfaces{"maptoguest"} = 7;
+ $interfaces{"locals3dc2"} = 3;
+ $interfaces{"localmember3"} = 4;
+ $interfaces{"localshare4"} = 5;
+
+ $interfaces{"localktest6"} = 7;
+ $interfaces{"maptoguest"} = 8;
# 11-16 used by selftest.pl for client interfaces
$interfaces{"localsubdc"} = 31;
$interfaces{"chgdcpass"} = 32;
$interfaces{"promotedvdc"} = 33;
+ $interfaces{"rfc2307member"} = 34;
# update lib/socket_wrapper/socket_wrapper.c
# #define MAX_WRAPPED_INTERFACES 32
sub cleanup_child($$)
{
my ($pid, $name) = @_;
- my $childpid = waitpid($pid, WNOHANG);
+ my $childpid = -1;
+
+ if (defined($pid)) {
+ $childpid = waitpid($pid, WNOHANG);
+ }
+
if ($childpid == 0) {
} elsif ($childpid < 0) {
printf STDERR "%s child process %d isn't here any more\n",