summaryrefslogtreecommitdiff
path: root/source4/lib/data_blob.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-13 02:20:40 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-13 02:20:40 +0000
commit340d9b71f9e75d634389104da5949ba59669ede2 (patch)
tree1bc2c22f57eade574841d8e4d9f3f5a5ff1c1022 /source4/lib/data_blob.c
parentf7065cc0a5555a32499908a499f926ede3f7d851 (diff)
downloadsamba-340d9b71f9e75d634389104da5949ba59669ede2.tar.gz
samba-340d9b71f9e75d634389104da5949ba59669ede2.tar.bz2
samba-340d9b71f9e75d634389104da5949ba59669ede2.zip
added a basic dcerpc endpoint mapper to Samba4. Currently only
implements the epm_Lookup() call, I'll add the other important calls soon. I was rather pleased to find that epm_Lookup() worked first time, which is particularly surprising given its complexity. This required quite a bit of new infrastructure: * a generic way of handling dcerpc policy handles in the rpc server * added type checked varients of talloc. These are much less error prone. I'd like to move to using these for nearly all uses of talloc. * added more dcerpc fault handling code, and translation from NTSTATUS to a dcerpc fault code * added data_blob_talloc_zero() for allocating an initially zero blob * added a endpoint enumeration hook in the dcerpc endpoint server operations (This used to be commit 3f85f9b782dc17417baf1ca557fcae22f5b6a83a)
Diffstat (limited to 'source4/lib/data_blob.c')
-rw-r--r--source4/lib/data_blob.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c
index 457ad382a2..b5d1b4076e 100644
--- a/source4/lib/data_blob.c
+++ b/source4/lib/data_blob.c
@@ -88,6 +88,18 @@ DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length)
}
/*******************************************************************
+ construct a zero data blob, using supplied TALLOC_CTX.
+ use this sparingly as it initialises data - better to initialise
+ yourself if you want specific data in the blob
+*******************************************************************/
+DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length)
+{
+ DATA_BLOB blob = data_blob_talloc(mem_ctx, NULL, length);
+ data_blob_clear(&blob);
+ return blob;
+}
+
+/*******************************************************************
free a data blob
*******************************************************************/
void data_blob_free(DATA_BLOB *d)