Another showstopper for 3.2.2.

simo idra at samba.org
Sun Aug 17 15:28:17 GMT 2008


On Sun, 2008-08-17 at 16:33 +0200, Volker Lendecke wrote:
> On Sun, Aug 17, 2008 at 10:24:12AM -0400, simo wrote:
> > On Sun, 2008-08-17 at 16:19 +0200, Volker Lendecke wrote:
> > > On Sun, Aug 17, 2008 at 10:13:50AM -0400, simo wrote:
> > > > The patch itself seem ok, but why playing with building a tring to make
> > > > lookup_name parse it again ? Why not just passing the domain as a new
> > > > parameter to lookup_name ?
> > > 
> > > Because lookup_name does a lot of logic to get non-qualified
> > > names right. If you always have to pass in a domain name,
> > > someone else needs to get the domain part right. Where would
> > > you put that logic?
> > 
> > This is the logic to split domain and name strings:
> 
> Ah, you would allow "" as domain name.
> 
> Well, if it is the general opinion that this is a simpler
> API, then sure. But I had thought that lookup_name() should
> be the single central point you can throw a string at and
> get a SID out of it. If that API is too simple, then feel
> free to change it. My vote would be to leave it as it is
> (but then I'm biased, I put it in).

It seem such a waste to have to make 3 memory allocation with mem copies
going around just to fit an interface that can be easily split.

I'll attach a patch to the thread later.
If people like it I can commit it, otherwise I will just forget it.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Senior Software Engineer at Red Hat Inc. <simo at redhat.com>



More information about the samba-technical mailing list