summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_lsarpc.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_lsarpc.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_lsarpc.c')
-rw-r--r--source3/rpcclient/cmd_lsarpc.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index c222d0a0e0..cfde752901 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -44,6 +44,7 @@ nt lsa query
****************************************************************************/
void cmd_lsa_query_info(struct client_info *info)
{
+ uint16 nt_pipe_fnum;
fstring srv_name;
BOOL res = True;
@@ -62,29 +63,29 @@ void cmd_lsa_query_info(struct client_info *info)
DEBUG(5, ("cmd_lsa_query_info: smb_cli->fd:%d\n", smb_cli->fd));
/* open LSARPC session. */
- res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC) : False;
+ res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC, &nt_pipe_fnum) : False;
/* lookup domain controller; receive a policy handle */
- res = res ? lsa_open_policy(smb_cli,
+ res = res ? lsa_open_policy(smb_cli, nt_pipe_fnum,
srv_name,
&info->dom.lsa_info_pol, False) : False;
/* send client info query, level 3. receive domain name and sid */
- res = res ? lsa_query_info_pol(smb_cli,
+ res = res ? lsa_query_info_pol(smb_cli, nt_pipe_fnum,
&info->dom.lsa_info_pol, 0x03,
info->dom.level3_dom,
&info->dom.level3_sid) : False;
/* send client info query, level 5. receive domain name and sid */
- res = res ? lsa_query_info_pol(smb_cli,
+ res = res ? lsa_query_info_pol(smb_cli, nt_pipe_fnum,
&info->dom.lsa_info_pol, 0x05,
info->dom.level5_dom,
&info->dom.level5_sid) : False;
- res = res ? lsa_close(smb_cli, &info->dom.lsa_info_pol) : False;
+ res = res ? lsa_close(smb_cli, nt_pipe_fnum, &info->dom.lsa_info_pol) : False;
/* close the session */
- cli_nt_session_close(smb_cli);
+ cli_nt_session_close(smb_cli, nt_pipe_fnum);
if (res)
{
@@ -125,6 +126,7 @@ lookup names
****************************************************************************/
void cmd_lsa_lookup_names(struct client_info *info)
{
+ uint16 nt_pipe_fnum;
fstring temp;
int i;
fstring srv_name;
@@ -157,23 +159,23 @@ void cmd_lsa_lookup_names(struct client_info *info)
}
/* open LSARPC session. */
- res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC) : False;
+ res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC, &nt_pipe_fnum) : False;
/* lookup domain controller; receive a policy handle */
- res = res ? lsa_open_policy(smb_cli,
+ res = res ? lsa_open_policy(smb_cli, nt_pipe_fnum,
srv_name,
&info->dom.lsa_info_pol, True) : False;
/* send lsa lookup sids call */
- res = res ? lsa_lookup_names(smb_cli,
+ res = res ? lsa_lookup_names(smb_cli, nt_pipe_fnum,
&info->dom.lsa_info_pol,
num_names, names,
&sids, &num_sids) : False;
- res = res ? lsa_close(smb_cli, &info->dom.lsa_info_pol) : False;
+ res = res ? lsa_close(smb_cli, nt_pipe_fnum, &info->dom.lsa_info_pol) : False;
/* close the session */
- cli_nt_session_close(smb_cli);
+ cli_nt_session_close(smb_cli, nt_pipe_fnum);
if (res)
{
@@ -215,6 +217,7 @@ lookup sids
****************************************************************************/
void cmd_lsa_lookup_sids(struct client_info *info)
{
+ uint16 nt_pipe_fnum;
fstring temp;
int i;
pstring sid_name;
@@ -264,23 +267,23 @@ void cmd_lsa_lookup_sids(struct client_info *info)
}
/* open LSARPC session. */
- res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC) : False;
+ res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC, &nt_pipe_fnum) : False;
/* lookup domain controller; receive a policy handle */
- res = res ? lsa_open_policy(smb_cli,
+ res = res ? lsa_open_policy(smb_cli, nt_pipe_fnum,
srv_name,
&info->dom.lsa_info_pol, True) : False;
/* send lsa lookup sids call */
- res = res ? lsa_lookup_sids(smb_cli,
+ res = res ? lsa_lookup_sids(smb_cli, nt_pipe_fnum,
&info->dom.lsa_info_pol,
num_sids, sids,
&names, &num_names) : False;
- res = res ? lsa_close(smb_cli, &info->dom.lsa_info_pol) : False;
+ res = res ? lsa_close(smb_cli, nt_pipe_fnum, &info->dom.lsa_info_pol) : False;
/* close the session */
- cli_nt_session_close(smb_cli);
+ cli_nt_session_close(smb_cli, nt_pipe_fnum);
if (res)
{