Luke Kenneth Casson Leighton lkcl at
Wed Jan 12 21:22:05 GMT 2000


regarding "getting things right" in 3.0: another one to your list.

standard_sub_basic() is called on lp_logon_path(), lp_profile_path() etc,
to subst \\%N\%U\profiles with the right info.

we *assumed* that the only place that profile info was going to be
obtained was after an SMBsesssetupX, IPC$, in smbd/ipc.c's
api_NetUserGetInfo() function, therefore %U is based on sesssetup_user
from lib/util.c.



rpc_server/srv_netlog.c gets connected to *anonymously*.  sesssetup_user
gets set to "nobody", and every single user's profile is loaded from

so, over eighteen months ago, i hacked it.  this hack ONLY applies to the
username, as it was the most critical.  i set a BOOL - sam_logon_in_ssb -
use SAM LOGON name in standard_sub_basic(), and i set samlogon_user to the
name of the user that i _really_ want to go in there.

it's a bad hack, but it works.

what we _really_ need is ALL the standard_sub_basic() parameters to be
replaced with appropriate ones.

to make this easier, i suggest using a structure which is passed to

or, alternatively, a list or array of subst-chars and a string to replace
the subst-char with.

the correct info can then be set up that standard_sub_basic() will
properly substitute, instead of at the moment using samlogon_user but, for
example, using "nobody"'s group on %g, or something stupid.


<a href="mailto:lkcl at"   > Luke Kenneth Casson Leighton    </a>
<a href=""> Samba and Network Development   </a>
<a href=""        > Samba Web site                  </a>
<a href=""      > Internet Security Systems, Inc. </a>
<a href=""          > Macmillan Technical Publishing  </a>

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

More information about the samba-technical mailing list