Fix the build.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 04:49:36 +0000 (05:49 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 04:49:36 +0000 (05:49 +0100)
pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
source4/auth/gensec/gensec.c
source4/auth/system_session.c
source4/lib/socket/socket.c
source4/libcli/smb2/connect.c
source4/param/loadparm.c
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcerpc_server.h
source4/rpc_server/remote/dcesrv_remote.c
source4/torture/rpc/spoolss_notify.c

index 484886bbfa51638720a8c4188a7974ed7fe62e41..bb0c18e13c8bfe5bf79777187e5e9181ea1ff54f 100644 (file)
@@ -120,7 +120,7 @@ static NTSTATUS $name\__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_C
         /* unravel the NDR for the packet */
        ndr_err = ndr_table_$name.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_$name, opnum, NDR_IN,
                                  &dce_call->pkt.u.request.stub_and_verifier);
                dce_call->fault_code = DCERPC_FAULT_NDR;
@@ -145,7 +145,7 @@ pidl "
        }
 
        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_$name, opnum, NDR_IN,
                                  &dce_call->pkt.u.request.stub_and_verifier);
                return NT_STATUS_NET_WRITE_FAULT;
@@ -169,7 +169,7 @@ pidl "
        }
 
        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_$name, opnum, NDR_IN,
                                  &dce_call->pkt.u.request.stub_and_verifier);
                return NT_STATUS_NET_WRITE_FAULT;
index 3416ee10bca42848c9997bf2284ceebe4071778f..20c88f86bc17bd424d3a2bd1ece001d710a5ac10 100644 (file)
@@ -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;
 }
index 1d227fe46822fffd3363a510156a29984aa0b2fe..07b006064382e9b6345ec920f6775223ba6cf11e 100644 (file)
@@ -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);
 
index 3be841311afe6bbe1ea441af840aed9c8c16b70b..eff2c0a74354e6ccf12ee32d6b72ed465628c052 100644 (file)
@@ -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;
        }
 
index 27c78fbce08335d64fc5a1b530c15dff8de327c3..e7aa8c753de8c38ef83ce5a744864438f02f1d3a 100644 (file)
@@ -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);
index 0c831b23d8c908fada9edbd4d94c707680cc1ca5..6b8db0e7f54f26313bc593c4179126cb2286b566 100644 (file)
@@ -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)));
index 1d1efa74808cdb0db2b31d22ed2e44f3b1ceef6f..6f3f6799e7883efcb8773f949f641bdfeab7127e 100644 (file)
@@ -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;
index 59a4bab083e2d599f14ade1e1a1b101e0c541743..4788fb3a51ab4b7a127a6b4634545237a62d071a 100644 (file)
@@ -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;
 
index 227405defbd4bf5705419438bcdd9329a306e0c9..1310ecee90e04c5b0c3ddce4344731d2983b5ff6 100644 (file)
@@ -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;
index 71fdffa216a8db26658b4cdbf487e96670ad1f3b..f9ff31a797743ed7bf91b0a94f25f3cf73e88081 100644 (file)
@@ -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;