New feature for winbindd

Pedro de Medeiros pedrovmm+lists at gmail.com
Thu Dec 13 16:06:10 GMT 2007


On Dec 13, 2007 12:42 PM, Gerald (Jerry) Carter <jerry at samba.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Pedro de Medeiros wrote:
> > Hi, list.
> >
> > I am thinking of implementing a new feature in winbindd that
> > allows me to do this in smb.conf:
> >
> > idmap uid = | /usr/local/bin/getmynumber %U
> > idmap gid = | /usr/local/bin/getmynumber %U
> >
> > Basically it will get new uids and gids from an application,
> > instead of allocating new uids and gids serially for users as
> > they first login to the host. After that, the uid/gid could still
> > be stored in the tdb database.
> >
> > So it is the application's job to guarantee that uid is unique,
> > but that is besides the point.
> >
> > I am willing to write a patch if there is interest in this
> > feature. :)
>
> This would belogn in an idmap allocator plugin an not in
> the core winbindd code.  Should be easy to do.


Actually, I guess some changes to param/loadparm.c would
be necessary, since idmap_[gu]id_{low|high} variables are
hardcoded into functions handle_idmap_[gu]id(). Unless, of
course, we create a new directive in smb.conf to deal
specially with this new feature. Something like:

idmap uid command = /usr/local/bin/getmynumber %U
idmap gid command = /usr/local/bin/getmynumber %U

This would require a new section too, instead of [global], I
presume?


Pedro


More information about the samba-technical mailing list