CVS update: samba/source/rpc_server

Luke Leighton lkcl at samba.anu.edu.au
Fri Feb 4 16:16:55 EST 2000


Date:	Friday February 4, 2000 @ 16:16
Author:	lkcl

Update of /data/cvs/samba/source/rpc_server
In directory samba:/tmp/cvs-serv10663/rpc_server

Modified Files:
      Tag: SAMBA_TNG
	srv_pipe_hnd.c srv_pipe_ntlmssp.c 
Log Message:
ok, this _is_ as big as it looks, conceptually, and i haven't even
done what i wanted to: this is only preparation!!!!

i started off in smbd/lanman.c, and noticed that api_NetUserGetInfo
takes all its info from user_struct *vuser.  i thought, that's odd,
that doesn't look right.

then i realised that the info there is exactly what is contained in
the NET_USER_INFO_3 structure: the return result from an NT Domain
User Logon.

various lights went on, and i realised that when an SMBsesssetupX
is carried out, internally, NT must do an NT Domain User Logon
with the SMB user's challenge/response password, and then store the
return result associated with the SMB session.

in this way, when an api_NetUserGetInfo call comes in, the CORRECT
info can be returned, not some faked-up information.

anyway, this commit is all the consequences of putting NET_USER_INFO_3
into user_struct, which feeds up through _several_ layers of function
calls.  i sort-of understood that i needed to do this, but not quite.

the upshot of this is that user_struct now contains the REAL nt
domain username (in NET_USER_INFO_3) so the confusion between nt
user names and unix usernames now can be removed from samba code.

if you want a unix user name, you use vuser->unix_name.

if you want an NT user name, you use (UNISTR2*)vuser->usr.uni_user_name.

p.s it's in UNICODE :)

p.p.s if you want the RID of the user, it's vuser->usr.user_rid.

p.p.p.s there's over 25 NT-specific other bits of info in NET_USER_INFO_3
too!

<a href="mailto:lkcl at samba.org"   > Luke Kenneth Casson Leighton    </a>
<a href="http://www.cb1.com/~lkcl"> Samba and Network Development   </a>
<a href="http://samba.org"        > Samba Web site                  </a>
<a href="http://www.iss.net"      > Internet Security Systems, Inc. </a>
<a href="http://mcp.com"          > Macmillan Technical Publishing  </a>

 ISBN1578701503 DCE/RPC over SMB: Samba and Windows NT Domain Internals


More information about the samba-cvs mailing list