[SCM] Samba Shared Repository - branch v4-1-test updated
Karolin Seeger
kseeger at samba.org
Mon Apr 27 20:31:03 MDT 2015
The branch, v4-1-test has been updated
via f8ef498 Add DCERPC flag to call unbind hooks without destroying the connection itself upon termination of a connection with outstanding pending calls.
via 8b78cc3 s4:rpc_server: Add multiplex state to dcerpc flags and control over multiplex PFC flag in bind_ack and and dcesrv_alter replies
via 2e0df25 Make sure we initialize conn to NULL, because a routine we call may give an error and not touch conn, and then we get an error when trying to TALLOC_FREE it.
via 08dd42c s3:smbd: update comment to correctly reflect MS-SMB2
via bfde0f0 s3:smbd: missing tevent_req_nterror
from 9329307 spoolss: purge the printer name cache on name change
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-1-test
- Log -----------------------------------------------------------------
commit f8ef49837f4ee62275d66047548ada7cb625347c
Author: Julien Kerihuel <j.kerihuel at openchange.org>
Date: Mon Apr 6 11:26:58 2015 +0200
Add DCERPC flag to call unbind hooks without destroying the connection itself upon termination of a connection with outstanding pending calls.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11226
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Apr 14 20:39:34 CEST 2015 on sn-devel-104
(cherry picked from commit fd90d270c7e97a639f42a96b674a674d1b51aa0d)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-1-test): Tue Apr 28 04:30:13 CEST 2015 on sn-devel-104
commit 8b78cc3b51505cff5a8876b338d509678f4d0a50
Author: Julien Kerihuel <j.kerihuel at openchange.org>
Date: Tue Mar 24 21:06:03 2015 -0700
s4:rpc_server: Add multiplex state to dcerpc flags and control over multiplex PFC flag in bind_ack and and dcesrv_alter replies
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11225
Signed-off-by: Julien Kerihuel <j.kerihuel at openchange.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze at samba.org>
Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
(cherry picked from commit caaf89e899c2a3926fb9e54d1c86f1a9cd5d7618)
Conflicts:
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcerpc_server.h
commit 2e0df254611d2e310cdb563e70c21ddb7560a038
Author: Richard Sharpe <rsharpe at nutanix.com>
Date: Thu Apr 23 12:36:28 2015 -0700
Make sure we initialize conn to NULL, because a routine we call may give an error and not touch conn, and then we get an error when trying to TALLOC_FREE it.
https://bugzilla.samba.org/show_bug.cgi?id=11234
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 471744a32d37f187c87f9bfa6f860b69446b9afe)
commit 08dd42c3886daef81f37dcda64d9517bad65551a
Author: Ralph Boehme <slow at samba.org>
Date: Fri Apr 17 09:12:59 2015 +0200
s3:smbd: update comment to correctly reflect MS-SMB2
https://bugzilla.samba.org/show_bug.cgi?id=11224
Signed-off-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Apr 22 01:04:02 CEST 2015 on sn-devel-104
(cherry picked from commit 64b038da31c7674410ef770f9c40a5402159fb57)
commit bfde0f0d73bfcf2c4fc269b44ab04a12e712bb69
Author: Ralph Boehme <slow at samba.org>
Date: Thu Apr 16 22:28:25 2015 +0200
s3:smbd: missing tevent_req_nterror
The error code path in case fsp == NULL misses a call
tevent_req_nterror().
https://bugzilla.samba.org/show_bug.cgi?id=11224
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit ad52dcdf5de6f5f2c2ee156d93ebbb343f39e526)
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/aio.c | 12 ++++++------
source3/smbd/smb2_server.c | 11 +++++------
source3/utils/net_dns.c | 2 +-
source4/rpc_server/dcerpc_server.c | 36 +++++++++++++++++++++++++++++++++++-
source4/rpc_server/dcerpc_server.h | 2 ++
5 files changed, 49 insertions(+), 14 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 44d771e..c1e0ce2 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -786,10 +786,10 @@ static void aio_pread_smb2_done(struct tevent_req *req)
(nread == -1) ? strerror(err) : "no error"));
if (fsp == NULL) {
- DEBUG( 3, ("aio_pread_smb2_done: file closed whilst "
- "aio outstanding (mid[%llu]).\n",
- (unsigned long long)aio_ex->smbreq->mid));
+ DEBUG(3, ("%s: request cancelled (mid[%ju])\n",
+ __func__, (uintmax_t)aio_ex->smbreq->mid));
TALLOC_FREE(aio_ex);
+ tevent_req_nterror(subreq, NT_STATUS_INTERNAL_ERROR);
return;
}
@@ -959,10 +959,10 @@ static void aio_pwrite_smb2_done(struct tevent_req *req)
(nwritten == -1) ? strerror(err) : "no error"));
if (fsp == NULL) {
- DEBUG( 3, ("aio_pwrite_smb2_done: file closed whilst "
- "aio outstanding (mid[%llu]).\n",
- (unsigned long long)aio_ex->smbreq->mid));
+ DEBUG(3, ("%s: request cancelled (mid[%ju])\n",
+ __func__, (uintmax_t)aio_ex->smbreq->mid));
TALLOC_FREE(aio_ex);
+ tevent_req_nterror(subreq, NT_STATUS_INTERNAL_ERROR);
return;
}
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 4f3fa15..1e4beda 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1280,12 +1280,11 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req,
if (req->in.vector_count > req->current_idx + SMBD_SMB2_NUM_IOV_PER_REQ) {
/*
- * We're trying to go async in a compound
- * request chain.
- * This is only allowed for opens that
- * cause an oplock break, otherwise it
- * is not allowed. See [MS-SMB2].pdf
- * note <194> on Section 3.3.5.2.7.
+ * We're trying to go async in a compound request
+ * chain. This is only allowed for opens that cause an
+ * oplock break or for the last operation in the
+ * chain, otherwise it is not allowed. See
+ * [MS-SMB2].pdf note <206> on Section 3.3.5.2.7.
*/
const uint8_t *inhdr = SMBD_SMB2_IN_HDR_PTR(req);
diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c
index 9bbefdb..7a04459 100644
--- a/source3/utils/net_dns.c
+++ b/source3/utils/net_dns.c
@@ -210,7 +210,7 @@ int get_my_ip_address( struct sockaddr_storage **pp_ss )
DNS_ERROR do_gethostbyname(const char *server, const char *host)
{
- struct dns_connection *conn;
+ struct dns_connection *conn = NULL;
struct dns_request *req, *resp;
DNS_ERROR err;
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index ad53685..8c0a101 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -500,6 +500,7 @@ static int dcesrv_connection_context_destructor(struct dcesrv_connection_context
if (c->iface && c->iface->unbind) {
c->iface->unbind(c, c->iface);
+ c->iface = NULL;
}
return 0;
@@ -616,6 +617,16 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
extra_flags |= DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN;
}
+ if ((call->pkt.pfc_flags & DCERPC_PFC_FLAG_CONC_MPX) &&
+ (call->state_flags & DCESRV_CALL_STATE_FLAG_MULTIPLEXED)) {
+ call->context->conn->state_flags |= DCESRV_CALL_STATE_FLAG_MULTIPLEXED;
+ extra_flags |= DCERPC_PFC_FLAG_CONC_MPX;
+ }
+
+ if (call->state_flags & DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL) {
+ call->context->conn->state_flags |= DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL;
+ }
+
/* handle any authentication that is being requested */
if (!dcesrv_auth_bind(call)) {
talloc_free(call->context);
@@ -795,6 +806,7 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call)
NTSTATUS status;
uint32_t result=0, reason=0;
uint32_t context_id;
+ uint32_t extra_flags = 0;
/* handle any authentication that is being requested */
if (!dcesrv_auth_alter(call)) {
@@ -828,12 +840,22 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call)
reason = DCERPC_BIND_REASON_ASYNTAX;
}
+ if ((call->pkt.pfc_flags & DCERPC_PFC_FLAG_CONC_MPX)) {
+ if (call->context->conn->state_flags & DCESRV_CALL_STATE_FLAG_MULTIPLEXED) {
+ extra_flags |= DCERPC_PFC_FLAG_CONC_MPX;
+ }
+ }
+
+ if (call->state_flags & DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL) {
+ call->context->conn->state_flags |= DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL;
+ }
+
/* setup a alter_resp */
dcesrv_init_hdr(&pkt, lpcfg_rpc_big_endian(call->conn->dce_ctx->lp_ctx));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_ALTER_RESP;
- pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST;
+ pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST | extra_flags;
pkt.u.alter_resp.max_xmit_frag = 0x2000;
pkt.u.alter_resp.max_recv_frag = 0x2000;
if (result == 0) {
@@ -1307,6 +1329,18 @@ static void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx)
cur = next;
next = cur->next;
+ if (cur->state_flags & DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL) {
+ struct dcesrv_connection_context *context_cur, *context_next;
+
+ context_next = cur->contexts;
+ while (context_next != NULL) {
+ context_cur = context_next;
+ context_next = context_cur->next;
+
+ dcesrv_connection_context_destructor(context_cur);
+ }
+ }
+
dcesrv_terminate_connection(cur, cur->terminate);
}
}
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h
index 66fe51e..bf8799a 100644
--- a/source4/rpc_server/dcerpc_server.h
+++ b/source4/rpc_server/dcerpc_server.h
@@ -102,6 +102,8 @@ struct dcesrv_call_state {
#define DCESRV_CALL_STATE_FLAG_ASYNC (1<<0)
#define DCESRV_CALL_STATE_FLAG_MAY_ASYNC (1<<1)
#define DCESRV_CALL_STATE_FLAG_HEADER_SIGNING (1<<2)
+#define DCESRV_CALL_STATE_FLAG_MULTIPLEXED (1<<3)
+#define DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL (1<<4)
uint32_t state_flags;
/* the time the request arrived in the server */
--
Samba Shared Repository
More information about the samba-cvs
mailing list