[PATCH] Add test for 'net ads (join|leave)
abartlet at samba.org
Thu Nov 5 08:02:53 UTC 2015
On Wed, 2015-11-04 at 16:47 +0200, Uri Simchoni wrote:
> On 11/01/2015 08:13 PM, Andrew Bartlett wrote:
> > On Sun, 2015-11-01 at 14:26 +0200, Uri Simchoni wrote:
> > > "source" is bash-specific. We should use "." instead.
> > >
> > > But before fixing and pushing, Andrew's comment seems correct to
> > > me -
> > > wouldn't "net join" change the shared secret between the running
> > > server
> > > and the domain and thus affect the server? It seems like it would
> > > be
> > > better to run it with an smb.conf which has "netbios name" set to
> > > some
> > > bogus name, and this way the test would run on an a different
> > > account.
> > >
> > > (I tried just passing a command line option to net, but it didn't
> > > manage
> > > to pass unharmed through the subunit functions, because of the
> > > space).
> > I think you should pass in a whole smb.conf, pointing at a
> > different
> > location (to get an effect like samba-tool domain join's -
> > -targetdir).
> > I any case, to specify options with spaces, remember that our
> > smb.conf
> > parser is whitespace insensitive except for inside the option
> > value, so
> > you can omit the spaces, eg --option=ntlmauth=true
> > Andrew Bartlett
> I pushed it as-is with the fix to "source", because I've delayed it
> enough, and am proposing the attached patch set to run the test in
> client env, so as not to impact the running server and avoid
> future "flakiness" introduced by that.
> I'm not sure how the running server is supposed to handle change of
> shared secret, perhaps it recovers gracefully from that, but the
> recovery will occur in a different test and is not the subject of
> test, so we should not be doing it.
That should (and I think is) be tested in an explict test for that, we
should try and isolate this test.
To that end, please generate and use a different smb.conf and
private/lock/state dir, so that the client environment doesn't need to
change, and does not get a join password added to it (even if now
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