struct dcesrv_connection *dcesrv_conn = dce_call->conn;
const struct tsocket_address *local_address =
dcesrv_connection_get_local_address(dcesrv_conn);
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
struct junction_map *jn = NULL;
struct referral *old_referral_list = NULL;
bool self_ref = False;
status = get_referred_path(ctx,
p->session_info,
r->in.path,
- p->remote_address,
+ remote_address,
local_address,
true, /*allow_broken_path */
jn, &consumedcnt, &self_ref);
struct dcesrv_connection *dcesrv_conn = dce_call->conn;
const struct tsocket_address *local_address =
dcesrv_connection_get_local_address(dcesrv_conn);
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
struct junction_map *jn = NULL;
bool self_ref = False;
int consumedcnt = 0;
status = get_referred_path(ctx,
p->session_info,
r->in.dfs_entry_path,
- p->remote_address,
+ remote_address,
local_address,
true, /*allow_broken_path */
jn, &consumedcnt, &self_ref);
struct dcesrv_connection *dcesrv_conn = dce_call->conn;
const struct tsocket_address *local_address =
dcesrv_connection_get_local_address(dcesrv_conn);
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
int consumedcnt = strlen(r->in.dfs_entry_path);
struct junction_map *jn = NULL;
bool self_ref = False;
status = get_referred_path(ctx,
p->session_info,
r->in.dfs_entry_path,
- p->remote_address,
+ remote_address,
local_address,
true, /*allow_broken_path */
jn, &consumedcnt, &self_ref);
struct dcesrv_connection *dcesrv_conn = dce_call->conn;
const struct tsocket_address *local_address =
dcesrv_connection_get_local_address(dcesrv_conn);
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
NTSTATUS status;
NTSTATUS result = NT_STATUS_OK;
DATA_BLOB blob;
status = rpcint_binding_handle(p->mem_ctx,
&ndr_table_lsarpc,
- p->remote_address,
+ remote_address,
local_address,
p->session_info,
p->msg_ctx,
struct dcesrv_connection *dcesrv_conn = dce_call->conn;
const struct tsocket_address *local_address =
dcesrv_connection_get_local_address(dcesrv_conn);
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
NTSTATUS status = NT_STATUS_OK;
union netr_LogonLevel *logon = r->in.logon;
const char *nt_username, *nt_domain, *nt_workstation;
&user_info,
nt_username, nt_domain,
wksname,
- p->remote_address,
+ remote_address,
local_address,
logon->network->identity_info.parameter_control,
logon->network->lm.data,
&user_info,
nt_username, nt_domain,
nt_workstation,
- p->remote_address,
+ remote_address,
local_address,
logon->password->identity_info.parameter_control,
chal,
struct pipes_struct {
struct pipes_struct *next, *prev;
- const struct tsocket_address *remote_address;
-
enum dcerpc_transport_t transport;
struct auth_session_info *session_info;
struct messaging_context *msg_ctx,
const char *pipe_name,
enum dcerpc_transport_t transport,
- const struct tsocket_address *remote_address,
struct pipes_struct **_p)
{
struct pipes_struct *p;
p->msg_ctx = msg_ctx;
p->transport = transport;
- p->remote_address = tsocket_address_copy(remote_address, p);
- if (p->remote_address == NULL) {
- talloc_free(p);
- return ENOMEM;
- }
-
*_p = p;
return 0;
}
ncacn_conn->msg_ctx,
client->binding,
transport,
- ncacn_conn->remote_client_addr,
&ncacn_conn->p);
if (ret != 0) {
DBG_DEBUG("make_base_pipes_struct failed: %s\n",
NTSTATUS _samr_ChangePasswordUser2(struct pipes_struct *p,
struct samr_ChangePasswordUser2 *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
NTSTATUS status;
char *user_name = NULL;
char *rhost;
return NT_STATUS_NO_MEMORY;
}
- rhost = tsocket_address_inet_addr_string(p->remote_address,
+ rhost = tsocket_address_inet_addr_string(remote_address,
talloc_tos());
if (rhost == NULL) {
return NT_STATUS_NO_MEMORY;
NTSTATUS _samr_OemChangePasswordUser2(struct pipes_struct *p,
struct samr_OemChangePasswordUser2 *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
NTSTATUS status;
char *user_name = NULL;
const char *wks = NULL;
return NT_STATUS_INVALID_PARAMETER;
}
- rhost = tsocket_address_inet_addr_string(p->remote_address,
+ rhost = tsocket_address_inet_addr_string(remote_address,
talloc_tos());
if (rhost == NULL) {
return NT_STATUS_NO_MEMORY;
NTSTATUS _samr_ChangePasswordUser3(struct pipes_struct *p,
struct samr_ChangePasswordUser3 *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
NTSTATUS status;
char *user_name = NULL;
const char *wks = NULL;
return NT_STATUS_NO_MEMORY;
}
- rhost = tsocket_address_inet_addr_string(p->remote_address,
+ rhost = tsocket_address_inet_addr_string(remote_address,
talloc_tos());
if (rhost == NULL) {
return NT_STATUS_NO_MEMORY;
NTSTATUS _samr_SetUserInfo(struct pipes_struct *p,
struct samr_SetUserInfo *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
struct samr_info *uinfo;
NTSTATUS status;
struct samu *pwd = NULL;
return NT_STATUS_NO_SUCH_USER;
}
- rhost = tsocket_address_inet_addr_string(p->remote_address,
+ rhost = tsocket_address_inet_addr_string(remote_address,
talloc_tos());
if (rhost == NULL) {
return NT_STATUS_NO_MEMORY;
WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
struct spoolss_OpenPrinterEx *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
int snum;
char *raddr;
char *rhost;
}
/* check smb.conf parameters and the the sec_desc */
- raddr = tsocket_address_inet_addr_string(p->remote_address,
+ raddr = tsocket_address_inet_addr_string(remote_address,
p->mem_ctx);
if (raddr == NULL) {
return WERR_NOT_ENOUGH_MEMORY;
}
- rc = get_remote_hostname(p->remote_address,
+ rc = get_remote_hostname(remote_address,
&rhost,
p->mem_ctx);
if (rc < 0) {
WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct pipes_struct *p,
struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
int snum = -1;
struct spoolss_NotifyOption *option = r->in.notify_options;
struct sockaddr_storage client_ss;
DEBUG(10,("_spoolss_RemoteFindFirstPrinterChangeNotifyEx: "
"remote_address is %s\n",
- tsocket_address_string(p->remote_address, p->mem_ctx)));
+ tsocket_address_string(remote_address, p->mem_ctx)));
if (!lp_print_notify_backchannel(snum)) {
DEBUG(10, ("_spoolss_RemoteFindFirstPrinterChangeNotifyEx: "
return WERR_RPC_S_SERVER_UNAVAILABLE;
}
- client_len = tsocket_address_bsd_sockaddr(p->remote_address,
+ client_len = tsocket_address_bsd_sockaddr(remote_address,
(struct sockaddr *) &client_ss,
sizeof(struct sockaddr_storage));
if (client_len < 0) {
WERROR _spoolss_StartDocPrinter(struct pipes_struct *p,
struct spoolss_StartDocPrinter *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
struct spoolss_DocumentInfo1 *info_1;
int snum;
struct printer_handle *Printer = find_printer_index_by_hnd(p, r->in.handle);
return WERR_INVALID_HANDLE;
}
- rc = get_remote_hostname(p->remote_address,
+ rc = get_remote_hostname(remote_address,
&rhost,
p->mem_ctx);
if (rc < 0) {
return WERR_NOT_ENOUGH_MEMORY;
}
if (strequal(rhost,"UNKNOWN")) {
- rhost = tsocket_address_inet_addr_string(p->remote_address,
+ rhost = tsocket_address_inet_addr_string(remote_address,
p->mem_ctx);
if (rhost == NULL) {
return WERR_NOT_ENOUGH_MEMORY;
struct spoolss_SetPrinterInfoCtr *info_ctr,
struct spoolss_DeviceMode *devmode)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
uint32_t printer_mask = SPOOLSS_PRINTER_INFO_ALL;
struct spoolss_SetPrinterInfo2 *printer = info_ctr->info.info2;
struct spoolss_PrinterInfo2 *old_printer;
{
char *raddr;
- raddr = tsocket_address_inet_addr_string(p->remote_address,
+ raddr = tsocket_address_inet_addr_string(remote_address,
p->mem_ctx);
if (raddr == NULL) {
result = WERR_NOT_ENOUGH_MEMORY;
struct spoolss_UserLevelCtr *user_ctr,
struct policy_handle *handle)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
struct spoolss_SetPrinterInfo2 *info2 = info_ctr->info.info2;
uint32_t info2_mask = SPOOLSS_PRINTER_INFO_ALL;
const struct loadparm_substitution *lp_sub =
if (*lp_addprinter_command(talloc_tos(), lp_sub) ) {
char *raddr;
- raddr = tsocket_address_inet_addr_string(p->remote_address,
+ raddr = tsocket_address_inet_addr_string(remote_address,
p->mem_ctx);
if (raddr == NULL) {
return WERR_NOT_ENOUGH_MEMORY;
struct dcesrv_connection *dcesrv_conn = dce_call->conn;
const struct tsocket_address *local_address =
dcesrv_connection_get_local_address(dcesrv_conn);
+ const struct tsocket_address *remote_address =
+ dcesrv_connection_get_remote_address(dcesrv_conn);
struct winbindd_domain *domain;
NTSTATUS status;
struct netr_IdentityInfo *identity_info = NULL;
0,
challenge,
lm_response, nt_response,
- p->remote_address,
+ remote_address,
local_address,
&r->out.authoritative,
true, /* skip_sam */