[PATCH] BROKEN_STRNDUP and BROKEN_STRNLEN and AIX

Andrew Bartlett abartlet at samba.org
Wed May 22 17:45:24 MDT 2013


On Wed, 2013-05-22 at 16:19 +0300, Alexander Bokovoy wrote:
> HI,
> 
> 
> On Wed, May 22, 2013 at 2:22 PM, Heinrich Mislik <
> Heinrich.Mislik at univie.ac.at> wrote:
> 
> > On 22 May 2013 at 17:39, Andrew Bartlett wrote:
> >
> > > I'm wondering if either of you know more about the allegation that
> > > strndup and strnlen are broken on AIX?
> >
> > Allthoug there is an entry in libc, documentation says:
> >
> > For AIX 5.3:
> >
> > http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.ai
> > x.basetechref/doc/basetrf2/basetrf2.htm
> >
> > There is no strndup or strnlen.
> >
> So this means our replacement should be used.
> 
> 
> >
> > For AIX 6.1:
> >
> > http://pic.dhe.ibm.com/infocenter/aix/v6r1/topic/com.ibm.aix.basetechr
> > ef/doc/basetrf2/s_nav.htm
> >
> > there is strnlen, no strndup.
> >
> Our replacement for strndup should be used.
> 
> 
> >
> >
> > For AIX 7.1
> >
> > http://pic.dhe.ibm.com/infocenter/aix/v7r1/topic/com.ibm.aix.basetechr
> > ef/doc/basetrf2/s_nav.htm
> >
> > there are strndup and strnlen
> >
> >
> > I could not reproduce the behaviour from
> > https://bugzilla.samba.org/show_bug.cgi?id=1097
> > on any current AIX I have available (5.3, 6.1). It seems to be
> > fixed by now. I still think, one should not use functions,
> > that are not documented.
> >
> We have our own library of replacing functions.
> 
> So I think "outlawing" strnlen/strndup on AIX wouldn't be that bad.
> 
> It means Andrew's latest patch is OK.

Can you review/push it?

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list