summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/librpc/rpc/dcerpc_ep.c18
-rw-r--r--source3/printing/printspoolss.c4
-rw-r--r--source3/rpc_client/cli_winreg_int.c16
-rw-r--r--source3/rpc_server/netlogon/srv_netlog_nt.c36
-rw-r--r--source3/rpc_server/rpc_ncacn_np.c70
-rw-r--r--source3/rpc_server/rpc_ncacn_np.h6
-rw-r--r--source3/rpc_server/rpc_server.c1
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_util.c16
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c3
-rw-r--r--source3/rpc_server/srv_pipe_hnd.h1
-rw-r--r--source3/smbd/lanman.c36
-rw-r--r--source3/smbd/pipes.c1
-rw-r--r--source3/smbd/reply.c2
13 files changed, 139 insertions, 71 deletions
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c
index 3d1acbbee2..7341bc4b76 100644
--- a/source3/librpc/rpc/dcerpc_ep.c
+++ b/source3/librpc/rpc/dcerpc_ep.c
@@ -24,6 +24,7 @@
#include "rpc_client/cli_pipe.h"
#include "auth.h"
#include "rpc_server/rpc_ncacn_np.h"
+#include "../lib/tsocket/tsocket.h"
#define EPM_MAX_ANNOTATION_SIZE 64
@@ -170,14 +171,21 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx,
"none");
if (strcasecmp_m(rpcsrv_type, "embedded") == 0) {
- static struct client_address client_id;
-
- strlcpy(client_id.addr, "localhost", sizeof(client_id.addr));
- client_id.name = "localhost";
+ struct tsocket_address *local;
+ int rc;
+
+ rc = tsocket_address_inet_from_strings(tmp_ctx,
+ "ip",
+ "127.0.0.1",
+ 0,
+ &local);
+ if (rc < 0) {
+ return NT_STATUS_NO_MEMORY;
+ }
status = rpcint_binding_handle(tmp_ctx,
&ndr_table_epmapper,
- &client_id,
+ local,
get_session_info_system(),
server_messaging_context(),
&h);
diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c
index 3d8b0d8b1b..75e9cad28d 100644
--- a/source3/printing/printspoolss.c
+++ b/source3/printing/printspoolss.c
@@ -127,7 +127,7 @@ NTSTATUS print_spool_open(files_struct *fsp,
status = rpc_pipe_open_interface(fsp->conn,
&ndr_table_spoolss.syntax_id,
fsp->conn->session_info,
- &fsp->conn->sconn->client_id,
+ fsp->conn->sconn->remote_address,
fsp->conn->sconn->msg_ctx,
&fsp->conn->spoolss_pipe);
if (!NT_STATUS_IS_OK(status)) {
@@ -311,7 +311,7 @@ void print_spool_terminate(struct connection_struct *conn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&conn->spoolss_pipe);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/rpc_client/cli_winreg_int.c b/source3/rpc_client/cli_winreg_int.c
index 1828b419a9..edb622dcef 100644
--- a/source3/rpc_client/cli_winreg_int.c
+++ b/source3/rpc_client/cli_winreg_int.c
@@ -24,6 +24,7 @@
#include "librpc/gen_ndr/ndr_winreg_c.h"
#include "rpc_client/cli_winreg_int.h"
#include "rpc_server/rpc_ncacn_np.h"
+#include "../lib/tsocket/tsocket.h"
/**
* Split path into hive name and subkeyname
@@ -95,18 +96,25 @@ static NTSTATUS _winreg_int_openkey(TALLOC_CTX *mem_ctx,
struct policy_handle *key_handle,
WERROR *pwerr)
{
- static struct client_address client_id;
+ struct tsocket_address *local;
struct dcerpc_binding_handle *binding_handle;
struct winreg_String wkey, wkeyclass;
NTSTATUS status;
WERROR result = WERR_OK;
+ int rc;
- strlcpy(client_id.addr, "127.0.0.1", sizeof(client_id.addr));
- client_id.name = "127.0.0.1";
+ rc = tsocket_address_inet_from_strings(mem_ctx,
+ "ip",
+ "127.0.0.1",
+ 0,
+ &local);
+ if (rc < 0) {
+ return NT_STATUS_NO_MEMORY;
+ }
status = rpcint_binding_handle(mem_ctx,
&ndr_table_winreg,
- &client_id,
+ local,
session_info,
msg_ctx,
&binding_handle);
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index 03897d77a4..e52dd85352 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -44,6 +44,7 @@
#include "passdb.h"
#include "auth.h"
#include "messages.h"
+#include "../lib/tsocket/tsocket.h"
extern userdom_struct current_user_info;
@@ -417,7 +418,7 @@ NTSTATUS _netr_NetrEnumerateTrustedDomains(struct pipes_struct *p,
status = rpcint_binding_handle(p->mem_ctx,
&ndr_table_lsarpc,
- p->client_id,
+ p->remote_address,
p->session_info,
p->msg_ctx,
&h);
@@ -643,13 +644,15 @@ static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct,
NTSTATUS result = NT_STATUS_OK;
TALLOC_CTX *mem_ctx;
struct dcerpc_binding_handle *h = NULL;
- static struct client_address client_id;
+ struct tsocket_address *local;
struct policy_handle user_handle;
uint32_t user_rid;
struct dom_sid *domain_sid;
uint32_t acct_ctrl;
union samr_UserInfo *info;
struct auth_serversupplied_info *session_info;
+ int rc;
+
#if 0
/*
@@ -682,12 +685,19 @@ static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct,
ZERO_STRUCT(user_handle);
- strlcpy(client_id.addr, "127.0.0.1", sizeof(client_id.addr));
- client_id.name = "127.0.0.1";
+ rc = tsocket_address_inet_from_strings(mem_ctx,
+ "ip",
+ "127.0.0.1",
+ 0,
+ &local);
+ if (rc < 0) {
+ status = NT_STATUS_NO_MEMORY;
+ goto out;
+ }
status = rpcint_binding_handle(mem_ctx,
&ndr_table_samr,
- &client_id,
+ local,
session_info,
msg_ctx,
&h);
@@ -1098,21 +1108,29 @@ static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx,
NTSTATUS status;
NTSTATUS result = NT_STATUS_OK;
struct dcerpc_binding_handle *h = NULL;
- static struct client_address client_id;
+ struct tsocket_address *local;
struct policy_handle user_handle;
uint32_t acct_ctrl;
union samr_UserInfo *info;
struct samr_UserInfo18 info18;
DATA_BLOB in,out;
+ int rc;
ZERO_STRUCT(user_handle);
- strlcpy(client_id.addr, "127.0.0.1", sizeof(client_id.addr));
- client_id.name = "127.0.0.1";
+ rc = tsocket_address_inet_from_strings(mem_ctx,
+ "ip",
+ "127.0.0.1",
+ 0,
+ &local);
+ if (rc < 0) {
+ status = NT_STATUS_NO_MEMORY;
+ goto out;
+ }
status = rpcint_binding_handle(mem_ctx,
&ndr_table_samr,
- &client_id,
+ local,
session_info,
msg_ctx,
&h);
diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c
index f14aae540d..9bbc5dfddb 100644
--- a/source3/rpc_server/rpc_ncacn_np.c
+++ b/source3/rpc_server/rpc_ncacn_np.c
@@ -121,7 +121,7 @@ int close_internal_rpc_pipe_hnd(struct pipes_struct *p)
struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
- struct client_address *client_id,
+ const struct tsocket_address *remote_address,
const struct auth_serversupplied_info *session_info,
struct messaging_context *msg_ctx)
{
@@ -165,7 +165,27 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
DLIST_ADD(InternalPipes, p);
- p->client_id = client_id;
+ p->remote_address = tsocket_address_copy(remote_address, p);
+ if (p->remote_address == NULL) {
+ return false;
+ }
+
+ p->client_id = talloc_zero(p, struct client_address);
+ if (p->client_id == NULL) {
+ return false;
+ }
+
+ if (tsocket_address_is_inet(p->remote_address, "ip")) {
+ p->client_id->name = tsocket_address_inet_addr_string(p->remote_address,
+ p->client_id);
+ } else {
+ p->client_id->name = talloc_strdup(p->client_id, "");
+ }
+ if (p->client_id->name == NULL) {
+ return false;
+ }
+ strlcpy(p->client_id->addr,
+ p->client_id->name, sizeof(p->client_id->addr));
p->endian = RPC_LITTLE_ENDIAN;
@@ -451,7 +471,7 @@ static const struct dcerpc_binding_handle_ops rpcint_bh_ops = {
static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *abstract_syntax,
const struct ndr_interface_table *ndr_table,
- struct client_address *client_id,
+ const struct tsocket_address *remote_address,
const struct auth_serversupplied_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **binding_handle)
@@ -475,7 +495,7 @@ static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX *mem_ctx,
}
hs->p = make_internal_rpc_pipe_p(hs,
abstract_syntax,
- client_id,
+ remote_address,
session_info,
msg_ctx);
if (hs->p == NULL) {
@@ -493,7 +513,7 @@ static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX *mem_ctx,
*
* @param[in] ndr_table Normally the ndr_table_<name>.
*
- * @param[in] client_id The info about the connected client.
+ * @param[in] remote_address The info about the connected client.
*
* @param[in] serversupplied_info The server supplied authentication function.
*
@@ -511,7 +531,7 @@ static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX *mem_ctx,
*
* status = rpcint_binding_handle(tmp_ctx,
* &ndr_table_winreg,
- * p->client_id,
+ * p->remote_address,
* p->session_info,
* p->msg_ctx
* &winreg_binding);
@@ -519,12 +539,12 @@ static NTSTATUS rpcint_binding_handle_ex(TALLOC_CTX *mem_ctx,
*/
NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
const struct ndr_interface_table *ndr_table,
- struct client_address *client_id,
+ const struct tsocket_address *remote_address,
const struct auth_serversupplied_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **binding_handle)
{
- return rpcint_binding_handle_ex(mem_ctx, NULL, ndr_table, client_id,
+ return rpcint_binding_handle_ex(mem_ctx, NULL, ndr_table, remote_address,
session_info, msg_ctx, binding_handle);
}
@@ -544,7 +564,7 @@ NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
*
* @param[in] serversupplied_info The server supplied authentication function.
*
- * @param[in] client_id The client address information.
+ * @param[in] remote_address The client address information.
*
* @param[in] msg_ctx The messaging context to use.
*
@@ -556,7 +576,7 @@ NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *abstract_syntax,
const struct auth_serversupplied_info *serversupplied_info,
- struct client_address *client_id,
+ const struct tsocket_address *remote_address,
struct messaging_context *msg_ctx,
struct rpc_pipe_client **presult)
{
@@ -571,11 +591,21 @@ static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
result->abstract_syntax = *abstract_syntax;
result->transfer_syntax = ndr_transfer_syntax;
- if (client_id == NULL) {
- static struct client_address unknown;
- strlcpy(unknown.addr, "<UNKNOWN>", sizeof(unknown.addr));
- unknown.name = "<UNKNOWN>";
- client_id = &unknown;
+ if (remote_address == NULL) {
+ struct tsocket_address *local;
+ int rc;
+
+ rc = tsocket_address_inet_from_strings(mem_ctx,
+ "ip",
+ "127.0.0.1",
+ 0,
+ &local);
+ if (rc < 0) {
+ TALLOC_FREE(result);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ remote_address = local;
}
result->max_xmit_frag = -1;
@@ -584,7 +614,7 @@ static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
status = rpcint_binding_handle_ex(result,
abstract_syntax,
NULL,
- client_id,
+ remote_address,
serversupplied_info,
msg_ctx,
&result->binding_handle);
@@ -849,7 +879,7 @@ done:
*
* @param[in] serversupplied_info The server supplied authentication function.
*
- * @param[in] client_id The client address information.
+ * @param[in] remote_address The client address information.
*
* @param[in] msg_ctx The messaging context to use.
*
@@ -865,7 +895,7 @@ done:
* status = rpc_pipe_open_interface(tmp_ctx,
* &ndr_table_winreg.syntax_id,
* p->session_info,
- * client_id,
+ * remote_address,
* &winreg_pipe);
* @endcode
*/
@@ -873,7 +903,7 @@ done:
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
const struct auth_serversupplied_info *session_info,
- struct client_address *client_id,
+ const struct tsocket_address *remote_address,
struct messaging_context *msg_ctx,
struct rpc_pipe_client **cli_pipe)
{
@@ -913,7 +943,7 @@ NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
if (strcasecmp_m(server_type, "embedded") == 0) {
status = rpc_pipe_open_internal(tmp_ctx,
syntax, session_info,
- client_id, msg_ctx,
+ remote_address, msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
goto done;
diff --git a/source3/rpc_server/rpc_ncacn_np.h b/source3/rpc_server/rpc_ncacn_np.h
index 3d9a170cdc..8d3a21e414 100644
--- a/source3/rpc_server/rpc_ncacn_np.h
+++ b/source3/rpc_server/rpc_ncacn_np.h
@@ -35,7 +35,7 @@ struct np_proxy_state {
struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
- struct client_address *client_id,
+ const struct tsocket_address *remote_address,
const struct auth_serversupplied_info *session_info,
struct messaging_context *msg_ctx);
struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
@@ -45,14 +45,14 @@ struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
const struct auth_serversupplied_info *session_info);
NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
const struct ndr_interface_table *ndr_table,
- struct client_address *client_id,
+ const struct tsocket_address *remote_address,
const struct auth_serversupplied_info *session_info,
struct messaging_context *msg_ctx,
struct dcerpc_binding_handle **binding_handle);
NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
const struct auth_serversupplied_info *session_info,
- struct client_address *client_id,
+ const struct tsocket_address *remote_address,
struct messaging_context *msg_ctx,
struct rpc_pipe_client **cli_pipe);
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 3b86f0092e..6852f2e662 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -194,7 +194,6 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
}
strlcpy(p->client_id->addr,
p->client_id->name, sizeof(p->client_id->addr));
- p->client_id->name = talloc_strdup(p->client_id, p->client_id->name);
if (local_address != NULL) {
p->local_address = tsocket_address_copy(local_address, p);
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c
index 5201571a37..acf2b40397 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_util.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_util.c
@@ -30,6 +30,7 @@
#include "../libcli/security/security.h"
#include "rpc_client/cli_winreg.h"
#include "../libcli/registry/util_reg.h"
+#include "../lib/tsocket/tsocket.h"
#define TOP_LEVEL_PRINT_KEY "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print"
#define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY "\\Printers"
@@ -255,19 +256,26 @@ static WERROR winreg_printer_openkey(TALLOC_CTX *mem_ctx,
struct policy_handle *hive_handle,
struct policy_handle *key_handle)
{
- static struct client_address client_id;
+ struct tsocket_address *local;
struct dcerpc_binding_handle *binding_handle;
struct winreg_String wkey, wkeyclass;
char *keyname;
NTSTATUS status;
WERROR result = WERR_OK;
+ int rc;
- strlcpy(client_id.addr, "127.0.0.1", sizeof(client_id.addr));
- client_id.name = "127.0.0.1";
+ rc = tsocket_address_inet_from_strings(mem_ctx,
+ "ip",
+ "127.0.0.1",
+ 0,
+ &local);
+ if (rc < 0) {
+ return WERR_NOMEM;
+ }
status = rpcint_binding_handle(mem_ctx,
&ndr_table_winreg,
- &client_id,
+ local,
session_info,
msg_ctx,
&binding_handle);
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 501bb1efc7..b6ee6a89dd 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -411,7 +411,6 @@ bool fsp_is_np(struct files_struct *fsp)
NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
const struct tsocket_address *local_address,
const struct tsocket_address *remote_address,
- struct client_address *client_id,
struct auth_serversupplied_info *session_info,
struct messaging_context *msg_ctx,
struct fake_file_handle **phandle)
@@ -461,7 +460,7 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
- p = make_internal_rpc_pipe_p(handle, &syntax, client_id,
+ p = make_internal_rpc_pipe_p(handle, &syntax, remote_address,
session_info, msg_ctx);
handle->type = FAKE_FILE_TYPE_NAMED_PIPE;
diff --git a/source3/rpc_server/srv_pipe_hnd.h b/source3/rpc_server/srv_pipe_hnd.h
index 680add469b..13c70cf513 100644
--- a/source3/rpc_server/srv_pipe_hnd.h
+++ b/source3/rpc_server/srv_pipe_hnd.h
@@ -31,7 +31,6 @@ bool fsp_is_np(struct files_struct *fsp);
NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
const struct tsocket_address *local_address,
const struct tsocket_address *remote_address,
- struct client_address *client_id,
struct auth_serversupplied_info *session_info,
struct messaging_context *msg_ctx,
struct fake_file_handle **phandle);
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index dac91b2a40..63fdd03f44 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -834,7 +834,7 @@ static bool api_DosPrintQGetInfo(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -1031,7 +1031,7 @@ static bool api_DosPrintQEnum(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -2256,7 +2256,7 @@ static bool api_RNetShareAdd(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(mem_ctx, &ndr_table_srvsvc.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -2367,7 +2367,7 @@ static bool api_RNetGroupEnum(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(
talloc_tos(), &ndr_table_samr.syntax_id,
- conn->session_info, &conn->sconn->client_id,
+ conn->session_info, conn->sconn->remote_address,
conn->sconn->msg_ctx, &samr_pipe);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("api_RNetUserEnum: Could not connect to samr: %s\n",
@@ -2573,7 +2573,7 @@ static bool api_NetUserGetGroups(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(
talloc_tos(), &ndr_table_samr.syntax_id,
- conn->session_info, &conn->sconn->client_id,
+ conn->session_info, conn->sconn->remote_address,
conn->sconn->msg_ctx, &samr_pipe);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("api_RNetUserEnum: Could not connect to samr: %s\n",
@@ -2765,7 +2765,7 @@ static bool api_RNetUserEnum(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(
talloc_tos(), &ndr_table_samr.syntax_id,
- conn->session_info, &conn->sconn->client_id,
+ conn->session_info, conn->sconn->remote_address,
conn->sconn->msg_ctx, &samr_pipe);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("api_RNetUserEnum: Could not connect to samr: %s\n",
@@ -3031,7 +3031,7 @@ static bool api_SetUserPassword(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(mem_ctx, &ndr_table_samr.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -3282,7 +3282,7 @@ static bool api_SamOEMChangePassword(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(mem_ctx, &ndr_table_samr.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -3379,7 +3379,7 @@ static bool api_RDosPrintJobDel(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -3507,7 +3507,7 @@ static bool api_WPrintQueueCtrl(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -3689,7 +3689,7 @@ static bool api_PrintJobInfo(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -3866,7 +3866,7 @@ static bool api_RNetServerGetInfo(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(mem_ctx, &ndr_table_srvsvc.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -4293,7 +4293,7 @@ static bool api_RNetUserGetInfo(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(mem_ctx, &ndr_table_samr.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -4820,7 +4820,7 @@ static bool api_WPrintJobGetInfo(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -4962,7 +4962,7 @@ static bool api_WPrintJobEnumerate(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -5162,7 +5162,7 @@ static bool api_WPrintDestGetInfo(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -5294,7 +5294,7 @@ static bool api_WPrintDestEnum(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
@@ -5605,7 +5605,7 @@ static bool api_RNetSessionEnum(struct smbd_server_connection *sconn,
status = rpc_pipe_open_interface(conn,
&ndr_table_srvsvc.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index 2de48adcbc..2ff3779b0e 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -72,7 +72,6 @@ NTSTATUS open_np_file(struct smb_request *smb_req, const char *name,
status = np_open(fsp, name,
conn->sconn->local_address,
conn->sconn->remote_address,
- &conn->sconn->client_id,
conn->session_info,
conn->sconn->msg_ctx,
&fsp->fake_file_handle);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index a804884ef7..28a3f2d1c1 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5355,7 +5355,7 @@ void reply_printqueue(struct smb_request *req)
status = rpc_pipe_open_interface(conn,
&ndr_table_spoolss.syntax_id,
conn->session_info,
- &conn->sconn->client_id,
+ conn->sconn->remote_address,
conn->sconn->msg_ctx,
&cli);
if (!NT_STATUS_IS_OK(status)) {