summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_samr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient/cmd_samr.c')
-rw-r--r--source3/rpcclient/cmd_samr.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index c45c4c7c23..487c8e46c1 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -67,6 +67,14 @@ void cmd_sam_test(struct client_info *info)
/* open SAMR session. */
res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR, True) : False;
+ /* establish a connection. */
+ res = res ? do_samr_connect(smb_cli,
+ srv_name, 0x00000020,
+ &info->dom.samr_pol_connect) : False;
+
+ res = res ? do_samr_close(smb_cli,
+ &info->dom.samr_pol_connect) : False;
+
/* close the session */
cli_nt_session_close(smb_cli);
@@ -232,10 +240,10 @@ void cmd_sam_enum_users(struct client_info *info)
}
res = res ? do_samr_close(smb_cli,
- &info->dom.samr_pol_connect) : False;
+ &info->dom.samr_pol_open_domain) : False;
res = res ? do_samr_close(smb_cli,
- &info->dom.samr_pol_open_domain) : False;
+ &info->dom.samr_pol_connect) : False;
/* close the session */
cli_nt_session_close(smb_cli);