Write back from idmap? (combining idmap_hash and idmap_adex into a new module)

Trever L. Adams trever.adams at gmail.com
Tue Jul 6 12:32:58 MDT 2010

  I am looking at taking a foray into Samba4 coding.

I like the idea of idmap_hash, but it doesn't allow you to set a shell 
and homedir (except the default). I like idmap_adex, but it won't 
allocate the uid/gid for you.

Is it possible to rewrite idmap_adex to try and look up the uid/gid and 
if it finds the sid but not uid/gid that it will do the following:

Compute the uid/gid the same way as idmap_hash, verify that it is 
unused, if so, store it as the uid/gid.
If it isn't unused, increment by one the uid/gid (within the 0x00 - 
0x0007FFFF range) and search until it finds an unused uid/gid and then 
store that as the uid/gid?

Also, it would try to get the shell and homedir, if they were not found, 
it would return the defaults set (same as if it was idmap_hash)? (This 
one I think would be easy based on my reading of the code.)

I ask this as I see the ads_xxx family is all pull, I do not see a push/set.

Thank you,
Trever Adams

More information about the samba-technical mailing list