libbsd

Andrew Bartlett abartlet at samba.org
Sun Jul 1 01:43:25 MDT 2012


On Sun, 2012-07-01 at 14:05 +0930, Rusty Russell wrote:
> On Sat, 30 Jun 2012 19:38:32 +1000, Andrew Bartlett <abartlet at samba.org> wrote:
> > On Fri, 2012-06-29 at 14:48 +0930, Rusty Russell wrote:
> > > On Thu, 28 Jun 2012 08:42:56 +1000, Andrew Bartlett <abartlet at samba.org> wrote:
> > > > The other concern I have is that libreplace has in general been about
> > > > ensuring that the Linux interface is available everywhere, but this
> > > > isn't the Linux interface, it is a custom Samba interface being called
> > > > by the Linux name.  
> > > > 
> > > > The distinction matters, because on Linux, we had actually got to the
> > > > point where with waf, libreplace actually became a no-op (libbsd is used
> > > > for the strl* functions).  (Jelmer was keen on this). 
> > > 
> > > Nice: it's a commonly-used library so it's not an onerous requirement,
> > > and means we don't have to maintain any code (I wish they'd do err, though).
> > 
> > So far, we still maintain the code (strl*()), we just don't those parts
> > of libreplace on Linux (returning us to the empty lib). 
> > 
> > Certainly we could decide to strictly depend on it, but that hasn't been
> > our pattern in the past (and where we have, we have tended to bundle). 
> 
> This is kind of the worst of all worlds :( We maintain the code *and* we
> use an external library.

Yes, but the libbsd use is new.  We could certainly discuss requiring
it, but I expect some resistance. 

> Since Jeremy's point is that set*id are flawed, the replacements belong
> in libreplace.  He could create another library, but it'd just be
> libreplace by another name.  Everything else I can think of seems
> awkward: smb_set*id and a big caution not to use raw set*id?

You probably missed the part where we decided to do exactly that
(because different names ensure we clearly indicate our different
behaviour - on threads in this case).  Our UID handling is centralised
and wrapped anyway, so it's not a big deal. 

> I deeply sympathize with the dream of an NOOP libreplace.  Yet it seems
> that it's always going to be needed :(

Having got to a line where we have it empty on modern Linux w/libbsd, I
think we can maintain that line.  This is about making other systems
look like modern Linux, not generally improving the world.  We can and
do have other libraries for that. 

Andrew Bartlett

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



More information about the samba-technical mailing list