[PATCH] Revert "lib: Fix deps for LIBCRYPTO" because arcfour need DATA_BLOB

Andrew Bartlett abartlet at samba.org
Sat Jun 27 00:17:49 MDT 2015


On Fri, 2015-06-26 at 07:20 +0200, Volker Lendecke wrote:
> On Fri, Jun 26, 2015 at 06:57:56AM +0200, Volker Lendecke wrote:
> > On Fri, Jun 26, 2015 at 04:38:28PM +1200, Douglas Bagnall wrote:
> > > 
> > > ...and data_blob.h is entangled with talloc. It seems to only be the
> > > DATA_BLOB struct that arcfour needs, not the talloc stuff.
> > > 
> > > Apparently sn-devel has talloc already present, so this wouldn't have
> > > been found there. An autobuild on a clean system failed like this:
> > > 
> > > In file included from ../source4/../lib/crypto/arcfour.h:4:0,
> > >                  from ../lib/crypto/arcfour.c:23:
> > > ../source4/../lib/util/data_blob.h:33:20: fatal error: talloc.h: No such
> > > file or directory
> > >  #include <talloc.h>
> > >                     ^
> > > compilation terminated.
> > > Waf: Leaving directory `/home/ubuntu/autobuild/b26732/samba-libs/bin'
> > > Build failed:  -> task failed (err #1):
> > > 	{task: cc arcfour.c -> arcfour_1.o}
> > 
> > Reviewed-by: Me.
> > 
> > I should have KNOWN that every time I touch lib/util I break
> > something. Write down 500 times: "NEVER TOUCH LIB/UTIL".
> > "NEVER TOUCH LIB/UTIL". "NEVER TOUCH LIB/UTIL". ... 
> 
> Oh, "NEVER TOUCH LIB/CRYPTO", "NEVER TOUCH LIB/CRYPTO".
> 
> Question: Why does arcfour.c have to use data_blob? Would it
> be okay to liberate this from DATA_BLOB and use direct
> pointers?

A long time ago, we started moving in this direction, of using DATA_BLOB
as the standard length-limited abstraction of data.  

I realise that the lack of separate header dependencies vs linker
dependencies is annoying in some corner cases, but if we start this, it
will end in some quite strange places, and undo the good work we have
done in avoiding many of the the security and overflow issues that bare
length-value pairs encourage. 

If this is really such a big deal, then deal with it in data_blob.h (or
just make data_blob it's own subsystem, with a talloc dep), but
honestly, I think we have better things to do with our time. 

Thanks,

Andrew Bartlett

-- 
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 mailing list