ENV based inter-dependencies (was: Re: Selftest environment interdependency graph)
Andrew Bartlett
abartlet at samba.org
Mon Jan 8 18:18:31 UTC 2018
On Tue, 2018-01-09 at 07:11 +1300, Andrew Bartlett via samba-technical
wrote:
> On Mon, 2018-01-08 at 14:06 +0100, Ralph Böhme wrote:
> > On Mon, Jan 08, 2018 at 02:30:47PM +0200, Alexander Bokovoy wrote:
> > > On ma, 08 tammi 2018, Ralph Böhme via samba-technical wrote:
> > > > On Mon, Jan 08, 2018 at 10:52:08PM +1300, Andrew Bartlett wrote:
> > > > > Reviewed-by: Andrew Bartlett <abartlet at samba.org>
> > > > >
> > > > > pushed!
> > > >
> > > > thanks!
> > > >
> > > > Fwiw, while debugging this problem I noticed an issue in
> > > > selftest/target/Samba3.pm:wait_for_start() in the nt4_member environment:
> > > >
> > > > $ret = system(Samba::bindir_path($self, "net") ." $envvars->{CONFIGURATION} groupmap add rid=513 unixgroup=domusers type=domain");
> > > >
> > > > fails with an error "Can't lookup UNIX group domusers" so the subsequent code is
> > > > skipped. I couldn't find the reason, so if anyone can give me a clue that would
> > > > be much appreciated.
> > >
> > > 'net groupmap' calls aren't wrapped with NSS_WRAPPER_PASSWD=/NSS_WRAPPER_GROUP=
> > > unlike winbindd startup just before them. As result, our wrapped passwd
> > > and group files aren't in use and group domusers is not found.
> >
> > Man, you're the man! :) Thanks!
> >
> > I'll prepare a patch.
>
> Also in the 'this is going to case bugs' department:
>
> In Samba4.pm we have this gem, setting global environment variables
> (rather than only in a forked child or system() call):
>
> # Add hosts file for name lookups
> $ENV{NSS_WRAPPER_HOSTS} = $testenv_vars->{NSS_WRAPPER_HOSTS};
> if (defined($testenv_vars->{RESOLV_WRAPPER_CONF})) {
> $ENV{RESOLV_WRAPPER_CONF} = $testenv_vars->{RESOLV_WRAPPER_CONF};
> } else {
> $ENV{RESOLV_WRAPPER_HOSTS} = $testenv_vars->{RESOLV_WRAPPER_HOSTS};
> }
>
> Who knows, maybe we can finally split the monster apart!
There is also this line in Samba3.pm:provision()
$ENV{KRB5CCNAME} = $ret{KRB5_CCACHE};
From:
8a029b5d2aa2604c7d79e70d1a372bd029fabd75
selftest: Do not use a central credential cache
The concept of that patch was fine, but the stamping into the global
environment must never happen in the env setup, otherwise they will
cross-pollute. It must be set with the others for each test call (in
the forked child).
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical
mailing list