From 098b7b378c72632d8c3df0b795ac1e4c5dbfb04a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 3 Jul 2000 04:24:31 +0000 Subject: first pass at merging rpcclient from TNG to HEAD. You can get a semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. These files changed only with the addition of some support functions from TNG --jerry (This used to be commit a04ea15f723e559db3c60bed03318cc7be851f69) --- source3/libsmb/clientgen.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source3/libsmb/clientgen.c') diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 32564aaf82..c6f24c5e80 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -150,6 +150,23 @@ static void cli_process_oplock(struct cli_state *cli) cli->outbuf = oldbuf; } +/**************************************************************************** +initialise a client structure +****************************************************************************/ +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr) +{ + /* copy_nt_creds(&cli->usr, usr); */ + safe_strcpy(cli->domain , usr->domain , sizeof(usr->domain )-1); + safe_strcpy(cli->user_name, usr->user_name, sizeof(usr->user_name)-1); + memcpy(&cli->pwd, &usr->pwd, sizeof(usr->pwd)); + cli->ntlmssp_flags = usr->ntlmssp_flags; + cli->ntlmssp_cli_flgs = usr != NULL ? usr->ntlmssp_flags : 0; + + DEBUG(10,("cli_init_creds: user %s domain %s flgs: %x\nntlmssp_cli_flgs:%x\n", + cli->user_name, cli->domain, + cli->ntlmssp_flags,cli->ntlmssp_cli_flgs)); +} + /**************************************************************************** initialise a client structure -- cgit