summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_netlogon.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-12-07 20:23:41 +0000
committerLuke Leighton <lkcl@samba.org>1998-12-07 20:23:41 +0000
commit9c848ec329a6ce86cffb2304746590116d9292f0 (patch)
treeafdaf2f6b16df02b5183618a5d9e422bddfedfe7 /source3/rpcclient/cmd_netlogon.c
parent312f4f3960a9b1938ae133678cd8567be1331b99 (diff)
downloadsamba-9c848ec329a6ce86cffb2304746590116d9292f0.tar.gz
samba-9c848ec329a6ce86cffb2304746590116d9292f0.tar.bz2
samba-9c848ec329a6ce86cffb2304746590116d9292f0.zip
removed nt_pipe_fnum from struct cli_state. need to be able to call
LsaLookupSids etc from within SamrQueryAliasMembers, for example. fnum is now a parameter to client functions. thanks to mike black for starting the ball rolling. (This used to be commit bee8f7fa6b0f7f995f71303f4e14a4aaed0c2437)
Diffstat (limited to 'source3/rpcclient/cmd_netlogon.c')
-rw-r--r--source3/rpcclient/cmd_netlogon.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index 2c8514b43e..6001327862 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -43,6 +43,7 @@ experimental nt login.
****************************************************************************/
void cmd_netlogon_login_test(struct client_info *info)
{
+ uint16 nt_pipe_fnum;
extern BOOL global_machine_password_needs_changing;
fstring nt_user_name;
@@ -89,16 +90,16 @@ void cmd_netlogon_login_test(struct client_info *info)
info->mach_acct, new_mach_pwd) : False;
#endif
/* open NETLOGON session. negotiate credentials */
- res = res ? cli_nt_session_open(smb_cli, PIPE_NETLOGON) : False;
+ res = res ? cli_nt_session_open(smb_cli, PIPE_NETLOGON, &nt_pipe_fnum) : False;
- res = res ? cli_nt_setup_creds(smb_cli, trust_passwd) : False;
+ res = res ? cli_nt_setup_creds(smb_cli, nt_pipe_fnum, trust_passwd) : False;
/* change the machine password? */
if (global_machine_password_needs_changing)
{
unsigned char new_trust_passwd[16];
generate_random_buffer(new_trust_passwd, 16, True);
- res = res ? cli_nt_srv_pwset(smb_cli, new_trust_passwd) : False;
+ res = res ? cli_nt_srv_pwset(smb_cli, nt_pipe_fnum, new_trust_passwd) : False;
if (res)
{
@@ -111,7 +112,7 @@ void cmd_netlogon_login_test(struct client_info *info)
memset(trust_passwd, 0, 16);
/* do an NT login */
- res = res ? cli_nt_login_interactive(smb_cli,
+ res = res ? cli_nt_login_interactive(smb_cli, nt_pipe_fnum,
smb_cli->domain, nt_user_name,
getuid(), nt_password,
&info->dom.ctr, &info->dom.user_info3) : False;
@@ -122,10 +123,10 @@ void cmd_netlogon_login_test(struct client_info *info)
/* ok! you're logged in! do anything you like, then... */
/* do an NT logout */
- res = res ? cli_nt_logoff(smb_cli, &info->dom.ctr) : False;
+ res = res ? cli_nt_logoff(smb_cli, nt_pipe_fnum, &info->dom.ctr) : False;
/* close the session */
- cli_nt_session_close(smb_cli);
+ cli_nt_session_close(smb_cli, nt_pipe_fnum);
fprintf(out_hnd,"cmd_nt_login: login (%s) test succeeded: %s\n",
nt_user_name, BOOLSTR(res));