summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-01-23 10:51:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:22 -0500
commitaeb834036d5cc576df6b284cebf6f4afcce4dfcc (patch)
tree5d6134b0ef380eaee1c33b42a2132248cc7c107e /source3/rpc_client
parent23e227ac391a3f674712bdd09a0581a02cbc8a7e (diff)
downloadsamba-aeb834036d5cc576df6b284cebf6f4afcce4dfcc.tar.gz
samba-aeb834036d5cc576df6b284cebf6f4afcce4dfcc.tar.bz2
samba-aeb834036d5cc576df6b284cebf6f4afcce4dfcc.zip
r20970: Allow to define workstation for samlogon in rpcclient (for testing).
Guenther (This used to be commit 5d4747fdf2e5874cb5d2238ee62e4fcac1676134)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_netlogon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 28395de067..0fdc476775 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -733,6 +733,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
const char *domain,
const char *username,
const char *password,
+ const char *workstation,
int logon_type)
{
prs_struct qbuf, rbuf;
@@ -750,7 +751,11 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
ZERO_STRUCT(r);
ZERO_STRUCT(ret_creds);
- fstr_sprintf( clnt_name_slash, "\\\\%s", global_myname() );
+ if (workstation) {
+ fstr_sprintf( clnt_name_slash, "\\\\%s", workstation );
+ } else {
+ fstr_sprintf( clnt_name_slash, "\\\\%s", global_myname() );
+ }
/* Initialise input parameters */