summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_client/cli_pipe.c')
-rw-r--r--source3/rpc_client/cli_pipe.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index c458aa102a..899c0437e6 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -675,13 +675,16 @@ Error was %s\n", pipe_name, cli->desthost, cli_errstr(cli)));
* Setup the remote server name prefixed by \ and the machine account name.
*/
- sprintf(cli->srv_name_slash, "\\\\%s", cli->desthost);
+ fstrcpy(cli->srv_name_slash, "\\\\");
+ fstrcat(cli->srv_name_slash, cli->desthost);
strupper(cli->srv_name_slash);
- sprintf(cli->clnt_name_slash, "\\\\%s", global_myname);
+ fstrcpy(cli->clnt_name_slash, "\\\\");
+ fstrcat(cli->clnt_name_slash, global_myname);
strupper(cli->clnt_name_slash);
- sprintf(cli->mach_acct, "%s$", global_myname);
+ fstrcpy(cli->mach_acct, global_myname);
+ fstrcat(cli->mach_acct, "$");
strupper(cli->mach_acct);
return True;