summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_lsa_hnd.c7
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c23
2 files changed, 12 insertions, 18 deletions
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index fa63c8091e..a8341e677b 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -53,9 +53,10 @@ bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
if (strequal( plist->name, pipe_name) ||
(is_samr_lsa_pipe(plist->name) && is_samr_lsa_pipe(pipe_name))) {
if (!plist->pipe_handles) {
- pstring msg;
- slprintf(msg, sizeof(msg)-1, "init_pipe_handles: NULL pipe_handle pointer in pipe %s",
- pipe_name );
+ char *msg;
+ asprintf(&msg, "init_pipe_handles: NULL "
+ "pipe_handle pointer in pipe %s",
+ pipe_name);
smb_panic(msg);
}
hl = plist->pipe_handles;
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index 417ce8e761..11ca8915a2 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -27,26 +27,19 @@
#define DBGC_CLASS DBGC_RPC_SRV
/*******************************************************************
- Fill in the valiues for the struct wkssvc_NetWkstaInfo100.
+ Fill in the values for the struct wkssvc_NetWkstaInfo100.
********************************************************************/
static void create_wks_info_100(struct wkssvc_NetWkstaInfo100 *info100)
{
- pstring my_name;
- pstring domain;
+ info100->platform_id = 0x000001f4; /* unknown */
+ info100->version_major = lp_major_announce_version();
+ info100->version_minor = lp_minor_announce_version();
- pstrcpy (my_name, global_myname());
- strupper_m(my_name);
-
- pstrcpy (domain, lp_workgroup());
- strupper_m(domain);
-
- info100->platform_id = 0x000001f4; /* unknown */
- info100->version_major = lp_major_announce_version();
- info100->version_minor = lp_minor_announce_version();
-
- info100->server_name = talloc_strdup( info100, my_name );
- info100->domain_name = talloc_strdup( info100, domain );
+ info100->server_name = talloc_strdup(
+ info100, strupper_static(global_myname()));
+ info100->domain_name = talloc_strdup(
+ info100, strupper_static(lp_workgroup()));
return;
}