summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-08 23:57:46 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-08 23:57:46 +0000
commit6909350ed9b87875ee40191b2e636c6049749195 (patch)
treefcb6234d5b30068a00bee15d60f40cd3bbb6ffe5 /source3/rpcclient
parent40eec6f6a5986c20e47a807cb7d8bc3972c92a62 (diff)
downloadsamba-6909350ed9b87875ee40191b2e636c6049749195.tar.gz
samba-6909350ed9b87875ee40191b2e636c6049749195.tar.bz2
samba-6909350ed9b87875ee40191b2e636c6049749195.zip
dce/rpc
(This used to be commit 62fdeef1b79c5c4c9bf0e860881651711bb80b9a)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_samr.c12
-rw-r--r--source3/rpcclient/rpcclient.c5
2 files changed, 15 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);
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 174cea78ad..2183f504c2 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -30,6 +30,7 @@
#endif
extern pstring scope;
+extern pstring global_myname;
extern pstring user_socket_options;
@@ -456,6 +457,7 @@ enum client_action
TimeInit();
charset_initialise();
+ crc32_build_table();
myumask = umask(0);
umask(myumask);
@@ -683,6 +685,9 @@ enum client_action
fprintf(stderr, "Failed to get my hostname.\n");
}
+ fstrcpy(global_myname, cli_info.myhostname);
+ strupper(global_myname);
+
if (!lp_load(servicesf,True, False, False))
{
fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);