RFC: New token %D for remote user's NT domain
Nicolas Williams
Nicolas.Williams at ubsw.com
Fri Oct 27 15:20:40 GMT 2000
If one has to deal with multiple trusted NT4 user domains and a number
of username conflicts between them one might like to be able to use this
in smb.conf:
username map = /etc/samba/map.%D
where %D is expanded to the domain of a session's remote user.
This feature is necessary and I'm surprised it isn't there now.
I know I'll have to write the patch if I want it. But I wonder how to go
about it.
See, I know lib/util.c:standard_sub_basic() (or standard_sub()?) is the
place to add the new token expansion code, and I've figured out that the
domain can be found in smbd/reply.c:reply_sesssetup_and_X(), but it
isn't saved anywhere.
Unlike the other connection calls in smbd/reply.c, reply_sesssetup_and_X()
does not actually call make_connection() so I can't very easily add a
new field to connection_struct and new argument to make_connection().
It seems that reply_sesssetup_and_X() saves necessary information in
global variables, so I may just have to do that for the domain name.
So, is it OK for me to add a new global variable for keeping the remote
user's domain name?
Why does reply_sesssetup_and_X() not call make_connection() as
reply_tcon_and_X() and reply_tcon() do? I'm not interested in producing
a large patch to fix this state of affairs, just a small one :^|
Nico
--
More information about the samba-technical
mailing list