[PATCH] Simplify auth_check_ntlm_password
Andrew Bartlett
abartlet at samba.org
Wed Mar 8 03:02:53 UTC 2017
On Tue, 2017-03-07 at 17:46 -0800, Jeremy Allison wrote:
> On Wed, Mar 08, 2017 at 01:59:18PM +1300, Andrew Bartlett wrote:
> > On Tue, 2017-03-07 at 13:52 -0800, Jeremy Allison wrote:
> > > On Wed, Mar 08, 2017 at 10:04:19AM +1300, Andrew Bartlett wrote:
> > > > On Tue, 2017-03-07 at 14:28 +0100, Volker Lendecke wrote:
> > > > > Hi!
> > > > >
> > > > > While working on the auth code I had a hard time following
> > > > > the
> > > > > logic
> > > > > in auth_check_ntlm_password. The attached patchset is
> > > > > supposed to
> > > > > make
> > > > > that more traceable. It does not change behaviour, those
> > > > > patches
> > > > > will
> > > > > come at a later step and will make the routine even simpler.
> > > > > The
> > > > > behaviour change will be to always break out of the loop if
> > > > >
> > > > > !NT_STATUS_EQUAL(nt_status,NT_STATUS_NOT_IMPLEMENTED);
> > > > >
> > > > > Review appreciated!
> > > >
> > > > Thanks Volker, these look like a helpful start to making this
> > > > stuff
> > > > simpler.
> > > >
> > > > I looked at this set last night, to see how it works with the
> > > > authentication audit code (so I could integrate into that
> > > > series it
> > > > as
> > > > promised). Putting it in before causes rebase pain, so I'll
> > > > take a
> > > > look at adding it after and see if it is any less difficult.
> > > >
> > > > Otherwise I'll take the concepts and apply them once we are
> > > > done.
> > >
> > > Really ? Does this cause much rebase pain ? Yeah, it'll cause
> > > some, but this really does clean up these code paths.
> >
> > I'm not objecting to the patch, just saying I will try and add it
> > on
> > top of the branch rather than underneath it. I did actually try
> > the
> > rebase last night, and perhaps you have better luck, but I've had
> > enough of these go bad on me that I would just like to apply it on
> > top,
> > if that is OK.
> >
> > > Looking at the previously posted logging patch I can only
> > > find two places where the logging patch touches
> > > source3/auth/auth.c:
> >
> > We keep our repo public, but we haven't been spamming the list as
> > we
> > go. The current code is in auth-logging-ntlm in the catalyst git
> > repo.
> >
> > git://git.catalyst.net.nz/samba.git auth-logging-ntlm
>
> Here is your patch rebased on top of Volker's work applied to
> master.
>
> It only took 10 mins or so (so I exaggerated about 2 mins :-).
>
> I didn't fix the 'static' issue as I only wanted to show your
> exact code on top of what I'm proposing to push.
>
> I haven't compiled it yet :-).
>
> Doing the rebase really isn't that hard - it'd be good for
> Gary to learn this skill now rather than later !
Thanks for trying. Sadly it looks like our repo and what you rebased
have already diverged, and I can't make much sense of it. I've tried a
number of tacks, but I'm going to have to ask you take a look at it
again later, as I'm just loosing time.
Sorry,
Andrew Bartlett
More information about the samba-technical
mailing list