diff options
author | Luke Leighton <lkcl@samba.org> | 1998-12-07 20:23:41 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-12-07 20:23:41 +0000 |
commit | bee8f7fa6b0f7f995f71303f4e14a4aaed0c2437 (patch) | |
tree | 4f865559ce185397a9a1474d3bea8dc2a6265f6a /source/rpcclient/cmd_netlogon.c | |
parent | b8175702ef61b8b37b078f38e81452c00a5e2986 (diff) | |
download | samba-bee8f7fa6b0f7f995f71303f4e14a4aaed0c2437.tar.gz samba-bee8f7fa6b0f7f995f71303f4e14a4aaed0c2437.tar.xz samba-bee8f7fa6b0f7f995f71303f4e14a4aaed0c2437.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.
Diffstat (limited to 'source/rpcclient/cmd_netlogon.c')
-rw-r--r-- | source/rpcclient/cmd_netlogon.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c index 2c8514b43e8..60013278623 100644 --- a/source/rpcclient/cmd_netlogon.c +++ b/source/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)); |