[SCM] Samba Shared Repository - branch master updated
Anatoliy Atanasov
anatoliy at samba.org
Thu Sep 23 09:45:02 MDT 2010
The branch, master has been updated
via 67b6252 s4/dsdb:kcc: cleanup and improve readability
via 519180c s4:dsdb/kcc: we don't need to manually allocate [out,ref] pointers anymore
via 224fbbe s4:irpc: use LIBNDR_FLAG_REF_ALLOC for the server side when pulling
via be0ed31 s4:irpc: add padding to the IPRC header for 8 byte alignment
from 148d4fa s3-waf: first run in using NDR_ subsystems (mostly from shared directory).
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 67b6252eedbde910da4effb3c3f62af449e3503a
Author: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>
Date: Wed Sep 22 19:20:21 2010 -0700
s4/dsdb:kcc: cleanup and improve readability
commit 519180c341edd1be51fbbb622132c2f5d9a37731
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Sep 22 19:18:25 2010 -0700
s4:dsdb/kcc: we don't need to manually allocate [out,ref] pointers anymore
metze
Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>
commit 224fbbe33fbb4acea1c0907b1b7566d749521a92
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Sep 22 19:04:58 2010 -0700
s4:irpc: use LIBNDR_FLAG_REF_ALLOC for the server side when pulling
The dcerpc server also uses it, so it was surprising that the
IRPC server side doesn't used it.
The reason to have this is that we want to handle error cases
and returns like NT_STATUS_NOT_SUPPORTED sane, without crashing
while marshalling the response.
metze
Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>
commit be0ed310b335b5098f2ba475a709c1832de10127
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Sep 22 18:55:40 2010 -0700
s4:irpc: add padding to the IPRC header for 8 byte alignment
As we marshall the iprc header and the payload to the ndr_push
context, we should pad the irpc header to let the payload start
at an 8 byte boundary.
This way we get the alignment still be correct if we remove the
header before passing the raw payload to the caller.
As we use IRPC more and more for complex NDR marshalled structures
we need to get this right, in order to not get random ndr_pull failures.
metze
Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/kcc/kcc_drs_replica_info.c | 16 ++++++----------
source4/lib/messaging/messaging.c | 2 ++
source4/librpc/idl/irpc.idl | 1 +
3 files changed, 9 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/kcc/kcc_drs_replica_info.c b/source4/dsdb/kcc/kcc_drs_replica_info.c
index 1701056..05f9434 100644
--- a/source4/dsdb/kcc/kcc_drs_replica_info.c
+++ b/source4/dsdb/kcc/kcc_drs_replica_info.c
@@ -630,10 +630,11 @@ static WERROR kccdrs_replica_get_info_neighbours(TALLOC_CTX *mem_ctx,
/* append the neighbour to the neighbours array */
reply->neighbours->array = talloc_realloc(mem_ctx,
- reply->neighbours->array,
- struct drsuapi_DsReplicaNeighbour,
- reply->neighbours->count + 1);
- reply->neighbours->array[reply->neighbours->count++] = neigh;
+ reply->neighbours->array,
+ struct drsuapi_DsReplicaNeighbour,
+ reply->neighbours->count + 1);
+ reply->neighbours->array[reply->neighbours->count] = neigh;
+ reply->neighbours->count++;
j++;
}
@@ -813,12 +814,7 @@ NTSTATUS kccdrs_replica_get_info(struct irpc_message *msg,
value_dn = req2->value_dn_str;
}
- /* allocate the reply and fill in some fields */
- reply = talloc_zero(mem_ctx, union drsuapi_DsReplicaInfo);
- NT_STATUS_HAVE_NO_MEMORY(reply);
- req->out.info = reply;
- req->out.info_type = talloc(mem_ctx, enum drsuapi_DsReplicaInfoType);
- NT_STATUS_HAVE_NO_MEMORY(req->out.info_type);
+ reply = req->out.info;
*req->out.info_type = info_type;
/* Based on the infoType requested, retrieve the corresponding
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index d880c63..724d66a 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -769,6 +769,8 @@ static void irpc_handler_request(struct messaging_context *msg_ctx,
r = talloc_zero_size(m->ndr, i->table->calls[m->header.callnum].struct_size);
if (r == NULL) goto failed;
+ m->ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
+
/* parse the request data */
ndr_err = i->table->calls[i->callnum].ndr_pull(m->ndr, NDR_IN, r);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) goto failed;
diff --git a/source4/librpc/idl/irpc.idl b/source4/librpc/idl/irpc.idl
index d6c4f84..2070d3d 100644
--- a/source4/librpc/idl/irpc.idl
+++ b/source4/librpc/idl/irpc.idl
@@ -21,6 +21,7 @@ import "misc.idl", "security.idl", "nbt.idl";
uint32 callid;
irpc_flags flags;
NTSTATUS status;
+ [flag(NDR_ALIGN8)] DATA_BLOB _pad;
} irpc_header;
/******************************************************
--
Samba Shared Repository
More information about the samba-cvs
mailing list