tdbpass

Gerald Carter gcarter at valinux.com
Fri Oct 27 17:35:40 GMT 2000


Simo Sorce wrote:
> 
> I'm looking at code to effectively use the home_dir 
> field (and others) I prepared in tdbpass.c, I'm looking at 
> code to find where this fields are retrieved (and convrted 
> from eg. home/%u) to return the correct value!
> 
> My idea is to check if the home_dir field is set to 
> a particular value (USECONF string ?), set by default 
> at user creation, then I should check for the value set 
> in smb.conf If instead a valid path is found return it!
> If the home_dir field is empty (or set to string NOHOME ?) 
> this means the user have no home?

Simo,

The correct way of implementing the additional fields 
made available by more flexible passwd backends is to have
the reading and writing of user information done by the 
backend and passed to the smbd process via in the passdb 
interface.  

This means that the semantics of how the various fields
are filled with information is irrelavent to smbd.  We 
should define a standard method ot be implemented by all
modules.  I think, 

  o look for a set value in the user data struct in 
    the backend

  o allow a default setting to be defined in smb.conf

is a good solution.  There is no need to use an additional
boolen parameter to enable this behavior.  It should be
done by default.

> Checking where home_dir is resolved however is a bit 
> confusing, I think it is get from the sam_passwd 
> structure through the lp_home_dir() config function am I 
> right? Is there any other place where this value is
> retrieved indipendently from what apper in the fields 
> of passdb backends? and for other fields?

I'll look through the code but this should be filled 
in the [get|set]sam21* functions implemented by the backend
IIRC.





Cheers, jerry
----------------------------------------------------------------------
   /\  Gerald (Jerry) Carter                     Professional Services
 \/    http://www.valinux.com/  VA Linux Systems   gcarter at valinux.com
       http://www.samba.org/       SAMBA Team          jerry at samba.org
       http://www.plainjoe.org/                     jerry at plainjoe.org

       "...a hundred billion castaways looking for a home."
                                - Sting "Message in a Bottle" ( 1979 )




More information about the samba-technical mailing list