[PATCH] pyauth: Remove the imessaging_ctx parameter

Alexander Bokovoy ab at samba.org
Wed Oct 3 20:24:09 UTC 2018


On ke, 03 loka 2018, Rowland Penny via samba-technical wrote:
> On Wed, 3 Oct 2018 22:49:57 +0300
> Alexander Bokovoy via samba-technical <samba-technical at lists.samba.org>
> wrote:
> 
> > On ke, 03 loka 2018, Noel Power via samba-technical wrote:
> > > On 03/10/2018 10:37, Noel Power via samba-technical wrote:
> > > > RB+
> > > > 
> > > > On 02/10/2018 21:01, Gary Lockyer via samba-technical wrote:
> > > > > Remove the imessaging_ctx parameter from the pyauth
> > > > > constructor. The pyauth code expects this to be a
> > > > > imessaging_context struct.  The imessaging code returns a
> > > > > wrapper structure that contains the imessaging_context and the
> > > > > talloc context it's allocated on.  As no code uses this, and to
> > > > > save others a wasted afternoon I've removed the parameter.
> > > > > Could I get a review? CI run results
> > > > > https://gitlab.com/catalyst-samba/samba/pipelines/31618803
> > > > > 
> > > > > Thanks
> > > > > Gary
> > > > > 
> > > > 
> > > > 
> > > Unfortunately can't get this past autobuild, tried this patch with
> > > & without Douglas's 'popt_common_creds: actually use the
> > > ignore_missing_conf flag' Autobuild failed numberous time for me
> > > with.  The failure seems unrelated to the change, I've run the same
> > > on CI https://gitlab.com/samba-team/devel/samba/pipelines/31918098
> > > and the 'build_samba_nonenv' tests pass fine
> > > 
> > > UNEXPECTED(failure):
> > > samba.unittests.kerberos.test_krb5_remove_obsolete_keytab_entries_one(none)
> > > REASON: Exception:
> > > Exception:"user0 at samba.example.comb"  !="user0 at samba.example.com" ../source4/auth/tests/kerberos.c:64:
> 
> Tell me to go away if I am wrong, but unless the above line is a cut &
> paste error, it is quite correct 'user0 at samba.example.comb' isn't the
> same as 'user0 at samba.example.com', there is an extra 'b' on the end of
> '.com'
Sure. And that is because we allocated less memory to store the string
we compare our extracted principal with. As result, whatever is stored
past the string in memory get displayed. We are happy it is 'b\0' and
not something else.

> 
> > > error: Failure!
> > I think we have off-by-one in the test:
> > 
> >         char expect_princ_name[23] = "user0 at samba.example.com";
> > 
> > >>> len("user0 at samba.example.com")
> > 23
> > 
> > The storage does not take the remaining '\0' into account.
> > 
> > 
> > 
> > > 
> > > FAILED (1 failures, 0 errors and 0 unexpected successes in 0
> > > testsuites)
> > > 
> > > 
> > 
> 
> 

-- 
/ Alexander Bokovoy



More information about the samba-technical mailing list