summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-11-02 05:49:36 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-11-02 05:49:36 +0100
commitc537f7a91449728bbffdda628877f72db2d4e96b (patch)
treec8589d1c9a7dd0bd62ff8344dd8f523033cc7e37 /source4
parent29177203e5da4cb42e0c5bc2f2981d6cffbe042c (diff)
downloadsamba-c537f7a91449728bbffdda628877f72db2d4e96b.tar.gz
samba-c537f7a91449728bbffdda628877f72db2d4e96b.tar.bz2
samba-c537f7a91449728bbffdda628877f72db2d4e96b.zip
Fix the build.
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/gensec/gensec.c4
-rw-r--r--source4/auth/system_session.c1
-rw-r--r--source4/lib/socket/socket.c4
-rw-r--r--source4/libcli/smb2/connect.c2
-rw-r--r--source4/param/loadparm.c2
-rw-r--r--source4/rpc_server/dcerpc_server.c1
-rw-r--r--source4/rpc_server/dcerpc_server.h2
-rw-r--r--source4/rpc_server/remote/dcesrv_remote.c2
-rw-r--r--source4/torture/rpc/spoolss_notify.c4
9 files changed, 10 insertions, 12 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 3416ee10bc..20c88f86bc 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -501,7 +501,7 @@ static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx,
(*gensec_security)->event_ctx = ev;
(*gensec_security)->msg_ctx = msg;
- (*gensec_security)->settings = settings;
+ (*gensec_security)->settings = talloc_reference(*gensec_security, settings);
return NT_STATUS_OK;
}
@@ -529,7 +529,7 @@ _PUBLIC_ NTSTATUS gensec_subcontext_start(TALLOC_CTX *mem_ctx,
(*gensec_security)->want_features = parent->want_features;
(*gensec_security)->event_ctx = parent->event_ctx;
(*gensec_security)->msg_ctx = parent->msg_ctx;
- (*gensec_security)->settings = parent->settings;
+ (*gensec_security)->settings = talloc_reference(*gensec_security, parent->settings);
return NT_STATUS_OK;
}
diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c
index 1d227fe468..07b0060643 100644
--- a/source4/auth/system_session.c
+++ b/source4/auth/system_session.c
@@ -234,6 +234,7 @@ NTSTATUS auth_system_server_info(TALLOC_CTX *mem_ctx, const char *netbios_name,
struct auth_serversupplied_info **_server_info)
{
struct auth_serversupplied_info *server_info;
+
server_info = talloc(mem_ctx, struct auth_serversupplied_info);
NT_STATUS_HAVE_NO_MEMORY(server_info);
diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c
index 3be841311a..eff2c0a743 100644
--- a/source4/lib/socket/socket.c
+++ b/source4/lib/socket/socket.c
@@ -25,8 +25,6 @@
#include "system/network.h"
#include "param/param.h"
-bool testnonblock = false;
-
/*
auto-close sockets on free
*/
@@ -72,7 +70,7 @@ _PUBLIC_ NTSTATUS socket_create_with_ops(TALLOC_CTX *mem_ctx, const struct socke
if (!(flags & SOCKET_FLAG_BLOCK) &&
type == SOCKET_TYPE_STREAM &&
- testnonblock) {
+ lp_parm_bool(global_loadparm, NULL, "socket", "testnonblock", false)) {
(*new_sock)->flags |= SOCKET_FLAG_TESTNONBLOCK;
}
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 27c78fbce0..e7aa8c753d 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -239,7 +239,6 @@ struct composite_context *smb2_connect_send(TALLOC_CTX *mem_ctx,
const char *socket_options)
{
struct composite_context *c;
- const char *default_ports[] = { "445", NULL };
struct smb2_connect_state *state;
struct nbt_name name;
struct composite_context *creq;
@@ -256,7 +255,6 @@ struct composite_context *smb2_connect_send(TALLOC_CTX *mem_ctx,
state->host = talloc_strdup(c, host);
if (composite_nomem(state->host, c)) return c;
state->ports = talloc_reference(state, ports);
- if (composite_nomem(state->ports, c)) return c;
state->share = talloc_strdup(c, share);
if (composite_nomem(state->share, c)) return c;
state->resolve_ctx = talloc_reference(state, resolve_ctx);
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 0c831b23d8..6b8db0e7f5 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2477,8 +2477,6 @@ bool lp_load(struct loadparm_context *lp_ctx, const char *filename)
reload_charcnv(lp_ctx);
- testnonblock = lp_parm_bool(lp_ctx, NULL, "socket", "testnonblock", false);
-
/* FIXME: Check locale in environment for this: */
if (strcmp(lp_display_charset(lp_ctx), lp_unix_charset(lp_ctx)) != 0)
d_set_iconv(smb_iconv_open(lp_display_charset(lp_ctx), lp_unix_charset(lp_ctx)));
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 1d1efa7480..6f3f6799e7 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -339,6 +339,7 @@ _PUBLIC_ NTSTATUS dcesrv_endpoint_connect(struct dcesrv_context *dce_ctx,
p->endpoint = ep;
p->contexts = NULL;
p->call_list = NULL;
+ p->packet_log_dir = lp_lockdir(dce_ctx->lp_ctx);
p->incoming_fragmented_call_list = NULL;
p->pending_call_list = NULL;
p->cli_max_recv_frag = 0;
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h
index 59a4bab083..4788fb3a51 100644
--- a/source4/rpc_server/dcerpc_server.h
+++ b/source4/rpc_server/dcerpc_server.h
@@ -210,6 +210,8 @@ struct dcesrv_connection {
bool processing;
+ const char *packet_log_dir;
+
/* this is the default state_flags for dcesrv_call_state structs */
uint32_t state_flags;
diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c
index 227405defb..1310ecee90 100644
--- a/source4/rpc_server/remote/dcesrv_remote.c
+++ b/source4/rpc_server/remote/dcesrv_remote.c
@@ -144,7 +144,7 @@ static NTSTATUS remote_op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CT
/* unravel the NDR for the packet */
ndr_err = table->calls[opnum].ndr_pull(pull, NDR_IN, *r);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx),
+ dcerpc_log_packet(dce_call->conn->packet_log_dir,
table, opnum, NDR_IN,
&dce_call->pkt.u.request.stub_and_verifier);
dce_call->fault_code = DCERPC_FAULT_NDR;
diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c
index 71fdffa216..f9ff31a797 100644
--- a/source4/torture/rpc/spoolss_notify.c
+++ b/source4/torture/rpc/spoolss_notify.c
@@ -60,7 +60,7 @@ static NTSTATUS spoolss__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_
/* unravel the NDR for the packet */
ndr_err = ndr_table_spoolss.calls[opnum].ndr_pull(pull, NDR_IN, *r);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx),
+ dcerpc_log_packet(dce_call->conn->packet_log_dir,
&ndr_table_spoolss, opnum, NDR_IN,
&dce_call->pkt.u.request.stub_and_verifier);
dce_call->fault_code = DCERPC_FAULT_NDR;
@@ -103,7 +103,7 @@ static NTSTATUS spoolss__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_
}
if (dce_call->fault_code != 0) {
- dcerpc_log_packet(lp_lockdir(dce_call->conn->dce_ctx->lp_ctx),
+ dcerpc_log_packet(dce_call->conn->packet_log_dir,
&ndr_table_spoolss, opnum, NDR_IN,
&dce_call->pkt.u.request.stub_and_verifier);
return NT_STATUS_NET_WRITE_FAULT;