Re: Do we need sam/api.c?

2002-09-28 Thread Jelmer Vernooij

On Sun, Sep 29, 2002 at 12:56:29AM +1000, Andrew Bartlett wrote about 'Do we need 
sam/api.c?':
> I was wondering:  In the new SAM stuff do we really need the api.c?

> Why not make the api the context_ functions, and use the default context
> if the user does not specify one (ie NULL)?

> This would remove one layer from this whole area, which might make it
> easier to comprehend...  

Yeah, that's a *really* good idea! Every layer less (that's not
necessary) is a good thing (TM)! 

> That would make it 'user -> context -> backend', which might be easier
> for potential developers to swallow.

> It would also make samtest magicly 'work' before you specify a context,
> rather than segfaulting...
Oops.. :-)

Jelmer

-- 
Jelmer Vernooij  <[EMAIL PROTECTED]>
Pending (unfinished) patches http://samba.org/~jelmer/diffs.php



Do we need sam/api.c?

2002-09-28 Thread Andrew Bartlett

I was wondering:  In the new SAM stuff do we really need the api.c?

Why not make the api the context_ functions, and use the default context
if the user does not specify one (ie NULL)?

This would remove one layer from this whole area, which might make it
easier to comprehend...  

In the passdb stuff, we needed the outer layer due to need need for
source-level compatibility.  But we are going to have to change the
callers anyway, so why not reduce some complexity along the way?

That would make it 'user -> context -> backend', which might be easier
for potential developers to swallow.

It would also make samtest magicly 'work' before you specify a context,
rather than segfaulting...

Andrew Bartlett
-- 
Andrew Bartlett [EMAIL PROTECTED]
Manager, Authentication Subsystems, Samba Team  [EMAIL PROTECTED]
Student Network Administrator, Hawker College   [EMAIL PROTECTED]
http://samba.org http://build.samba.org http://hawkerc.net