[ab at samba.org: Re: [PATCH] pyauth: Remove the imessaging_ctx parameter]
Volker Lendecke
Volker.Lendecke at SerNet.DE
Fri Oct 5 12:54:50 UTC 2018
Hello, Douglas!
You have the [24] version in autobuild, I have the [] one pushed. Do
you want me to stop my autobuild, those patches will conflict.
What are your concerns with the [] version?
Thanks, Volker
----- Forwarded message from Alexander Bokovoy <ab at samba.org> -----
Date: Fri, 5 Oct 2018 14:01:36 +0300
From: Alexander Bokovoy <ab at samba.org>
To: Volker.Lendecke at sernet.de
Cc: Noel Power <nopower at suse.com>, Gary Lockyer <gary at catalyst.net.nz>, Samba Technical <samba-technical at lists.samba.org>
Subject: Re: [PATCH] pyauth: Remove the imessaging_ctx parameter
On pe, 05 loka 2018, Volker Lendecke via samba-technical wrote:
> On Wed, Oct 03, 2018 at 10:49:57PM +0300, Alexander Bokovoy via samba-technical wrote:
> > From 3b19d979a5fd5201d4048c047239733e58eea70c Mon Sep 17 00:00:00 2001
> > From: Alexander Bokovoy <ab at samba.org>
> > Date: Wed, 3 Oct 2018 22:48:00 +0300
> > Subject: [PATCH] s4/auth/tests: Fix kerberos test string size
> >
> > >>> len("user0 at samba.example.com")
> > 23
> >
> > But the string definition does not take a final '\0' into account.
> >
> > Signed-off-by: Alexander Bokovoy <ab at samba.org>
> > ---
> > source4/auth/tests/kerberos.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/source4/auth/tests/kerberos.c b/source4/auth/tests/kerberos.c
> > index 703c8067908..477e26e68de 100644
> > --- a/source4/auth/tests/kerberos.c
> > +++ b/source4/auth/tests/kerberos.c
> > @@ -26,7 +26,7 @@ static void internal_obsolete_keytab_test(int num_principals, int num_kvnos,
> >
> > int i,j;
> > char princ_name[6] = "user0";
> > - char expect_princ_name[23] = "user0 at samba.example.com";
> > + char expect_princ_name[24] = "user0 at samba.example.com";
>
> This looks good to me, RB+. But why specify the length at all? I'd
> rather do that as
>
> char expect_princ_name[] = "user0 at samba.example.com";
>
> likewise for the princ_name[] above.
You are right.
Updated version attached.
--
/ Alexander Bokovoy
From 8b39419d3dce689c885ec85bc5be92d25ac1689b Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <ab at samba.org>
Date: Wed, 3 Oct 2018 22:48:00 +0300
Subject: [PATCH] s4/auth/tests: Fix kerberos test string size
>>> len("user0 at samba.example.com")
23
But the string definition does not take a final '\0' into account.
As per Volker's suggestion, use compiler's support to allocate
the string properly.
Signed-off-by: Alexander Bokovoy <ab at samba.org>
---
source4/auth/tests/kerberos.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source4/auth/tests/kerberos.c b/source4/auth/tests/kerberos.c
index 703c8067908..fcc8ac45f7e 100644
--- a/source4/auth/tests/kerberos.c
+++ b/source4/auth/tests/kerberos.c
@@ -25,8 +25,8 @@ static void internal_obsolete_keytab_test(int num_principals, int num_kvnos,
krb5_error_code code;
int i,j;
- char princ_name[6] = "user0";
- char expect_princ_name[23] = "user0 at samba.example.com";
+ char princ_name[] = "user0";
+ char expect_princ_name[] = "user0 at samba.example.com";
bool found_previous;
const char *error_str;
--
2.17.1
----- End forwarded message -----
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list